Lists Home |
Date Index |
From: "Elliotte Rusty Harold" <email@example.com>
> Try not to confuse entity processing with XIncludes. They are two
> different things. XInclude does not separate the logical and physical
> views of a document. XInclude does not define new logical or physical
> models for existing documents. All it does is define a process that
> goes from one document to another document.
Is the difference so simple?
Let us look at ID and IDREF checking. With XML 1.0, because entities
must be included (for validity) we have all the information to decide
if IDs are unique and IDREFs correspond to IDs.
Using XInclude, in order to check XML Schema's keyref/uniqueness constraints,
we will need to work off the included document (unless the inclusions
are arranged so that all keyref/uniqueness contexts are scoped within
a single document each.)
If key/uniqueness is an important consideration, then XInclude has to
work exactly the same as XML 1.0 does now. It is just a syntax
Note also that because of WF rules, you can parse an XML document
one entity at a time, as separate parallel threads that, say, insert their
completed DOM branch when they are finished. In other words,
entity inclusion can be performed independent of parsing even in XML 1.0.
Most XML application bundle them together, because they
feed into SAX streams: it is more straightforward that way.
So I doubt that XInclude actually should be seen as a replacement
for low-level entities, despite its sales pitch. It seems more
useful for "SUBDOC" inclusions (in SGML terms) where
one might expect or use a different namespace.