XML is case sensitive! (Was: Re: [xsl] comments on December F&O draft)

Subject: XML is case sensitive! (Was: Re: [xsl] comments on December F&O draft)
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Sun, 6 Jan 2002 18:30:22 +0000
David Carlisle wrote:
> 5.1.3
> If this only takes a string literal (as commented above I think all
> user accessible functions should not have this restriction) then why
> do a case mapping. if it has to be a literal you may as well demand
> "TRUE" rather than " true". (Also if it only takes literals it
> serves no purpose at the user level as it could always be replaced
> by true() false() or an error.

[5.1.3 is xf:boolean-from-string()]

The case mapping is very strange as far as I'm concerned. It doesn't
make sense for constructors to take as arguments values that XML
Schema validators would count as invalid. The only valid lexical
values for xs:boolean, according to the XML Schema datatypes Rec are
'1', '0', 'true' and 'false' (as stated by Issue 157) (and note again
that the value is tested *after* whitespace collapsing). The same
thing applies when casting to boolean values (Section 14.6).

A similar comment also applies in Section 14.4 (Casting to numeric
types), where strings are converted to upper case before being tested
against "INF", "-INF" and "NAN". According to XML Schema, the only
valid lexical values for xs:double and xs:float (aside from the
obvious numbers) are "INF", "-INF" and "NaN".

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread