RE: [xsl] xsl:include still a problem..

Subject: RE: [xsl] xsl:include still a problem..
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Thu, 15 Feb 2001 17:42:58 -0000
> Ok..I don't know why, but for what ever reason, I can not get the XSL
> included files to work. No matter what I do, it keeps looking
> in c:\orion\
> for all my files. If I do
>
> <xsl:include href="/path/page.xsl"/>
>
> It looks for c:\orion\path\page.xsl
>
> If I put the include file in the SAME path as the XSL page
> trying to include
> it, which according to the spec should work, it still looks
> in c:\orion
> folder. I am not sure why it keeps look in that folder, instead of the
> web-app root. I am now using Saxon 6.2, and still seem to get
> this problem.
> Is there something that has to be set in every XSL page (or
> maybe once to
> the saxon library before any XSL processing is done) to tell
> it to use the
> default web-app?

"/path/page.xsl" is a relative URI; you could use
http://localhost/path/page.xsl for an absolute URI. If you give a relative
URI, Saxon tries to resolve it relative to the base URI of the stylesheet.
In previous releases, if this was unknown, it gave you an error. In 6.2, it
defaults to the current directory. The best approach is to make sure Saxon
knows the base URI of the stylesheet, which you can achieve by using
setSystemId() on the source object when it is loaded, or by including an
absolute xml:base URI within the document itself.

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread