W3C home > Mailing lists > Public > www-lib@w3.org > April to June 1999

Re: Params of HTML element callbacks

From: Raffaele Sena <raff@nuvomedia.com>
Date: Tue, 8 Jun 1999 11:28:58 -0700
Message-ID: <008101beb1dc$c5e51a00$52c0a8c0@nuvomedia.com>
To: "Vaclav Barta" <vbar@comp.cz>, "wwwlib" <www-lib@w3.org>

> documentation of HTML element callbacks (functions of type
> HText_beginElement and HText_endElement, registered by
> HText_registerElementCallback) says that "the element
> number and attribute number are integers that are defined by
> the HTML DTD used by the HTMl [sic] parser". What does that
> mean - how do I find out that 40 is <HEAD>, 12 <BODY> etc.?
> I can't find it anywhere in wwwlib headers - is it part of
> HTML definition?
    the HTML DTD (or better, its internal representation)
    is contained in the 2 files: HTMLPDTD.c and HTMLPDTD.h.

    Basically all the tags have the form of HTML_<TAG>
    and the attributes have the form of HTML_<TAG>_<ATTRIBUTE>.

    So, <HEAD> will be defined as HTML_HEAD, <BODY> as HTML_BODY

    Note that the definitions for attributes (in HTMLPDTD.h) 
    is in the form of:


    this will generate the appropriate definition for HTML_BODY_BACKGROUND
    in HTMLPDTD.h and "BACKGROUND" in HTMLPDTD.c (I added the macros so 
    the attributes can be copied and pasted between the two files, since
    they need to be kept in sync).


Received on Tuesday, 8 June 1999 14:28:52 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:49 UTC