Pages

Friday, May 20, 2011

Use the ANY keyword in your DTD to allow any elements and content

In instances where you want any element or character data to be available and order doesn't matter, you can use the ANY keyword in your DTD to make all elements usable, as in:

<!ELEMENT mydoc ANY >

The most common purpose for using ANY is when you're creating a DTD for existing content. This allows you to tag your data while the DTD is being developed. Then, as common patterns appear, you can redefine your DTD more tightly and modify your content as needed to meet the final requirements.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.