Chapter 3: DTD Editing and Validation

Download CD Content


In This Chapter

  • Building content models for XML documents

  • Editing DTDs with XMLSPY

  • Validating XML documents with XMLSPY

  • Converting XML documents with XMLSPY

This chapter is all about building your very own, customized markup languages using XMLSPY. You can use XML to describe anything imaginable—purchase orders, books, scientific data, medical records, literally anything! When you build a custom markup language, you define all the allowable XML structures—elements, attributes, and entities—along with any restrictions or constraints on those structures.

Your custom markup language has to be expressed in a schema language, and historically, the most common schema language has been a Document Type Definition (DTD). In this chapter, I cover DTD syntax in detail. You learn how to develop a DTD and then use it to validate your own XML documents within the XMLSPY editing environment. I discuss various DTD design strategies and some of XMLSPY’s helpful DTD editing functionality, such as the capability to automatically generate a DTD. Finally, I offer some tips on how to make a modular DTD, and I highlight some of the differences between DTDs and XML Schemas (the technological successor of DTDs). I also provide the pros and cons of using DTDs and XML Schemas.

The XMLSPY Handbook
The Official XMLSPY Handbook
ISBN: 764549642
EAN: 2147483647
Year: 2001
Pages: 121
Authors: Larry Kim © 2008-2017.
If you may any questions please contact us: