On Thu, Apr 16, 2009 at 2:53 PM, Mario-Leander Reimer <[email protected]> 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 http://markmail.org/message/2ppoe5fxldd7abaw Regards, Alex -- Alexander Klimetschek [email protected]
