jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frederic Laugier <h...@dementia7.net>
Subject XPath exists/not exists question
Date Mon, 03 Mar 2008 11:37:28 GMT
Hello,

I have a question regarding the Exists / Not exists XPath operators.


My test data contains three nodes :

+ nodeA
  - prop1 = 'value'
  + child
     - subprop1 = 'something'

+ nodeB
  - prop1 = 'value'
  + child

+ nodeC
  - prop1 = 'value'



The query //*[child/@subprop1)] returns nodeA

The query //*[child/not(@subprop1)] returns nodeB

The query //*[not(child/@subprop1)] returns nodeB

I may be mistaken but I thought the third query would return nodeC as well

Can anybody tell me if I'm wrong, or if there is any other way to test
the non existence of a property in a child node regardless if the child
node exists or not ?

I'm using Jackrabbit 1.5 (r633030).

Best regards,
Frederic Laugier.


Mime
View raw message