[Home] [By Thread] [By Date] [Recent Entries]

Subject: The empty sequence and xs:boolean
From: Andrew Welch <andrew.j.welch@xxxxxxxxx>
Date: Fri, 4 May 2012 10:23:21 +0100
Given that:

<xsl:variable name="v1" select="/nothing eq 'a' " as="xs:boolean"/>

will cause an exception if /nothing returns (), what is best / most
efficient way to construct this variable?

<xsl:variable name="v1" select="/nothing = 'a' " as="xs:boolean"/>

or

<xsl:variable name="v1" select="boolean(/nothing eq 'a')" as="xs:boolean"/>

or

something else?



-- 
Andrew Welch
http://andrewjwelch.com

Current Thread
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member