xsl-list
[Top] [All Lists]

[xsl] The empty sequence and xs:boolean

2012-05-04 04:23:54
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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>