You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Alexander Klimetschek <ak...@day.com> on 2010/02/01 14:34:24 UTC

Re: Jackrabbit2.0 xpath functions

On Fri, Jan 29, 2010 at 11:40, Niu, Xuetao <Xu...@fiserv.com> wrote:
> Hello,
>
> I am wondering what are the standard xpath functions supported by
> Jackrabbit2.0, and what are also supported by Jackrabbit2.0 but not
> standard xpath functions.
>
> Especially, how to select all nodes whose namespace is "abc:"? I tried
> to use "//abc:*" as xpath, but jackrabbit throws exception, I also tried
> to use "//*[starts-with(name(),'abc:')]" and
> "//*[fn:starts-with(name(),'abc:')]", both being complained by
> jackrabbit as invalid xpath.

Supported axes are only child (/), descendant-or-self (abbreviated
syntax: //) and attribute (@). See the JCR 1.0 spec [1], section
6.6.4.6 [2]. Please also note that JCR 2.0 (in Jackrabbit 2.0)
deprecated XPath support, but Jackrabbit will keep the XPath option.

[1] http://jcp.org/en/jsr/detail?id=170
[2] http://www.day.com/specs/jcr/1.0/6.6.4.6_Axes.html

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com