[XML-DEV Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Re: XLink, XInclude, and xml:base
On 9/27/05, Magnus Henriksson (MO/EAB) <magnus.henriksson@e...> wrote:
[...] If run document.xml through an XInclude processor, I get the following result:
<?xml version="1.0"?> <document xmlbase="http://example.com"
xmlns:xi="http://www.w3.org/2001/XInclude" > <paragraph>How to handle customers:</paragraph> <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> <graphic xlink:type="simple" xlink:actuate="onLoad" xlink:show="embed"
xlink:href=""../images/happy-customer.gif"/> </list> </document>
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. The
graphic points to http://example.com/images/happy-customer.gif which is what I want.
I think using xpointer here() function and then a relative addressing is not the best way to make
iter-document xlink references survive the inclusion processus. see
http://www.w3.org/TR/xptr-xpointer/#b2b1b1b3b7b5
the syntactic construct
xlink:href=""#xpointer(here()/id('item1'))"
should work I think at least for implementation not limited to the REC sanctified very limited subset.
The same principle should work for structure based relative links too assuming the relative pointer operates
within the included subset.
Daniel
|
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
RSS 2.0 |
|
Atom 0.3 |
|
|
Stylus Studio has published XML-DEV in RSS and ATOM formats,
enabling users to easily subcribe to the list from their preferred news reader application.
|
Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website.
they were not included by the author in the initial post. To view the content without the Sponsor Links please
click here.
|
|