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: Question on jcr:deref usage
Date Thu, 23 Nov 2006 14:25:42 GMT
Lei Zhou wrote:
> SELECT  Document.Subject, Document.Description, 
> Document.ProductReference->categoryName
> where Subject='Manual' AND description contains 'maintenance' AND 
> Document.ProductReference->categoryName='Product #1'
> order by Document.ProductReference->categoryName, Document.Subject
> Is this possible in Jackrabbit with Xpath query? 

no, not quite. the jcr:deref() function cannot be used in a predicate, which 
would be required for that use case. furthermore the select clause and order by 
clause may only contain property names.

the closed you can get is something like:

//element(*, Document)[@Subject = 'Manual' and jcr:contains(@description, 
'maintenance') and @ProductReference = '<uuid-of-Product-#1>'] order by 
@ProductReference, @Subject

and then you have to do some post processing. basically dereferencing the 
ProductReference to get the name of the product.


View raw message