Hi Sébastien

Thanks for the help! I did not now that one has to put a "fn:" infront of the name() function. I gave it a try like this:

/jrc:root//*[fn:name() = '1234']

I need the // because I don't know where in the tree the node is that I'm looking for. However, I'm not getting anything although the node exists! When I do this with an sql query, it works:

select * from nt:base where jcr:path like '/%/1234'

In xpath, only this works:

/jcr:root//*/_x0031_234[1]

Am I doing somehing wrong with he name() function or is it simply not supported?

Regards,
Will

On 04.08.2008, at 10:21, Sébastien Launay wrote:

Hi Will,

This is the same problem as described recently here:
http://markmail.org/message/xyvhkjjsm2igtrhb?q=jackrabbit

So you must use :
/jcr:root/public/_x30_00
or
/jrc:root/public/*[fn:name() = '000']  (only one '/' is needed for
direct children)

--
Sébastien Launay

Will Scheidegger a écrit :
I have a bunch of nodes with numbers as names. When I try to do an
xpath query like

/jcr:root/public/000

I get a JCR exception: javax.jcr.query.InvalidQueryException: Parse
error: data is not a RelationQueryNode

I also tried this:

/jrc:root/public//*[name() = '000']

But it seems like name() is not supported by JCR. Is there a way to do
this?
Thanks!

will

Reply via email to