I want to use a param in a conditional as in:
<xsl:param name="partnumid"></xsl:param>
<xsl:choose>
<xsl:when $partnumid="">
<xsl:apply-templates select="partnum"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="partnum[@id=$partnumid]"/>
</xsl:otherwise>
</xsl:choose>
However, during run time, this exception occurs:
6/14/2006 9:37:20 AM:Search:System.Xml.XmlException: The '$' character,
hexadecimal value 0x24, cannot begin with a name. Line 40, position 15.
So, I can use $partnumid in the select statement (in quotes) but not as
a variable in the when clause.
Is there some other way to express the value of the partnumid?
John Bailo wrote:
Actually, your idea is perfect.
I find some implementation code here:
http://www.ischool.washington.edu/ta...Parameters.htm
That is working for me well.
Thanks for your help!!!
John Bailo wrote:
Martin Honnen wrote:
You should define a global parameter e.g.
<xsl:param name="parameterName" />
in the XSLT stylesheet and then use the API of the XSLT processor to
set that parameter before you run a transformation.
Are you talking about the XslTransform API?
I don't see a member to set a parameter once I've loaded the
stylesheet and prior to running the Transform.
http://msdn2.microsoft.com/en-us/lib...ds(VS.80).aspx