开发者

how to pass a parameter and use that in my xslt

开发者 https://www.devze.com 2023-01-27 23:39 出处:网络
i have a xml file and a related xslt file. I am using msxsl.exe and i need to pass a parameter as a command line argument and use that in my xslt file.

i have a xml file and a related xslt file. I am using msxsl.exe and i need to pass a parameter as a command line argument and use that in my xslt file. how can i do that???

command:

msxsl.exe country.xml sheet.xslt -o country_sheet开发者_如何学运维.html p1="india"

how to retrieve the value india in my xslt file?


try this

<xsl:param name="p1" select="p1"/>

this would be outside any templates, acting somewhat like a global variable

yes then to use the contents of this you could use this inside a template

<xsl:value-of select="$p1"/>
0

精彩评论

暂无评论...
验证码 换一张
取 消