W3C home > Mailing lists > Public > xproc-dev@w3.org > September 2011

Re: Options as strings. Blech.

From: Florent Georges <fgeorges@fgeorges.org>
Date: Fri, 2 Sep 2011 12:10:40 +0200
Message-ID: <CADyR_r0c2M_oaY+wkOyr8LhODAVP4jN8h-dWnESe+fMSWxuw=g@mail.gmail.com>
To: vojtech.toman@emc.com
Cc: xproc-dev@w3.org
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 2 September 2011 10:11:28 GMT