jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frédéric Esnault <f...@legisway.com>
Subject Xpath property predicates
Date Wed, 04 Jul 2007 15:20:58 GMT
Hi all !

 

I'm testing something about predicates in an xpath query.

 

My goal is to get all nodes which have two properties with the same value.

Let's say my contract has two properties :

-          @signed : Boolean

-          @modified : Boolean

 

If I want all contracts that are either signed and modified or not signed and not modified,
my xpath would be :

//element(*, contractType)[@signed=@modified]

 

Right?

 

But this does not work in jackrabbit. A query listing values works ( [(@ signed=true and @modified=true)
or (@ signed=false and @modified=false)], but this is clearly unacceptable if we deal with,
say dates or amounts of money, where you cannot list all possible values (and the query would
be awful anyway).

 

I'm wondering if it is a bug in Jackrabbit or if it's just not possible with JSR 170 Xpath
query (it works with real XPath).

 

Thanks !

 

Frédéric Esnault


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