Re: Options as strings. Blech.

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 <ndw@nwalsh.com> wrote:
> Andrew Welch <andrew.j.welch@gmail.com> writes:
>> Ah ok sorry... I must admit I didn't know about the difference between:
>>
>> <xsl:if test="boolean('0')">aaa</xsl:if>
>>
>> vs
>>
>> <xsl:if test="xs:boolean('0')">bbb</xsl:if>
>>
>> (outputs 'aaa' but not 'bbb')
>>
>> I thought they both behaved the same....
>
> No, XPath 2.0 preserves the 1.0 semantics for fn:boolean() because,
> well, because there were lots of folks used to it. The semantics
> 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 UTC