Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In the previous two chapters, you learned how to create DTDs. In this chapter, you’ll learn how to use them.
Specifically, a DTD defines rules for every element and attribute that can appear in an XML document. However, you must declare the DTD in your XML document in order to use it. Once this declaration is made, you can use various tools to validate the XML document against the DTD. This is the reason for creating a DTD in the first place, to insure that a given XML document is constructed in a specific way as defined by the DTD.