From dev-return-12623-apmail-jackrabbit-dev-archive=jackrabbit.apache.org@jackrabbit.apache.org Fri Jun 22 10:04:49 2007 Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 57430 invoked from network); 22 Jun 2007 10:04:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Jun 2007 10:04:48 -0000 Received: (qmail 28860 invoked by uid 500); 22 Jun 2007 10:04:50 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 28825 invoked by uid 500); 22 Jun 2007 10:04:50 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 28816 invoked by uid 99); 22 Jun 2007 10:04:50 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jun 2007 03:04:50 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jun 2007 03:04:46 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 3B0D67141EC for ; Fri, 22 Jun 2007 03:04:26 -0700 (PDT) Message-ID: <14420017.1182506666239.JavaMail.jira@brutus> Date: Fri, 22 Jun 2007 03:04:26 -0700 (PDT) From: "Christoph Kiehl (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Updated: (JCR-740) Support for the decendant-or-self axis in XPath predicates In-Reply-To: <29538474.1171296126382.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JCR-740?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Christoph Kiehl updated JCR-740: -------------------------------- Attachment: patch.txt This patch is a prototype for supporting jcr:contains calls that use descendent-or-self-axis as their root: /foo/bar/*[jcr:contains(//*, term)] It does not support queries which use descendent-or-self-axis on childnodes: NOT SUPPORTED: /foo/bar/*[jcr:contains(test//*, term)] Right now it uses a keyword to recognize descendent-or-self-axis queries: /foo/bar/*[jcr:contains(DESCENDENT_OR_SELF, term)] We used to have queries like this: /foo/bar/*[jcr:contains(., term) or jcr:contains(*, term) or jcr:contains(*/*, term)] In this construct the term query is executed three times which leads to long execution times whereas the query above is much faster because the term query is only executed once. This is just a prototype and I would like to know what you think about it. The patch needs better integration with the query builder so that we don't need to use a keyword but can use "//*" instead. > Support for the decendant-or-self axis in XPath predicates > ---------------------------------------------------------- > > Key: JCR-740 > URL: https://issues.apache.org/jira/browse/JCR-740 > Project: Jackrabbit > Issue Type: Improvement > Components: xpath > Affects Versions: 1.2.1 > Reporter: Randy Simon > Attachments: patch.txt > > > For example, > I want to find the root of a node tree that contains a node with a specified id. The child node may be n layers deep in the node tree. In my specific case, I know how deep it is so > //element(*, my:foo)[bar/*/*/*/*/@jcr:uuid = 'abc'] > finds the node of type my:foo that contains the child node with id 'abc'. > Now, I would like to generalize this so I thought i could simply do the following. > //element(*, my:foo)[bar//*/@jcr:uuid = 'abc'] > but this does not work. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.