Re: Options as strings. Blech.

On 2 September 2011 11:25, ? wrote:

  Hi,

> But I still think that if var is equal to '0' (as the result
> converting 0 to a string), then the effective boolean value of
> the expression $var is false() in XPath 2.0.

  If we look at the definition of EBV[1], actually any string
returns true except the empty string.  So even 'false' returns
true:

    (: returns true() :)
    if ( 'false' ) then true() else false()

    (: returns false() :)
    xs:boolean('false')

  Regards,

-- 
Florent Georges
http://fgeorges.org/
http://h2oconsulting.be/

[1] http://www.w3.org/TR/xpath20/#id-ebv

Received on Friday, 2 September 2011 10:11:27 UTC