[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: not()'ing a false variable, xalan 2.4.D1
> <!-- make a false variable entitled 'false-variable' --> > <xsl:variable name="false-variable"> > <xsl:value-of select="false()"/> > </xsl:variable> > You are creating a variable whose value is a result-tree-fragment, specifically, a tree consisting of a document node owning a text node. The string-value of the text node is obtained by converting the boolean value false() to a string, so it will be the string "false". When a result-tree-fragment is converted to a boolean, the result is always true(). Write <xsl:variable name="false-variable" select="false()"/> In fact, 99% of the time that you see an <xsl:variable> containing a single <xsl:value-of> instruction, it would be better to use the select attribute instead. Michael Kay Software AG home: Michael.H.Kay@xxxxxxxxxxxx work: Michael.Kay@xxxxxxxxxxxxxx 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
|