Enforcing XML Document Structure
If XML is used to transfer information between applications, there needs to be a mechanism for ensuring that the XML is not only syntactically correct but also is structurally correct. In fact, there are two common mechanisms for this:
Document Type Definitions
DTDs were the original form of validation but could not be manipulated by the same tools (such as JAXP, which is discussed on Day 16) as the XML documents they described. This was seen as a disadvantage of DTDs, and XML Schemas were defined as XML documents that define the structure of other XML documents. And before you ask, yes there is an XML Schema that defines the XML Schema structure (see http://www.w3.org/2001/XMLSchema.xsd); there is ...