Subject: RE: [xsl] checking for a node in the ancestor axis From: "Murali Korrapati" <murali.korrapati@xxxxxxxxx> Date: Wed, 22 Oct 2003 11:06:43 -0400 |
boolean() and <xsl:if test="/lay:data/_Ctrl"> both works perfectly. And I am using MSXML3.0 Thanks a lot. ~Mur -----Original Message----- From: Lars Huttar [mailto:lars_huttar@xxxxxxx] Sent: Wednesday, October 22, 2003 7:11 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: [xsl] checking for a node in the ancestor axis Two suggestions... 1) Could it be that your code is not working because of carriage returns, i.e. this code > <xsl:when test="_Ctrl"> > <xsl:value-of select="'1'"/> > </xsl:when> sets your variable to the value ' 1 ' and so it is not string-equal to '1'? You could avoid this problem by taking Michael Kay's suggestion about using a boolean variable; or by using number(), or strip-space(). 2) You said your xml inside <Rpt_Inven> varies all the time; but does the location of _Ctrl vary? If not, you could get rid of the variable and do <xsl:if test="/lay:data/_Ctrl"> instead of <xsl:if test="$CtrlExists='1'"> HTH, Lars XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] checking for a node in th, Lars Huttar | Thread | [xsl] XML tags to XML attributes wi, lbertin |
[xsl] escaping inverted commas, David Elsmore | Date | RE: [xsl] escaping inverted commas, Kathy Burke |
Month |