Subject: RE: [xsl] Can I use a boolean variable in an xsl:if test From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Tue, 08 Feb 2005 14:29:48 -0500 |
<xsl:variable name="show"> <xsl:value-of select = "$time != 60000" /> </xsl:variable>
is not a boolean variable, it is a result tree fragment. If you convert a result tree fragment to a boolean, the result is always true.
The correct way to write a boolean variable is:
<xsl:variable name="show" select="$time != 60000" />
I simply have no idea why this verbose, inefficient, and often incorrect style using <xsl:value-of> within <xsl:variable> has become so popular.
Cheers, Wendell
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Can I use a boolean varia, Joris Gillis | Thread | RE: [xsl] Can I use a boolean varia, JBryant |
Re: [xsl] XSLT use cases; data-cent, Dimitre Novatchev | Date | Re: [xsl] XSLT use cases; data-cent, JBryant |
Month |