DTD code section confuzzles: (%block;|SCRIPT)+ +(INS|DEL)
Posted: Sat Jun 04, 2005 5:35 pm
Here is the segment in the DTD:
I can't figure out what the first line means. Anyone know? I've been using http://www.w3schools.com/dtd/default.asp as a reference, and it doesn't say anything about the leading + before (INS|DEL). The DTD is none other than HTML 4.01 Strict.
Edit -- Hmm.. perhaps this is related?
That seems to be adding %head.misc to the acceptable content of $head.content. But why not:
Edit 2 -- Did a little more research, and I found another example of this-like syntax:
Which poses this interesting question: perhaps the -(FORM) or +(INS|DEL) means that it applies for all descendants of this thing (which means that - excludes and + adds)? Very interesting, behavior of all of the included seems to match this.
I'd hate to go about having the wrong idea though. Does this make sense? Can someone confirm it means this?
Code: Select all
<!ELEMENT BODY O O (%block;|SCRIPT)+ +(INS|DEL) -- document body -->
<!ATTLIST BODY
%attrs; -- %coreattrs, %i18n, %events --
onload %Script; #IMPLIED -- the document has been loaded --
onunload %Script; #IMPLIED -- the document has been removed --
>Edit -- Hmm.. perhaps this is related?
Code: Select all
<!ELEMENT HEAD O O (%head.content;) +(%head.misc;) -- document head -->Code: Select all
<!ELEMENT HEAD O O (%head.content;|%head.misc;) -- document head -->Code: Select all
<!ELEMENT A - - (%inline;)* -(A) -- anchor -->
...
<!ELEMENT PRE - - (%inline;)* -(%pre.exclusion;) -- preformatted text -->
...
<!ELEMENT FORM - - (%block;|SCRIPT)+ -(FORM) -- interactive form -->
...
<!ELEMENT LABEL - - (%inline;)* -(LABEL) -- form field label text -->
...
<!ELEMENT BUTTON - -
(%flow;)* -(A|%formctrl;|FORM|FIELDSET)
-- push button -->
...
<!ELEMENT TITLE - - (#PCDATA) -(%head.misc;) -- document title -->I'd hate to go about having the wrong idea though. Does this make sense? Can someone confirm it means this?