HTML and CSS Reference
In-Depth Information
15.2. Documents and DTDs
To be perfectly correct, we must explain that "XML" has come to mean
many subtly different things. An XML document is a document containing
content that conforms to a markup language defined from the XML stand-
ard. An XML Document Type Definition (XML DTD) is a set of rulesmore
formally known as entity and element declarationsthat define an XML
markup language; i.e., how the tags are arranged in a correct (valid)
XML document. To make things even more confusing, entity and element
declarations may appear in an XML document itself, as well as within an
An XML document contains character data, which consists of plain con-
tent and markup in the form of tags and XML declarations. Thus:
is a line in a well-formed XML document. Well-formed XML documents
follow certain rules, such as the requirement for every tag to have a clos-
ing tag. These rules are presented in the context of XHTML in Chapter
16 .
To be considered valid a valid XML document conforms to a DTDevery
XML document must have a corresponding set of XML declarations that
define how the tags and content should be arranged within it. These de-
clarations may be included directly in the XML document, or they may be
stored separately in an XML DTD. If an XML DTD exists that defines the
<blah> tag, our well-formed XML document is valid, provided you preface
it with a <!DOCTYPE> tag that explains where to find the appropriate DTD:
<?xml version="1.0"?>
<!DOCTYPE blah SYSTEM "blah.dtd">
Search WWH ::

Custom Search