Hi; I have a need to search node in a level that not match some names. Take the following tree:
A A/B A/B/D A/C A/C/E So, I want to retrieve the nodes only under A, that have the names (or path) not equal to B (node A/C would be the result in this case). I tried some searches with xpath and sql, but without sucess. Well, in the url http://people.apache.org/~mreutegg/jcr-query-translator/translator.html, I post the following xpath: /jcr:root/A/element(*,my:type)[(@jcr:path!='/A/B')] and in SQL Query box appears: SELECT * FROM my:type WHERE jcr:path <> '/A/B' AND jcr:path LIKE '/A[%]/%' AND NOT jcr:path LIKE '/A[%]/%/%' and in JCR Query tree box appears: + Root node + Select properties: * + PathQueryNode + LocationStepQueryNode: NodeTest={} Descendants=false Index=NONE + LocationStepQueryNode: NodeTest={}Documentador Descendants=false Index=NONE + LocationStepQueryNode: NodeTest={}Acervo Descendants=false Index=NONE + LocationStepQueryNode: NodeTest=* Descendants=false Index=NONE + NodeTypeQueryNode: Prop={http://www.jcp.org/jcr/1.0}primaryType Value={my}type + RelationQueryNode: Op: <> [EMAIL PROTECTED]://www.jcp.org/jcr/1.0}path Type=STRING Value=/A/B I did the search in jackrabbit with xpath and nor result nor exception returned. I did the search in jackrabbit with sql and get the exception: "javax.jcr.query.InvalidQueryException: Invalid combination of jcr:path clauses" How can I do the filter in query to get directly the nodes without handle after in my code? I also tried using fn:name but it only works with "=" predicates. Thanks Helio. -- View this message in context: http://www.nabble.com/Search-question%2C-with-jcr%3Apath.-tp18464397p18464397.html Sent from the Jackrabbit - Users mailing list archive at Nabble.com.