Question

I want to use 2 variables called SOURCE and DEST. In that manner my perl script will use

SOURCE="Bonn";

DEST="Berlin";

Then I will call the xslt2.0 transformation from my perl script.

<xsl:param name="SOURCE"/>
<xsl:param name="DEST"/>

<xsl:variable name="start" select="//S[@id=$SOURCE]/T[@id=$DEST]"/>

<!--<xsl:variable name="start" select="//S[@id='Paris']/T[@id='London']"/> -->

It happens that I do not write correctly the line (as this xslt foes not return any rows):

<xsl:variable name="start" select="//S[@id=$SOURCE]/T[@id=$DEST]"/>

Could you kindly correct my XSLT syntax ?

Was it helpful?

Solution

I think the problem is simply calling Saxon the right way, if you use the command line interface then I think you need to use e.g. transform.exe -s:file.xml -xsl:sheet.xsl -o:result.xml SOURCE=Bonn DEST=Berlin.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top