Chapter 5. XML Design

In which we dig up a rock and discover the secrets of time.

The beauty of XML is its flexibility. It's a toolkit with which you build your own markup language to meet your particular needs exactly, because you design it.

The focus of this chapter is on building an XML DTD (document type definition). However, the DTD is only one way to build an XML design. For example, an XML Schema, which is discussed in Chapter 7, and XDR (XML Data–Reduced), which is discussed in Chapter 8, are other means of creating an XML design used in different contexts. The principles discussed in this chapter can be applied to these other methods as well.

It's worthwhile to focus on DTDs because the DTD is the most essential form of XML design. Understanding DTDs, which date back to SGML days, gives you insight into how XML works, so even if you don't intend to build a DTD, read on.

We'll start our XML design by creating dummy XML instances, which give a good idea of what our real XML instances are going to look like, the elements we'll need, and the attributes those elements should have. Then we'll put together a DTD based on these dummy instances, fleshing it out to take into account possibilities we may not have put into the dummy instances. At the end of this process, we'll have a DTD (for the complete DTD for the CyberCinema example, see the Appendix) and some sample XML files that can be used as test files during the subsequent development process.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset