jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@day.com>
Subject Re: Is jcr:like query possible on @jcr:name attribute?
Date Thu, 16 Apr 2009 13:08:04 GMT
On Thu, Apr 16, 2009 at 2:53 PM, Mario-Leander Reimer
<leander.reimer@vva-networks.de> wrote:
> I am trying to write an XPath query to search for nodes with a node name pattern using
jcr:like, for example
> //some/path/element(*, my:type)[jcr:like(@jcr:name, 'Test%')]
> The nodes I have are
> /jcr:root/some/path/Test 1
> /jcr:root/some/path/Test 2
> ...
> This query executes successfully, but does not return any nodes. Is this because @jcr:name
is of type NAME and not STRING? Is this type of query possible at all?
> Is there an XPath based solution at all, or do I have to do a //some/path/element(*,
my:type) query and then manually do the matching of the name on all returned nodes?

No, unfortunately pattern matching on node names is currently not
possible (and there is no such thing as "jcr:name"). See also


Alexander Klimetschek

View raw message