RE: [xsl] get the current xml file name

Subject: RE: [xsl] get the current xml file name
From: Owen Rees <owen.rees@xxxxxx>
Date: Tue, 08 Aug 2006 09:19:34 +0100
--On 08 August 2006 07:42 +0100 Colin Adams wrote:

I would think something like:

document (concat(document-uri(/),'../','nextfile.xml')) should do the

If you are using XSLT 2.0, you can use the resolve-uri function which
will be a bit neater.

If you can use document-uri then you should be able to use resolve-uri - both are new in XPath 2.0.


See also base-uri.

By the way, if there is a function in the XSLT as implemented in popular browsers that allows you to discover the URI of either the XML or the XSLT processing it then I would be interested to know what it is. I was looking for one recently, but could find only the XPath 2.0 functions which are not available in browsers.

Owen Rees
Hewlett Packard Laboratories, Bristol, UK

Current Thread