ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Boisvert" <boisv...@intalio.com>
Subject Re: veryfing node existance
Date Wed, 05 Sep 2007 16:08:03 GMT
On 9/5/07, Matthieu Riou <matthieu@offthelip.org> wrote:
>
> Btw there are 2 other things you might want to try following the rules of
> boolean evaluations in XPath 1.0 [1]
>
>    * Make sure that you don't send an empty node.
>    * Try to change your expression to $request.body/hello:hello/text() as
> I'm not sure that Xalan considers a node only containing a text node as
> non
> empty.
>    * Try by setting the XPath 2.0 expression language on your process.



Actually, an XPath expression such as "/foo/bar/baz" returns a (possibly
empty) node-set.  So the expression "boolean(/foo/bar/baz)" would return
true if the "baz" element exists (under /foo/bar) whether or not the node
itself is empty.   I validated this with both XPath 1.0 + 2.0 yesterday.

alex

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