|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XLink, XInclude, and xml:base
In article <8D1E3CF2596C6745A9D1765D67B12EE12C560D@e...> 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








