Subject: Re: [xsl] Accessing the XML file name from an XSL Transform From: Michael Kay <mike@xxxxxxxxxxxx> Date: Mon, 15 Nov 2010 18:51:12 +0000 |
Ok. I'm missing a little bit more, I'm afraid. I think this is to do with variable scope, but I'm stood ready to be corrected.
I''ve got this:-You want something like:
8<---------------- <?xml version="1.0"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" indent="yes" name="TextFormat" omit-xml-declaration="yes"/> <xsl:param name="OutputPath" /> <xsl:variable name="FileFullPathName" select="document-uri(/)"/> <xsl:variable name="FileName" />
<xsl:template match="/hello-world"> <xsl:analyze-string select="$FileFullPathName" regex="[^/]+$"> <xsl:matching-substring> <xsl:variable name="FileName" select="." /> </xsl:matching-substring> </xsl:analyze-string> </xsl:template>
<xsl:variable name="FileName"> <xsl:analyze-string .... </xsl:analyze-string> </xsl:variable>
Michael Kay Saxonica
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Accessing the XML file na, Neil Owens | Thread | [xsl] selecting a element without i, srinivasan.p |
RE: [xsl] Accessing the XML file na, Neil Owens | Date | [xsl] replacing of characters based, ram |
Month |