Subject: RE: Unexpected behavior with xsl:choose, xsl:when, xsl:variable
From: Américo Albuquerque <melinor@xxxxxxx>
Date: Fri, 8 Aug 2003 22:28:22 +0100
|
Hi.
> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of
> Samuel Bruce
> Sent: Friday, August 08, 2003 3:41 PM
> To: xsl
> Subject: Unexpected behavior with xsl:choose, xsl:when,
> xsl:variable
>
>
> Hello,
>
> I learned of this list from another users group. I
> hope that you won't mind my question.
>
> I have a xsl file which sets an xsl:variable at the
> start of the file (before the match:template) from
> either a request parameter or a session parameter. The
> variable is defined as:
>
> <xsl:variable name="var1">
> <xsl:value-of select="parm"/>
> </xsl:variable>
This creates a rtf, is better to use <xsl:variable name="var1"
select="parm"/>
Your <parm> might be like:
<parm>
A
</parm>
This is setting $var1 as:
'
A
'
Wich is different from 'A'
Check your <parm> and change it to <parm>A</parm>, or, if you want to keep
your definition, use <xsl:when test="normalize-space($var1)='A'">
(...)
Regards,
Américo Albuquerque
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|