Subject: Re: [xsl] XSL-> Access to the XML Source Filename? From: Mukul Gandhi <mukul_gandhi@xxxxxxxxx> Date: Mon, 8 Nov 2004 08:38:13 -0800 (PST) |
With XSLT 1.0 , I believe you cannot. You could pass the XML file name as parameter to the processor with 1.0 .. With XSLT 2.0, I think you can do it with document-uri function .. I just tried with Saxon 8 and it works .. The XSL is - <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:output method="text"/> <xsl:template match="/"> <xsl:value-of select="document-uri(.)" /> </xsl:template> </xsl:stylesheet> When it is applied to a XML file xmlfile.xml , it returns result like file:/D:/xml/xsl/xmlfile.xml Regards, Mukul --- news@xxxxxxxxxxx wrote: > is there any way to get access to the name of the > XML file I'm currently > tranferring? I hope you mean transforming.. __________________________________ Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] XSL-> Access to the XML Sourc, news | Thread | [xsl] Count words and add line-brak, Jacobus van Niekerk |
[xsl] Count words and add line-brak, Jacobus van Niekerk | Date | Re: [xsl] document(), Oleg Tkachenko |
Month |