OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] XLink, XInclude, and xml:base

[ Lists Home | Date Index | Thread Index ]

In article <8D1E3CF2596C6745A9D1765D67B12EE12C560D@esealmw109.eemea.ericsson.se> you write:

>  <list xmlns:xlink="http://www.w3.org/1999/xlink";
>        xml:base="common/policy.xml">
>    <item xml:id="item1">The customer is always right.</item>
>    <item>When the customer is wrong, see <link xlink:type="simple"
>                                                xlink:href="#item1"/>.</item>

>My problem is that the link points to
>http://example.com/common/policy.xml#item1, but I really want it to
>point to #item1 in the XIncluded result.

You're in luck: it *does* point to #item1 in the XIncluded result,
because "#item1" is a same-document reference regardless of the
current base URI.

How this is determined to be the case depends on whether you use the
old or new URI spec.

If you use the old one (RFC2396), "#item1" is a same-document reference
because the non-fragment part is an empty string and the relative uri
resolution algorithm says that that means a same-document reference.

If you use the new one (RFC3986), "#item1" is a same-document
reference because the relative uri resolution algorithm produces a
non-fragment part "http://example.com/common/policy.xml"; that is the
same as the base URI, and that is the new definition of same-document
reference.

Either way it is a same-document reference, and thus points to #item1
in the result document.

-- Richard




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS