Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Question: relationship between XML Infoset, DTD and XML Schema [Thread Next] Re: Question: relationship between XML Infoset, DTD and XML SchemaTo: NULL Date: 5/5/2009 11:26:00 PM Generic Usenet Account wrote: > My apologies for this basic question. Kindly explain to me the > relationship/difference between XML Infoset, DTD and XML Schema. I > know the difference between DTD and XML Schema, but however hard I > try, I just don't seem to understand what Wikipedia says about XML > Infosets. Any insight will be appreciated. The XML Infoset is the abstract description of what meaningful information an XML document might contain, including DTD, Schema, Namespace, base URI, and so on. Ideally, the other XML Recommendations would all have been defined in terms of their relationship to the Infoset. Unfortunately, for reasons having to do with getting XML accepted quickly, we had to do things backward. The XML document syntax and DTDs were designed first by substisetting SGML, then the DOM and SAX APIs and the XPath Data Model were created to work with the implied infoset, then namespaces and schemas came in. The result is that the XML world is not completely consistent in how it expresses things. And -- again unfortunately, in my opinion -- rather than forcing the various existing tools and Recommendations to reconcile with each other, the Infoset designed in an escape hatch: it is in theory normative, but in practice everything in it is optional... so if you want to present the document's data in a different way, you can drop part of the Infoset and add that alternative, yet still claim to be a correct implementation of the Infoset. (The standard bad joke was that "my refrigerator is a correct implementation of the Infoset -- if you hand it an XML document, it displays none of the content.") This is all slowly being shuffled through; everyone is gradually moving closer to the Infoset's nomenclatures and formalisms. If you're designing anything new for the XML world, you should define it in terms of the Infoset, either directly or indirectly. (XPath 2.0, XSLT 2.0, and XQuery are defined in terms of a data model which is in turn defined in terms of the Infoset.) If you're just using XML, you may not need to fully understand the Infoset immediately, but you'll pick up more and more of it as you go along. | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
