This uniformity helps make these technologies easy to learn, and it means developers are able to leverage existing XML tools.This places DTDs at a disadvantage because developers must learn an additional syntax in order to define their XML schemas--but DTDs also have more severe restrictions.The actual validation is performed by the Xerces2 library.When parsing an XML document a reference to a grammar (either DTDs or XSDs) is found, then the parser attempts resolve the grammar reference by following either the XSD xsi:schema Location, xsi:no Namespace Schema Location hints, the DTD DOCTYPE SYSTEM information, or by outsourcing the retrieval of the grammars to an Xml Catalog resolver.DTDs are written in a syntax other than XMLs' and rely upon post-processing for validation. However, DTDs are a step behind the direction XML technologies are evolving: they don't support namespaces, and they use a non-XML syntax.The most serious problem with DTDs is that they do not support namespaces, a critical flaw since namespaces are a very powerful aspect of XML.The inability to validate DTD-declared XML documents with namespaces prevents XML application developers from taking advantage of namespaces in their business logic.Most XML technologies (RDF, XSLT, and XLink) and schema languages (RELAX, XML Schema, SOX) are represented as XML.
Consider the following XML: If one constraint on such a document is that a short Story element may only contain an author attribute if it isn't the child of anthology element, it wouldn't be possible to represent that constraint in a DTD.
A person can verify if the documents adhere to a set conventions about how vehicle elements should be used.
For example, a person can tell that the this XML instance is invalid: We know that a motorcycle typically has two wheels and doesn't have a sunroof.
DTDs were the first standard mechanism for XML validation, and for all practical purposes still are.
They define the roles and structure of XML elements.
e Xist-db supports implicit and explicit validation of XML documents.