- From: Elliotte Rusty Harold <elharo@metalab.unc.edu>
- Date: Tue, 8 Oct 2002 07:25:48 -0400
- To: www-xml-xinclude-comments@w3.org
Consider the following documents:
<?xml version="1.0"?>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="http://www.w3.org/TR/#xpointer(//p)" />
<?xml version="1.0"?>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="text" href="http://www.example.com/" />
<?xml version="1.0"?>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="text" href="http://www.example.com/">
<xi:fallback>
<p>element 1</p>
<p>element 2</p>
</xi:fallback>
</xi:include>
All three seem to result in a document with multiple roots, or
perhaps a document fragment in DOM terms rather than a full document.
Such a thing does not have an infoset according to section 2.1 of the
Infoset spec which states, "There is exactly one document information
item in the information set, " and then goes to state that each
document information item has exactly one element in its children
property. Thus this is a qualitatively different issue than an
unserializable synthetic infoset. A rootless or multirooted document
is not legal as an infoset.
The XInclude processing model does not address this point. That is,
it does not say what happens when the processing model results in an
illegal infoset.
I suspect the attempt to create such a thing should be a fatal error.
However, whatever the specific error (or even non-error) is chosen
here, this possibility should be explicitly addressed in the spec.
Users and implementers should not have to infer the meanings of these
documents by piecing together implications in other specs.
--
+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo@metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
| XML in a Nutshell, 2nd Edition (O'Reilly, 2002) |
| http://www.cafeconleche.org/books/xian2/ |
| http://www.amazon.com/exec/obidos/ISBN%3D0596002920/cafeaulaitA/ |
+----------------------------------+---------------------------------+
| Read Cafe au Lait for Java News: http://www.cafeaulait.org/ |
| Read Cafe con Leche for XML News: http://www.cafeconleche.org/ |
+----------------------------------+---------------------------------+
Received on Tuesday, 8 October 2002 07:30:25 UTC