TopicsNext topics |
Valid XMLThis tutorial is designed as an introduction to valid XML document creation. The well formed XML tutorial is a good prerequisite to this tutorial because all XML documents, well formed and valid, must be at least well formed. By using this tutorial, you will learn how to write valid XML and will create a valid XML document. If you become confused, look to the examples within this tutorial or review the well formed XML tutorial. The primary difference between valid and well formed XML is their relationship to a document type definition. Well formed XML is designed for use without a DTD, whereas valid XML explicitly requires it. A DTD is a set of rules that a document follows, which software may need to read before processing and displaying a document. These rules generally state the name and contents of each element and in which contexts it can and must exist. Paragraph elements might be defined as containing keyword and code elements and as existing within section and note elements. Valid XML documents may employ certain advanced features of XML, which are not accessible to well formed documents, because of their lack of a DTD. These features can significantly improve the usability of a document, including: linking mechanisms, entities and attributes. Most XML Web sites are likely to be composed of valid XML documents, conforming with customized DTDs, allowing their creators the freedom to structure their sites and use much greater feature sets than HTML has traditionally allowed. Valid XML documents offer much more to the document process than their well-formed counterparts. Document authoring, processing, storage and display are made easier because documents exist in a structured environment. Authors must create documents against a pre-defined structure and benefit from a clear document model. Like well-formed XML, valid documents must be accompanied by stylesheets to achieve aesthetic display. The use of CSS, XSL or DSSSL stylesheets for valid documents is exactly the same as in well-formed documents, except that stylesheets can be created against a DTD, as opposed to a relatively unknown use of markup. <Beginning of Document> <Table of Contents> <Previous> <Next> |