Alessandro Bologna wrote:
Finally, the technical question. Is there a simple way to extend the XPATH
parser to handle this type of queries?

you might want to try this:

- create your own XPath QueryBuilder, which extends from org.apache.jackrabbit.spi.commons.query.xpath.QueryBuilder
- overwrite createQueryTree() and transform the query tree built by the base 
class.
- IIUC you'd have to modify every LocationStepQueryNode and do the following:
        - take nameTest and create a NodeTypeQueryNode (or rather a
          RelationQueryNode for jcr:primaryType?) with that name
        - add the NodeTypeQueryNode to the LocationStepQueryNode as a predicate
        - set nameTest to null in LocationStepQueryNode

done ;)

regards
 marcel

Reply via email to