Table of contentsAppendices |
3.4 Conditional SectionsConditional SectionsConditional sections are portions of the Document Type Declaration or of external parameter entities which are included in, or excluded from, the logical structure of the DTD based on the keyword which governs them. Conditional Section
Validity Constraint: Proper Conditional Section/PE Nesting Proper Conditional Section/PE NestingIf any of the " Like the internal and external DTD subsets, a conditional section may contain one or more complete declarations, comments, processing instructions, or nested conditional sections, intermingled with white space. If the keyword of the conditional section is INCLUDE, then the
contents of the conditional section MUST be considered part of the DTD. If the keyword of
the conditional section is IGNORE, then the contents of the conditional
section MUST be considered as not logically part of the DTD.
If a conditional section with a keyword of INCLUDE occurs within
a larger conditional section with a keyword of IGNORE, both the outer
and the inner conditional sections MUST be ignored. The contents
of an ignored conditional section MUST be parsed by ignoring all characters after
the " If the keyword of the conditional section is a parameter-entity reference, the parameter entity MUST be replaced by its content before the processor decides whether to include or ignore the conditional section. An example: <!ENTITY % draft 'INCLUDE' > <!ENTITY % final 'IGNORE' > <![%draft;[ <!ELEMENT book (comments*, title, body, supplements?)> ]]> <![%final;[ <!ELEMENT book (title, body, supplements?)> ]]> |