Subject: RE: Boolean true() and false() as strings? From: "John E. Simpson" <simpson@xxxxxxxxxxx> Date: Fri, 06 Oct 2000 12:18:46 -0400 |
> A curious thing (well, to me!)... consider this template rule:
The <xsl:value-of> converts the booleans to strings; and the use of xsl:variable with content creates a result tree fragment containing this string as a child node. So you are quite right, test="$units_gt_300" would always succeed, because it is testing whether the node-set equivalent to the RTF contains any nodes: converting an RTF to a boolean always returns true (despite what my book says on page 81 [sorry!].
But why don't you just write <xsl:variable name="units_gt_300" select="units > 300"/> That way you get a variable whose type is boolean.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: Boolean true() and false() as s, Kay Michael | Thread | how to select nodes based on attrib, Archie Russell |
Converting Word to XML is OFF TOPIC, XSL-List Owner | Date | RE: sibling axis: can't restrict, sara . mitchell |
Month |