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 15:45:23 +0100
--On 08 August 2006 10:16 +0100 andrew welch wrote:

On 8/8/06, Owen Rees <owen.rees@xxxxxx> wrote:

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.

You have to pass them in as parameters, it's the only way in 1.0. If you think about it you don't need to "discover" the filenames as you've just instigated the transform (unless the user has opened an xml file with stylesheet-pi of course)

The scenario I was interested in is where you follow a link to an XML file that contains a stylesheet-pi and the transform performed in the browser depends on the URL so that you can have more than one view of the same content. The URL of the XML is well defined here, but as far as I can tell, inaccessible to the transform the browser is running.

Owen Rees
Hewlett Packard Laboratories, Bristol, UK

Current Thread