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

RE: Options as strings. Blech.

From: <vojtech.toman@emc.com>
Date: Fri, 2 Sep 2011 05:11:31 -0400
To: <xproc-dev@w3.org>
Message-ID: <3799D0FD120AD940B731A37E36DAF3FE33D97E9D07@MX20A.corp.emc.com>
> If anyone needs to be convinced that forcing all option (and
> parameter) values to be strings was a bad idea, point them at the
> expected results of this test:
>   http://tests.xproc.org/tests/required/ebv-001.xml

I am sorry if I am not seeing something, but where does it follow from that the following test evaluates to true()?

<p:when test="'0'">...</p:when>

Isn't the effective boolean value of the above XPath expression (in XPath 2.0) false()? At least that is what you get when you cast the string '0' to xs:boolean. (In XPath 1.0, '0' indeed evaluates to true().)

I agree with the other weird cases (NaN, true(), false()), though.

Vojtech Toman
Consultant Software Engineer
EMC | Information Intelligence Group
Received on Friday, 2 September 2011 09:12:19 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:03:08 UTC