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

Re: Options as strings. Blech.

From: temp <temp44@szm.sk>
Date: Wed, 07 Sep 2011 10:33:05 +0200
To: xproc-dev@w3.org
Message-Id: <20110907083306.0A753266C35@mail-mx-2.alinet.sk>
Hm, the test ebv-002.xpl requires XPath 2.0. 
Shouldn't it be optional then?
Btw. same goes for xslt-006.xpl regarding XSLT 2.0.
Cheers
Mio

On 2 September 2011 18:51, Norman Walsh &lt;ndw@nwalsh.com&gt; wrote:
&gt; Andrew Welch &lt;andrew.j.welch@gmail.com&gt; writes:
&gt;&gt; Ah ok sorry... I must admit I didn't know about the difference between:
&gt;&gt;
&gt;&gt; &lt;xsl:if test="boolean('0')"&gt;aaa&lt;/xsl:if&gt;
&gt;&gt;
&gt;&gt; vs
&gt;&gt;
&gt;&gt; &lt;xsl:if test="xs:boolean('0')"&gt;bbb&lt;/xsl:if&gt;
&gt;&gt;
&gt;&gt; (outputs 'aaa' but not 'bbb')
&gt;&gt;
&gt;&gt; I thought they both behaved the same....
&gt;
&gt; No, XPath 2.0 preserves the 1.0 semantics for fn:boolean() because,
&gt; well, because there were lots of folks used to it. The semantics
&gt; of xs:boolean derive from XML Schema, I think.

Ah ok, I thought xs:boolean got it 'wrong'... I remember reading
(possibly on xsl-list) that treating 0 and 1 as booleans was a
hangover from previous times was only kept around for backwards
compatibility... I never knew fn:boolean was different.  Maybe that
was an attempt to do the right thing?


-- 
Andrew Welch
http://andrewjwelch.com




=== reklama ======================================

http://mail.szm.com - e-mail a priestor na www stranku zadarmo

http://webhosting.szm.com - domény a webhosting za najnižšie ceny
Received on Wednesday, 7 September 2011 08:33:39 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 7 September 2011 08:33:40 GMT