Subject: RE: [xsl] [Illegal?] setting xsl:variable inside xsl:if code block From: "Wong Chin Shin" <publicbbs@xxxxxxxxxxxxxxxx> Date: Thu, 2 Dec 2004 16:02:44 +0800 |
It's the 2nd case :) I was trying to conditionally set the variable and then save it for later use outside of the block. Oh well, as long as I know why. Thanks! -----Original Message----- From: Raffaele Sena [mailto:raff@xxxxxxxxxxxx] Sent: Thursday, December 02, 2004 10:36 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: [xsl] [Illegal?] setting xsl:variable inside xsl:if code block I am not sure of what you are trying to do. If you are trying to "change" the value of a variable that you defined outside the "if" statement, it's an error (XSLT doesn't allow you to change the value of variables). If you are trying to set the variable inside the "if" block and use it outside the "if" block, it's an error, because the variable exists only in the scope of the "if" block. If you are setting and using the variable inside the "if" block, it should work because creation and use will be in the same block. -- Raffaele -----Original Message----- From: Wong Chin Shin [mailto:publicbbs@xxxxxxxxxxxxxxxx] Sent: Wednesday, December 01, 2004 6:08 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: [xsl] [Illegal?] setting xsl:variable inside xsl:if code block Hi, I got an error when I tried to do the following: <xsl:if test="$x=$y"> <xsl:variable something something> </xsl:if> It says it can't find the variable or something to that effect. How do I accomplish this? Thanks! Wong !DSPAM:41ae6f4c275021367519020!
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] [Illegal?] setting xsl:va, Raffaele Sena | Thread | RE: [xsl] [Illegal?] setting xsl:va, Michael Kay |
RE: [xsl] format <xsl:message> outp, Pawson, David | Date | [xsl] Complex for-each comparison p, Sven Waibel |
Month |