xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David_Mars...@lotus.com
Subject Re: Preventing arithmetic parsing of expressions that look like arith metic
Date Mon, 30 Oct 2000 21:57:18 GMT

Steve Cohen writes:
>I define a parameter in a stylesheet:
> <xsl:param name="season" select="2000-01"/>
>When I output the value of "$season" somewhere, I get "1999".
>It is performing the subtraction it thinks I want.

Try <xsl:param name="season" select="'2000-01'"/>, which has
the two sets of quotes. If that doesn't work, or if you want
more flexibility, try
<xsl:param name="season" select="concat('2000','-01')"/>
The concat() function coerces each of its arguments to be a
string before concatenating them.
.................David Marston

View raw message