This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
XML is case sensitive! (Was: Re: comments on December F&O draft)
- From: Jeni Tennison <jeni at jenitennison dot com>
- To: www-xml-query-comments at w3 dot org
- Cc: David Carlisle <davidc at nag dot co dot uk>, xsl-list at lists dot mulberrytech dot com
- Date: Sun, 6 Jan 2002 18:30:22 +0000
- Subject: XML is case sensitive! (Was: Re: [xsl] comments on December F&O draft)
- Organization: Jeni Tennison Consulting Ltd
- References: <200201041902.TAA22481@penguin.nag.co.uk>
- Reply-to: xsl-list at lists dot mulberrytech dot com
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