[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|