Re: [xsl] Setting a boolean value

Subject: Re: [xsl] Setting a boolean value
From: "Mark" <mark@xxxxxxxxxxxx>
Date: Sat, 22 Oct 2011 07:26:49 -0700
false() ... duh! How could I have missed that?
Thanks guys!
Mark

-----Original Message----- From: G. Ken Holman Sent: Saturday, October 22, 2011 7:19 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: [xsl] Setting a boolean value

At 2011-10-22 07:13 -0700, you wrote:
I have a boolean parameter and wonder if there is a "preferred" style for setting it to 'false':

false() and true() are the functions one typically uses to set boolean variables and parameters. One can also use comparisons.


I hope this helps.

. . . . . . . . Ken

These two work but seem indirect and verbose:
<xsl:with-param name="set-current">
       <xsl:text>false</xsl:text>
</xsl:with-param>
or
<xsl:with-param name="set-current" select="not('true')"/>

These return the error "required type ... is boolean.
<xsl:with-param name="set-current" select="''"/>
<xsl:with-param name="set-current" select="'false'"/>

And this returns the error: "An empty sequence is not allowed as the value of...."
<xsl:with-param name="set-current" select="false"/>


Thanks,
Mark


--
Contact us for world-wide XML consulting and instructor-led training
Crane Softwrights Ltd.            http://www.CraneSoftwrights.com/s/
G. Ken Holman                   mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Google+ profile: https://plus.google.com/116832879756988317389/about
Legal business disclaimers:    http://www.CraneSoftwrights.com/legal

Current Thread