![]() |
A way of including or excluding sections in the DTD is to use conditional sections. Conditional sections are of most use when linked to a parameter entity reference, and may only be used in an external DTD subset. The two conditional section statements are IGNORE and INCLUDE.
<![ IGNORE [ markup declarations ]]> |
<![ INCLUDE [ markup declarations ]]> |
Example: |
---|
<!ENTITY % draft "INCLUDE"> <!ENTITY % final "IGNORE"> <![%draft;[ <!ELEMENT book (title,author,summary)> ]]> <![%final;[ <!ELEMENT book (comments*,title,author,summary)> ]]> <!ELEMENT comments (#PCDATA)> <!ELEMENT title (#PCDATA)> <!ELEMENT author (#PCDATA)> <!ELEMENT summary (#PCDATA)> |
Rules:
Note:
<<Previous |
Section Contents
Main Contents |
Next>> |