xsl-list
[Top] [All Lists]

RE: Unexpected behavior with xsl:choose, xsl:when, xsl:variable

2003-08-08 14:28:22
Hi.

-----Original Message-----
From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com 
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com] On Behalf Of 
Samuel Bruce
Sent: Friday, August 08, 2003 3:41 PM
To: xsl
Subject: [xsl] 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



<Prev in Thread] Current Thread [Next in Thread>