- From: Norman Walsh <ndw@nwalsh.com>
- Date: Fri, 12 Sep 2014 07:51:33 +0100
- To: public-xml-core-wg@w3.org
- Message-ID: <878ulpuya2.fsf@nwalsh.com>
Hi all,
XInclude 1.1 says:
4.3 Attribute Copying when parse="xml"
XInclude can introduce validity errors into a document. In
particular, if a resource containing element information items is
included more than once, and if any of those element information
items have attributes of type ID, then the result infoset will
contain multiple IDs with the same value.
Some applications will want to attempt to resolve these sorts of
errors and different applications will want to do so in different
ways. In order to facilitate this kind of processing, XInclude 1.1
introduces a new feature: attribute copying.
Any namespace qualified attribute that appears on the xi:include
element will be copied onto every top-level included item that is an
element information item.
If the element information item already has an attribute with the
same qualified name, its value is changed to the value specified on
the xi:include element.
Suppose file.xml consists of a single element: <doc/>, as spec'd, this
Xinclude:
<xi:include href="file.xml" xml:base="subdir/"/>
1. Includes subdir/file.xml
2. Copies the xml:base attribute
The result is:
<doc xml:base="subdir/"/>
which makes the base URI for the doc element
subdir/subdir/file.xml
which is wrong.
I think, alas, that we need special rules form xml:base. Maybe the
simplest thing to do is to say that xml:base and xml:lang aren't
copied because there are separate controls for them.
Another option is to say that if xml:base is copied, the absolute
base URI is used as the attribute's value.
Be seeing you,
norm
--
Norman Walsh
Lead Engineer
MarkLogic Corporation
Phone: +1 512 761 6676
www.marklogic.com
Received on Friday, 12 September 2014 06:52:04 UTC