Re: [xsl] Can I use a boolean variable in an xsl:if test

Subject: Re: [xsl] Can I use a boolean variable in an xsl:if test
From: "Joris Gillis" <roac@xxxxxxxxxx>
Date: Tue, 08 Feb 2005 17:24:13 +0100
Tempore 16:58:35, die 02/08/2005 AD, hinc in xsl-list@xxxxxxxxxxxxxxxxxxxxxx scripsit Michael Kay <mike@xxxxxxxxxxxx>:

<xsl:variable name="show">
  <xsl:value-of select = "$time != 60000" />
</xsl:variable>
<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.

I started having this nasty tendency due to analogy with 'xsl:attribute':


you have to write;
<xsl:attribute name="href">
	<xsl:value-of select="@node"/>
</xsl:attribute>

because this isn't possible:
<xsl:attribute name="href" select="@node"/>

regards,
--
Joris Gillis (http://www.ticalc.org/cgi-bin/acct-view.cgi?userid=38041)
Gaudiam omnibus traderat W3C, nec vana fides

Current Thread