axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nelson Minar <nel...@monkey.org>
Subject Re: small patch for a more thorough boolean test
Date Tue, 05 Feb 2002 22:41:23 GMT
>You are right.  The code in Axis does not have this bug, but I noticed that
>the deserializer code is extremely lame.   switch (source.charAt(0)) {

Hah, no wonder I didn't understand how it worked! Well, at least the
Axis implementation is efficient :-)

>Any suggestions?  I would hate to make the code slower by adding
>complicated casing checks.

The XML Schema doc I'm reading at http://www.w3.org/TR/xmlschema-2/
says there are exactly four allowed literals: {true, false, 1, 0}
I don't know if that's case sensitive or not.

The same document says that only {true, false} are canonical. I
believe that's all Axis emits.

In my research I found some griping about the English-centric nature
of this coding, but no resolution. Earlier documents talk about "yes"
and "no" as also being valid literals, but I don't see that in the W3C
docs.

Isn't it amazing how even the *most simple datatype possible* is
difficult to implement correctly?

                                                     nelson@monkey.org
.       .      .     .    .   .  . . http://www.media.mit.edu/~nelson/

Mime
View raw message