jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christoph Kiehl (JIRA)" <j...@apache.org>
Subject [jira] Updated: (JCR-740) Support for the decendant-or-self axis in XPath predicates
Date Fri, 22 Jun 2007 10:04:26 GMT

     [ 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.

View raw message