Jump to content

Getting filename from file being trasformed


Guest willem2

Recommended Posts

Guest willem2

I want to use the filename of the file being transformed, using a stylesheet.Is there a way to accomplish this?I've tried e.g. <xsl:value-of select='/'/>, but that outputs the string-value of the root element, rather than the filename of the xml file being transformed.

Link to comment
Share on other sites

As far as I know, XPATH (the language of XSLT) does not provide a mechanism for dealing with anything other than the XML tree contained in the file (or memory stream, or data island, or whatever the container may be).You may be able to use a Javascript or VBScript extension and create an instance of the FileScriptingObject, but even then, it won't be able to derive the name.To accomplish what you want, you'll need to pass the filename in as a parameter.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...