commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: [jxpath 1.2] Why does InfoSetUtil.booleanValue method handle strings in the manner that it does???
Date Thu, 10 Apr 2008 14:05:28 GMT

--- Tom Muldoon <tom@firstbest.com> wrote:

> Can anyone explain why the
> InfoSetUtil.booleanValue(Object object) method
> returns true when the object is a String if and only
> if it is a non-zero length string? Here's a code
> excerpt ...
> 
>         else if (object instanceof String) {
>             return ((String) object).length() != 0;
>         }
> Is this a bug? Shouldn't it return true if and only
> if the string is equal to "true" (ignoring case, of
> course)?
> 

See http://www.w3.org/TR/xpath#function-boolean .

> Thanks in advance, Tom
> 
> PS. Is this message better suited for the dev list?

Nope.  :)

-Matt

> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message