Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 73591 invoked from network); 12 Jun 2006 10:51:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 12 Jun 2006 10:51:17 -0000 Received: (qmail 39764 invoked by uid 500); 12 Jun 2006 10:51:16 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 39651 invoked by uid 500); 12 Jun 2006 10:51:16 -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 39640 invoked by uid 99); 12 Jun 2006 10:51:16 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Jun 2006 03:51:16 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of marcel.reutegger@gmx.net designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 12 Jun 2006 03:51:14 -0700 Received: (qmail 25158 invoked by uid 0); 12 Jun 2006 10:50:53 -0000 Received: from 193.5.216.100 by www107.gmx.net with HTTP; Mon, 12 Jun 2006 12:50:53 +0200 (CEST) X-Flags: 0001 Date: Mon, 12 Jun 2006 12:50:52 +0200 Message-ID: <20060612105052.177040@gmx.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" From: "Marcel Reutegger" In-Reply-To: <5db525fa0606120243u5896c259o161472cea2ad3933@mail.gmail.com> References: <5db525fa0606120243u5896c259o161472cea2ad3933@mail.gmail.com> Subject: Re: XPath with QName not working To: users@jackrabbit.apache.org X-Authenticated: #894343 X-Mailer: WWW-Mail 6100 (Global Message Exchange) X-Priority: 3 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N > I'm trying to execute XPath on JackRabbit in a data store that > contains nodes with namespaces specified. For example I have: > > / > /jcr:system (type is rep:system) > /a:mynode (type is nt:unstructured) > > If I use the query /* it gives me the root '/' Node. > If I use the query /*/* it gives me > /jcr:system > /a:mynode this is expected behaviour. The specification states that the root node is represented as /jcr:root in an XPath query. That is, the jcr:system node in XPath is referenced with the following query: /jcr:root/jcr:system > However, I cannot access any node by referencing it without a > wildcard. For example, the query //a:mynode does not return any > results, nor does /a:mynode or /*/a:mynode //a:mynode and /*/a:mynode should acutally work. can you please create a jira issue that describes this bug? Thanks. > Neither can I access the jcr:system node directly. I've also tried > without the namespace qualifier, but //mynode , /mynode and > //system don't work either. All queries are namespace sensitive, which means you have to use the namespace prefixes. > Also, using the 'element' function doesn't work, e.g. //element(*, > nt:unstructured) returns nothing, even though I know for a fact that > there are nodes of type nt:unstructured in the data store. This is very weird as this is covered by a lot of test cases in jackrabbit. Did you by any chance migrate existing content to a new jackrabbit version? E.g. when migrating from 0.9 version of jackrabbit to 1.0 or 1.0.1 you have to remove the index directories and re-index the workspaces. regards marcel -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal f�r Modem und ISDN: http://www.gmx.net/de/go/smartsurfer