"Schuetz, David" wrote:
> ... Unfortunately, it's a bit uglier than I'd like on the command line. If
> anyone can get "$myType=Full" (or even "$myType='Full'") to work, I'd love
> to use that construct instead...
Run the following from command line: sabcmd templ.xsl data.xml "$par=1"
Template and data files are attached. (Double quotes work in Windows, in bash
you may have to use single quotes instead.)
I guess a similar line has been missing in your attempts: <xsl:param name="par"
select="0"/>
A parameter binding must be created in order to pass it a value. Actually,
<xsl:param name="par"/> is enough, but it seems to be safer to provide a default
value as well.
Regards,
Petr
--
Petr Cimprich
Ginger Alliance Ltd.
www.gingerall.com
<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:param name="par" select="0"/>
<xsl:template match="/">
<html>
<body>
<xsl:value-of select="data/item/text"/>
<xsl:value-of select="$par"/>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0"?>
<data>
<item>
<text>The parameter value is </text>
</item>
</data>