You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Ryan Dewell <ry...@dewell.org> on 2005/05/07 01:20:13 UTC

xpath predicate question

Hello,

I can see that the current version of jackrabbit doesn't support complicated 
paths in predicates.  For example,

folder1/node1[childofnode1/@property='value']

I get an error from jackrabbit such as:

"Only attribute axis is allowed in predicate"

My question is: are more complicated path expressions in the predicate (such 
as the above) due to be supported for the final release?  The specification 
section 6.6.5 seems to indicate that the above xpath should be valid and 
possible, although I may be mistaken.

Just curious!  :)  Some future functionality I'm planning in a project would 
be greatly eased with this functionality.

Best regards,

Ryan Dewell 




Re: xpath predicate question

Posted by Marcel Reutegger <ma...@gmx.net>.
Hi Ryan,

Ryan Dewell wrote:
> I can see that the current version of jackrabbit doesn't support complicated 
> paths in predicates.  For example,
> 
> folder1/node1[childofnode1/@property='value']
> 
> My question is: are more complicated path expressions in the predicate (such 
> as the above) due to be supported for the final release?  The specification 
> section 6.6.5 seems to indicate that the above xpath should be valid and 
> possible, although I may be mistaken.

The grammar actually allows it, but the specification limits the
required support of path expressions in a predicate to the attribute
axis. This is due to translateability to SQL.

> Just curious!  :)  Some future functionality I'm planning in a project would 
> be greatly eased with this functionality.

Support for child axis in predicates is one of the items on my
enhancement list for jackrabbit. i cannot give you a date when it
will be implemented, but i hope i'll find time to implement it soon.

regards
  marcel