Hi Emmanuel, I think that '222222' is not a valid XML name as defined in XML 1.0 (it can not starts with a number character). Indeed, JCR uses ISO 9075 [1] to convert the node name to a valid XML name.
All of this in order to avoid for example the ambiguous parsing of the following query: /a/b[32 = 32] where 32 could be a number of an XML element name. To prevent this ISO 9075 must be used [2] to produce the right query: /a/b[_x33_2 = 32] where 33 is the hexadecimal value of the character '3'. This exception can also occurs when using item name containing spaces. [1] See 6.4.3 of JCR 1.0 specification [2] http://jackrabbit.apache.org/api/1.4/org/apache/jackrabbit/util/ISO9075.html -- Sébastien Launay Emmanuel Hugonnet a écrit : > Hi, > I have a node whose name is a numeric value. When I try to create an > xpath request I have an exception : > javax.jcr.query.InvalidQueryException: Parse error: data is not a > RelationQueryNode > at > org.apache.jackrabbit.core.query.xpath.XPathQueryBuilder.visit(XPathQueryBuilder.java:504) > > at > org.apache.jackrabbit.core.query.xpath.SimpleNode.jjtAccept(SimpleNode.java:80) > > at > org.apache.jackrabbit.core.query.xpath.SimpleNode.childrenAccept(SimpleNode.java:89) > > at > org.apache.jackrabbit.core.query.xpath.XPathQueryBuilder.visit(XPathQueryBuilder.java:551) > > > My xpath query is : > /jcr:root/kmelia60/Root/222222/element(*, slv:theme) order by @slv:order > > If I have some char in the name the query is working fine. I don't see > anything in the JSR specifying that a name must not have only figures. > Is this a bug ? > > Regards, > Emmanuel
