p. 319: There's a [ missing from the first line of all the IGNORE and INCLUDE
sections on this page. For instance, the first code fragment should be:
<![ IGNORE [
declarations that are ignored
]]>
instead of
<![ IGNORE
declarations that are ignored
]]>
The entire page should read:
Conditional Sections in DTDs
When developing DTDs or documents, you may need to comment out parts of the DTD not yet reflected in the documents. In addition to using comments directly, you can omit a particular group of declarations in the DTD by wrapping it in an
IGNOREdirective. The syntax follows:<![ IGNORE [ declarations that are ignored ]]>As usual, white space doesn't really affect the syntax, but you should keep the opening
<![ IGNORE [and the closing]]>on separate lines for easy viewing.You can ignore any declaration or combination of declarations ‹ elements, entities, attributes, or even other
IGNOREblocks ‹ but you must ignore entire declarations. TheIGNOREconstruct must completely enclose the entire declarations it removes from the DTD. You cannot ignore a piece of a declaration (such as theNDATA GIFin an unparsed entity declaration).You can also specify that a particular section of declarations is included ‹ that is, not ignored. The syntax for the INCLUDE directive is just like the IGNORE directive but with a different keyword:
<![ INCLUDE [ declarations that are included ]]>When an
INCLUDEis inside anIGNORE, theINCLUDEand its declarations are ignored. When anIGNOREis inside anINCLUDE, the declarations inside theIGNOREare still ignored. In other words, an INCLUDE never overrides anIGNORE.Given these conditions, you may wonder why
INCLUDEeven exists. No DTD would change if allINCLUDEblocks were simply removed, leaving only their contents.INCLUDEappears to be completely extraneous. However, there is one neat trick with parameter entity references and bothIGNOREandINCLUDEthat you can't do withIGNOREalone. First, define a parameter entity reference as follows:<!ENTITY % fulldtd "IGNORE">
You can ignore elements by wrapping them in the following construct:
<![ %fulldtd; [ declarations ]]>