[ 
https://issues.apache.org/jira/browse/OAK-309?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Mueller reopened OAK-309:
--------------------------------


The following query don't work yet:

{code}
testroot//child[../@foo1]
{code}

It is converted to:

{code}
select [jcr:path], [jcr:score], * from [nt:base] as a 
where [../foo1] is not null 
and name(a) = 'child' and isdescendantnode(a, '/testroot')
{code}

but the property name [../foo1] is not further parsed, and so the query result 
is incorrect.

There are multiple ways to solve this, the easiest is probably to support 
relative properties. 
                
> ParentNodeTest fails (XPath parent node navigation using "..")
> --------------------------------------------------------------
>
>                 Key: OAK-309
>                 URL: https://issues.apache.org/jira/browse/OAK-309
>             Project: Jackrabbit Oak
>          Issue Type: Sub-task
>          Components: jcr
>            Reporter: Alex Parvulescu
>            Assignee: Thomas Mueller
>
> 2 problems here:
> - #testParentInPath parse exception for query 
>   {noformat} 
>   "testroot//child/..[@foo1]"
>   Caused by: java.text.ParseException: Query:
>   testroot//child/.(*).[@foo1]; expected: jcr:root, /, *, text, element, @, (
> {noformat} 
> - all of the other tests have wrong getSize output (may be related to OAK-300)
> http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/ParentNodeTest.java?view=markup

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to