Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- A few questions about the html dtd
October 16, 2006, 7:50 am
rate this thread
Could you please tell me what's the meaning of the following element
definition? I have tried to find the meaning myself, but can't get
anything more besides the basic explanation of the dtd file.
1. <!ELEMENT A - - (%inline;)* -(A) -- anchor -->
* what's the "-(A)" supposed to mean? is that to say "minus A
element from %inline;"?
2. <!ELEMENT (DIR|MENU) - - (LI)+ -(%block;) -- directory list, menu
* if the answer of the first question is "yes", what's the
"-(%block;)" supposed to mean here? I checked with the definition of
<!ELEMENT LI - O (%flow;)* -- list item -->
is that to say "minus %block; from %flow;"?
3. <!ELEMENT BODY O O (%flow;)* +(INS|DEL) -- document body -->
* what's the meaning of "+(INS|DEL)"? is that to say "besides
%flow;, you can also use INS or DEL inside body? if so, why not use
Thanks for your consideration.
Re: A few questions about the html dtd
-(A) is an 'exclusion'. This means that A is not allowed to be a child
element of A - not directly and not at any depth down in the element tree.
The A element is one of the elements listed in %inline;, so the model
group '(%inline;)*' would allow an A element as a direct child of an A. And
other elements in %inline; also allow A as a child, so simply removing A
from the model group would not work as intended (e.g.
<A><SPAN><A>..</A></SPAN></A> would then be valid).
Yes, and not only from the model group of LI, but for every element in a DIR
'+(INS|DEL)' is an 'inclusion'. Just like exclusions mean that the excluded
elements are not allowed anywhere below this element, and inclusion allows
the use of the included elements everywhere. So you are basically allowed
to use INS and DEL at any point in the document, even if these elements are
not explicitly listed in the model group for any other element.
The model group defines which elements are allowed (and in which order) as
direct childs of the declared element. In- and exclusions extend there
scope to every element down in the element tree where the element is being
P.S.: As INS and DEL allow any %flow; element as their childs, something
is actually valid! The HTML specification forbids this, by making further
constraits on the allowed content of INS and DEL, but this cannot be
expressed in the DTD.
Email: pink at odahoda dot de
WWW: http://pink.odahoda.de /