[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: top level xsl:param confusion

Subject: RE: top level xsl:param confusion
From: "Passin, Tom" <tpassin@xxxxxxxxxxxx>
Date: Thu, 30 Sep 2004 17:26:32 -0400
level xsl
> From: Robert Koberg [mailto:rob@xxxxxxxxxx]
>
> I have a top level param like so:
>
> <xsl:param name="permission" select="false()"/>
>
>
> Main Question:
>
> Is the above top level xsl:param considered false even if it was
passed
> an empty string? I would expect it to be false only if the param was
> *not* passed.
> ...
> For example, the following chooses the otherwise when the param is
sent
> to the transformation as an empty string.
>
> <xsl:choose>
>    <!--<xsl:when test="boolean($permission)"> or -->
>    <xsl:when test="$permission">
> <!-- allow access -->
>    </xsl:when>
>    <xsl:otherwise>
> <!-- no access -->
>    </xsl:otherwise>
> </xsl:choose>
>

Since an empty string evaluates to "false" in a test, how could you
distinguish between that value and the default value, which was false()?

Cheers,

Tom P

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.