jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r477611 - /jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/query/xpath/XPathQueryBuilder.java
Date Tue, 21 Nov 2006 10:36:01 GMT
Author: mreutegg
Date: Tue Nov 21 02:36:01 2006
New Revision: 477611

URL: http://svn.apache.org/viewvc?view=rev&rev=477611
Log:
JCR-247: Child axis support for XPath predicates
- limit predicates to location deref steps

Modified:
    jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/query/xpath/XPathQueryBuilder.java

Modified: jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/query/xpath/XPathQueryBuilder.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/query/xpath/XPathQueryBuilder.java?view=diff&rev=477611&r1=477610&r2=477611
==============================================================================
--- jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/query/xpath/XPathQueryBuilder.java
(original)
+++ jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/query/xpath/XPathQueryBuilder.java
Tue Nov 21 02:36:01 2006
@@ -481,6 +481,15 @@
                 }
                 node.childrenAccept(this, queryNode);
                 break;
+            case JJTPREDICATE:
+                if (queryNode.getType() == QueryNode.TYPE_LOCATION
+                        || queryNode.getType() == QueryNode.TYPE_DEREF) {
+                    node.childrenAccept(this, queryNode);
+                } else {
+                    // predicate not allowed here
+                    exceptions.add(new InvalidQueryException("Unsupported location for predicate"));
+                }
+                break;
             default:
                 // per default traverse
                 node.childrenAccept(this, queryNode);



Mime
View raw message