Creating a DTD

To create a legal DTD, you need to know how to produce a DTD that conforms to the requirements of the XML 1.0 Recommendation. For full details, refer to the XML 1.0 Specification of February 1998:

http://www.w3.org/TR/1998/REC-xml-19980210.

As you saw earlier, a DOCTYPE Declaration is the means by which you associate a DTD with an XML document. The DOCTYPE Declaration occurs in the prolog of an XML document, before any document elements. It is preceded by the XML Declaration (if one is present in the document) and can also be legally preceded by processing instructions and by comments.

As you have seen, the DOCTYPE Declaration can either point to an external DTD file, include an internal DTD, or it can utilize both. In the latter ...

Get Platinum Edition Using XHTML™, XML, and Java™ 2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.