W3C home > Mailing lists > Public > public-qt-comments@w3.org > May 2003

F&O Casting from binary types to xs:boolean

From: Priscilla Walmsley <priscilla@walmsley.com>
Date: Sat, 10 May 2003 07:44:14 -0400
To: <public-qt-comments@w3.org>
Message-ID: <000401c316e9$7b570f40$030ba8c0@WALMSLEYPH>

I'm not sure why someone would need to cast hexBinary and base64Binary
to boolean, but of course there may be a use case I haven't thought of.
However, the casting rule is a little unclear.  It says:

"If ST is xs:base64Binary or xs:hexBinary and SV is " 1 ", then TV is
true; if ST is xs:base64Binary or xs:hexBinary and SV is " 0 ", then TV
is false."


1. Putting the values " 1 " and " 0 "  in quotes implies that these are
valid lexical forms for these types.  They aren't, since these values
must come in octets.  Was the intention that hexBinary "01" be cast to
boolean true?  What about hexBinary "0001" ?  

2. What if the value is not equivalent to 0 or 1?  It doesn't say
whether it should be cast to true, raise an error, or what.

Thanks,
Priscilla
Received on Saturday, 10 May 2003 08:18:06 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:24 GMT