- 99 -
example, Title may refer to a book’s name or describe how to address a person (Mr.,
Mrs., or Ms.).
•
Namespaces are easy to use; however, they are not necessarily less verbose. Recall
the W3C’s intentions behind XML: “Terseness in XML markup is of minimal
importance.”
•
Namespaces give you a unique way for naming each attribute and element. This feature
gives you a great amount of control over manipulating the values of attributes and
elements for unique formatting purposes or for taking the values and performing further
processing.
Summary
In this chapter, we went through a lot of effort trying to describe the basics and underlying
semantics of the XML syntax as well as how to go about making DTDs for describing the
structure of your data. These basics are useful as they help you create XML applications.
Nothing is worse than making an application for something whose specs are not well
understood. We hope that after reading this chapter, you’ve eliminated that problem.
We also made many references to what the parser’s reaction to syntax is like. These are
important to you as a programmer because the parser can do a lot of the grunt work
associated with making applications. The parser can take care of basic error-checking
functions—checking that the markup is well formed and that it is valid against the DTD or
schema—which often make up more than half the code of an application. You can
bypass a lot of this by using a standard parser, which is why we spent so much time
describing the parser’s reactions to different scenarios.
Finally, all the information in this chapter is a building block to help you on your way to
creating the next generation of applications across the Web. Now that you’ve got the
basics nailed down, you can move on to the more challenging aspects of creating
applications with XML.