Improving on Well-Formedness with Schemata or DTDs
As you learned in the previous section, a well-formed document ensures that the parser can complete the rendering of the document. But well-formedness is really only the first step. The effective exchange of data not only requires a successful parsing of a document and data, but some assurance that the content of the document structures conform to any desired constraints.
For instance, the ordered list element (ol) used previously in the memo found in Listings 10.1–10.3 is designed to contain only one or more list item elements (li). That constraint can't be checked nor can it be enforced through the state of being well-formed.
What's needed, then, is a second set of rules that a document can ...
Get XHTML by Example 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.