The XML specification defines conditional sections of your DTD so that you can decide to include or exclude portions of your DTD. The conditional sections can occur only in the external subset of the DTD and in those external entities referenced from the internal subset. The syntax is shown here:
<![ INCLUDE [ <!--The declarations you want to include--> ]]> <![ IGNORE [ <!--The declarations you want to ignore--> ]]> |
If you combine these conditional sections with parameter entities, you will have a way to include and exclude blocks of text by changing the values of the parameter entities. For example, if you wanted to include declarations that could be used for debugging your application, you could add the following declaration:
<!ENTITY % debug "INCLUDE"> <![ %debug; [ <!--Debugging code here --> ]]> |
You could turn debugging off by changing the entity declaration as follows:
<!ENTITY % debug "IGNORE"> |