XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Adam Van den HovenSubject: Relative URLs in document() function
Author: Adam Van den Hoven
Date: 04 Oct 2001 05:58 PM
Ok, I've encountered a situation where my expectations of XSL are different than what Stylus is doing.

I have a library file (lib.xsl) that contains the following:

{xsl:parameter name="skin" select="document('../skins/default.xml') /}

I import that library and for testing I don't bother setting the parameter.

My main xsl document has the following path:
d:/projects/project1/datafeeds

The library document is at:
d:/projects/project1/publish/templates

and the skin document is at:
d:/projects/project1/publish/skins

Now my understanding of the XSL spec says that in a situation above where the URI used in document comes from the template, it is resolved relative to the template (in the absence of a second argument). Now since I've defined the URL in the lib.xsl file, the URL should be resolved relative to lib.xsl. That is it should be trying to load

d:/projects/project1/publish/templates/../skins/default.xml

or

d:/projects/project1/publish/skins/default.xml

However, the URL is being resolved relative to my main xsl file resulting in:

d:/projects/project1/datafeeds/../skins/default.xml

or

d:/projects/project1/skins/default.xml

Which doesn't exists (thus the error)

Now which is right? For this project I don't really care since the node set will be set externally before applying the template but fundamentally I need to know.

Adam

Posttop
Minollo I.Subject: Re: Relative URLs in document() function
Author: Minollo I.
Date: 04 Oct 2001 06:17 PM
I think things should work as you are expecting, i.e. the relative path
used in the document() function should be computed relative to the XSLT
file (master, included or imported) which is using it, not always relative
to the master file.

That's also the way relative paths in include/import directives work (in
Stylus Studio too).

We will look into the problem, and have it fixed before 3.1 Final is released.

Thanks,
Minollo

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.