jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: XPath multivalue value query
Date Mon, 11 Dec 2006 11:11:10 GMT
Mark Moales wrote:
> Does anyone have an example of an xpath value query for a mutlivalue 
> property?  For example, if I have a node foo with a multivalue property 
> called myProp that contains three strings ('a','b','c'), I want to do 
> something like:
> 
> //foo[@myProp eq ('a','b','c')]
> 
> I tried this and don't get any hits.  The JCR spec states "Value 
> comparisons test the entire attribute value as a single unit.", but they 
> don't provide any examples of the syntax.

The above value comparison is not implemented in jackrabbit because there is no 
SQL equivalent.

Feel free to file a jira issue and request an enhancement to the XPath query 
support.

For the time being you have to use the following syntax which is not equivalent, 
but close ;)

//foo[@myProp = 'a' and @myProp = 'b' and @myProp = 'c']

(not equivalent because you may also get foo nodes with a @myProp property 
valued ('a', 'b', 'c', 'd')

regards
  marcel

Mime
View raw message