[jdom-interest] getBooleanValue() in Attribute

Elliotte Rusty Harold elharo at metalab.unc.edu
Sun May 4 12:01:09 PDT 2003


Once more into the queue:

Currently, getBooleanValue recognizes "true", "on", and "yes" as true 
and "false", "off", and "no" as false.

I suspect we should follow the W3C XML Schema definitionn of boolean; 
i.e. "true" and "1" are true; "false" and "0" are false. All other 
values throw an exception.

A weaker version would keep "on/off" and "yes/no" but add 0 and 1.

Finally, whatever decision is reached here, the JavaDoc needs to be 
adjusted to document what is going on. Currently you have to read the 
source code for this method to find out.
-- 
Elliotte Rusty Harold
elharo at metalab.unc.edu
Processing XML with Java (Addison-Wesley, 2002)
   http://www.cafeconleche.org/books/xmljava
   http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA



More information about the jdom-interest mailing list