Thanks for answering Damien Fitzpatrick's question.

Sorry for not tracking the changes made to W3C's specs. We'll update our 
support of XIncludes to the latest spec ASAP (that is, in next version), 
which means:

* We'll continue to use the XInclude 2001 namespace.
* We'll support loading files (for example, created using XXE up to 
V2.6p1) which uses fragments to specify the xpointer.
* From next version, we will save modular XML files using the new 
xpointer attribute instead of the fragment.

---
PS: The new xpointer attribute is a very good thing because %-escaping 
is no longer required.

John L. Clark wrote:
> On Tue, Jun 29, 2004 at 02:28:46AM -0400, Damien Fitzpatrick wrote:
> 
>>> I am running into a problem with the namespace for the
>>> XIncludes.  I am using the latest version of Xerces to process the XML
>>> and hence the XIncludes.  Unfortunately, when it inserts XIncludes XML
>>> Mind uses the XInclude 2001 namespace:
>>> xmlns:xi=3D"http://www.w3.org/2001/XInclude";.  The problem with this is
>>> that Xerces 2.6.2 will not process XIncludes with the 2001 namespace,
>>> they must have the 2003 namespace, e.g.:
>>> xmlns:xi=3D"http://www.w3.org/2003/XInclude";
>>>=20
>>> Is there any way that XML Mind can be made to insert XIncludes with the
>>> 2003 namespace?
> 
> 
> Briefly, Xerces is using a now-deprecated XML namespace.  In order to
> stay conformant into the future, you might be best served by having a
> flexible intermediate processing step to bridge the gap with your
> processor or processors.  I will talk about the issues involved in more
> detail below.
> 
> There are two major things to take into consideration when dealing with
> the XInclude specification.  First, you have to get the namespace
> correct.  The original namespace was <http://www.w3.org/2001/XInclude>,
> then, for a time, it became <http://www.w3.org/2003/XInclude>, and it
> has now been reverted to <http://www.w3.org/2001/XInclude>.  This means,
> as you are seeing, that some processors which implemented the second
> namespace will need to be updated to stay conformant.
> 
> XXE had not updated its processing to the second namespace.
> Effectively, this means that XXE intended to stay within the syntax and
> semantics of the first namespace (which is why the second namespace was
> created, to give users the choice).  By reverting the newest
> specification to use the older namespace, the W3C is effectively saying
> that XInclude users should not use the older syntax and semantics.  If
> they do, they will be non-conformant.  As a result, in its current
> state, XXE is non-conformant by no fault of its own.
> 
> Second, you have to deal with the XPointer component of the inclusion.
> This is where the conformance really makes a difference.  Originally,
> you could place the XPointer after the # in a URL.  In the
> <http://www.w3.org/2003/XInclude> namespace, this was changed so that
> the XPointer goes in its own attribute (xpointer).  In the most recent
> revision (which reverts the namespace), this xpointer addition is
> maintained, so any users of the <http://www.w3.org/2001/XInclude> and
> the original syntax automatically are broken.  This is the state of XXE.
> It uses the most recent XML namespace but not the most recent syntax and
> semantics.
> 
> What you need, then, is a simple transformation to allow a processor
> still using the <http://www.w3.org/2003/XInclude> namespace to use the
> XIncludes from the current namespace with older syntax.  For a somewhat
> naive implementation of this transformation, see the attachment.
> Obviously, you will not be able to use the output in XXE.  The output is
> meant for use by Xerces.  It could be easily adapted to update the old
> syntax to the new without changing the namespace, but I'll leave this as
> an exercise for the reader.  You can use this from the command line or
> integrate it into an XXE macro.


Reply via email to