commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Perez Jorge <ape...@ignos.com>
Subject Re: [JXPath] Testing for null values.
Date Thu, 19 Feb 2004 18:12:12 GMT
Hi!

  I found in BasicTypeConverter.java the existence of "null()".  So, to 
check if a XPath expression yields null this code will test it 
(beanshell syntax):

  test = ctx.getValue("path/to/a/existent/property = null()");

  But when using ctx.setLenient(true)  this returns boolean false:

  ctx.getValue("path/to/a/non/existent/property = null()");

which I believe it's wrong: it should be true because in lenient mode 
the value of such XPath expresion when some component is null it return 
null.

  Comments?

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


Mime
View raw message