Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 42139 invoked from network); 30 Jul 2008 09:58:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Jul 2008 09:58:22 -0000 Received: (qmail 3754 invoked by uid 500); 30 Jul 2008 09:58:20 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 3733 invoked by uid 500); 30 Jul 2008 09:58:20 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 3722 invoked by uid 99); 30 Jul 2008 09:58:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jul 2008 02:58:20 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [84.14.163.131] (HELO trinity.anyware-tech.com) (84.14.163.131) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jul 2008 09:57:25 +0000 Received: from localhost (localhost [127.0.0.1]) by trinity.anyware-tech.com (Postfix) with ESMTP id 25B89400DC6 for ; Wed, 30 Jul 2008 11:57:50 +0200 (CEST) Received: from trinity.anyware-tech.com ([127.0.0.1]) by localhost (trinity.anyware-tech.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 21489-05 for ; Wed, 30 Jul 2008 11:57:44 +0200 (CEST) Received: from [10.0.1.122] (krusty.anyware [10.0.1.122]) by trinity.anyware-tech.com (Postfix) with ESMTP id 8C46E4000BC for ; Wed, 30 Jul 2008 11:57:44 +0200 (CEST) Message-ID: <48903B18.5040605@anyware-tech.com> Date: Wed, 30 Jul 2008 11:57:44 +0200 From: =?ISO-8859-1?Q?S=E9bastien_Launay?= User-Agent: Thunderbird 2.0.0.16 (X11/20080724) MIME-Version: 1.0 To: users@jackrabbit.apache.org Subject: Re: Strange Exception References: <489034B1.8090409@gmail.com> In-Reply-To: <489034B1.8090409@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Debian amavisd-new at anyware-tech.com X-Virus-Checked: Checked by ClamAV on apache.org 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