Re: [xsl] Include files with relative path

Subject: Re: [xsl] Include files with relative path
From: Joerg Pietschmann <joerg.pietschmann@xxxxxx>
Date: Wed, 30 Jan 2002 17:59:14 +0100
"Miguel Angel Medina Lopez" <mamedina@xxxxxxxxxxxxxxxxx> wrote:
> I want to include a xsl file within other and use <include> tag. The problem
> is that the file that use <include> is call with a file:// URI, and I want
> to include using relative path, however, if I use <include
> href="../included.xsl"/> an error occur (not file found).

The relative URL is resolved against the location of the style
sheet which does the include. For example, if you use 
  /foo/bar/mumble.xsl
then <xsl:include href="../include.xsl"/> will be resolved to
  /foo/include.xsl
If include.xsl includes ../baz.xsl, this will be resolved to
  /baz.xsl
(i think)
Check whether your files are all in the expected locations.
You may want to check your stylesheet with Saxon, which IIRC
mentions the absolute URL of the file it doesn't find, this
would surely help you.

HTH
J.Pietschmann

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


Current Thread