Question: relationship between XML Infoset, DTD and XML Schema

  • Thread starter Generic Usenet Account
  • Start date
G

Generic Usenet Account

Hi,

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.

Thanks,
Ramesh
 
J

Joe Kesselman

Generic said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top