0

I wonder, does xsl:include command supports absolute virtual path? For ex. statement with relative path

<xsl:include href="../example.xsl"/>

works absolutely fine. But when i pass an absolute virtual path

<xsl:include href="/some_folder_inside_root/example.xsl"/>

i get an error message that current file cannot be located. Both paths point to the same file and are correct if i'm using them as href in plain html.

Mathias Müller
  • 22,203
  • 13
  • 58
  • 75
Kshatra
  • 369
  • 1
  • 4
  • 12

1 Answers1

2

The href attribute is a URI (not a file name). Your example "/some_folder_inside_root/example.xsl" is not an absolute URI, it is a relative URI. If your base URI (the URI of the main stylesheet) is an http URI, then it will select from the root folder of that web site.

If you want to use rooted file name, use the absolute URI file:///some-folder/example.xsl.

Daniel Haley
  • 51,389
  • 6
  • 69
  • 95
Michael Kay
  • 156,231
  • 11
  • 92
  • 164
  • I'm sorry, maybe i just used wrong terminology. By absolute virtual path i meant the root folder of my web site. Thanks for the answer! – Kshatra Mar 24 '14 at 08:39