[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] The empty sequence and xs:boolean

Subject: [xsl] 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"/>


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


something else?

Andrew Welch

Current Thread