Share this Page URL
Help

Section A.3. Tools for Processing XML - Pg. 190

not the DTD itself. You could use the same DTD to define person , name , or national ity as the root element of a valid document. Certain DTDs, such as the DocBook DTD for technical documentation (see http://www.docbook.org), use this feature to good effect, allowing you to provide the same DTD for multiple document types. A validating XML processor is obligated to check the input document against its DTD. If it does not validate, the document is rejected. To return to the phone book example, if your application validated its input files against a phone book DTD, you would have been spared the problems of debugging your program and correcting your friend's XML, because your application would have rejected the document as being invalid. While some of the programs that read RSS files do worry about validation, most do not. XML Namespaces XML 1.0 lets developers create their own elements and attributes, but it leaves open the potential for overlapping names. "Title" in one context may mean something en- tirely different than "Title" in a different context. The "Namespaces in XML" specifi- cation (which can be found at http://www.w3.org/TR/REC-xml-names) provides a mechanism developers can use to identify particular vocabularies using Uniform Re- source Identifiers (URIs). RSS 1.0 uses the URI http://purl.org/rss/1.0/ for its base namespace. The URI is just an identifier -- opening that page in a web browser reveals some links to the RSS, XML 1.0, and Namespaces in XML specifications. Programs processing documents with