commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luca Biolcati" <>
Subject [JXpath] boolean value
Date Wed, 26 Mar 2003 09:54:18 GMT
I don't understand how JXPath evaluates boolean values. It seems it converts them in integer
values, instead of treating them as boolean. I used a Map as context:

Map myMap = new HashMap();

myMap.put("BVALUE", Boolean.FALSE);

JXPathContext ctx = JXPathContext.newContext(myMap);

String exp = "not(BVALUE)";

System.out.println("["+exp+"]: "+ctx.getValue(exp));


end the output is:

[not(BVALUE)]: false

if I use an expression like BVALUE=0 it works fine. But for what I know about xpath syntax,
expressions like BVALUE=false or not(BVALUE) should produce the same result, am I wrong?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message