- From: Raffaele Sena <raff@nuvomedia.com>
- Date: Tue, 8 Jun 1999 11:28:58 -0700
- 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 and <BODY BACKGROUND=xx> will be HTML_BODY_BACKGROUND. Note that the definitions for attributes (in HTMLPDTD.h) is in the form of: HTML_ATTR(BODY, BACKGROUND) 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). Regards, Raffaele
Received on Tuesday, 8 June 1999 14:28:52 UTC