You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by Steve Cohen <St...@ignitemedia.com> on 2000/10/30 22:44:54 UTC
Preventing arithmetic parsing of expressions that look like arith
metic
I define a parameter in a stylesheet:
<xsl:param name="season" select="2000-01"/> <!-- default season -->
When I output the value of "$season" somewhere, I get "1999". It is
performing the subtraction it thinks I want. Is there some way to prevent
this from happening? I want to have a single parameter, called "season" to
be interpreted as a string.
Steve Cohen
Sr. Software Engineer
Ignite Sports Media
stevec@ignitemedia.com
Re: Preventing arithmetic parsing of expressions that look like arithmetic
Posted by Steve Muench <St...@oracle.com>.
Use single quotes for a literal number...
So instead of:
| <xsl:param name="season" select="2000-01"/> <!-- default season -->
Use:
<xsl:param name="season" select="'2000-01'"/>
______________________________________________________________
Steve Muench, Lead XML Evangelist & Consulting Product Manager
BC4J & XSQL Servlet Development Teams, Oracle Rep to XSL WG
Author "Building Oracle XML Applications", O'Reilly
http://www.oreilly.com/catalog/orxmlapp/