Return-Path: Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: (qmail 7604 invoked from network); 7 Jul 2009 10:56:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Jul 2009 10:56:29 -0000 Received: (qmail 43366 invoked by uid 500); 7 Jul 2009 10:56:38 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 43313 invoked by uid 500); 7 Jul 2009 10:56:38 -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 43302 invoked by uid 99); 7 Jul 2009 10:56:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jul 2009 10:56:38 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [62.23.212.42] (HELO smail6.alcatel.fr) (62.23.212.42) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jul 2009 10:56:28 +0000 Received: from FRVELSBHS02.ad2.ad.alcatel.com (frvelsbhs02.dc-m.alcatel-lucent.com [155.132.6.74]) by smail6.alcatel.fr (8.13.8/8.13.8/ICT) with ESMTP id n67Au5S6027854 for ; Tue, 7 Jul 2009 12:56:05 +0200 Received: from FRVELSMBS11.ad2.ad.alcatel.com ([155.132.6.37]) by FRVELSBHS02.ad2.ad.alcatel.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 7 Jul 2009 12:55:53 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Subject: RE: Query for Nodes from a given Path Date: Tue, 7 Jul 2009 12:58:10 +0200 Message-ID: In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Query for Nodes from a given Path thread-index: Acn+8EjTLtfDTtbATk65sFT3SeAc8AAAG7AA References: <4A5325B3.6000009@gmail.com> From: "BOWLER Paul" To: X-OriginalArrivalTime: 07 Jul 2009 10:55:53.0448 (UTC) FILETIME=[7F621E80:01C9FEF1] X-Scanned-By: MIMEDefang 2.57 on 155.132.188.84 X-Virus-Checked: Checked by ClamAV on apache.org Superb. Many thanks Alex. P. -----Original Message----- From: Alexander Klimetschek [mailto:aklimets@day.com]=20 Sent: 07 July 2009 11:47 To: users@jackrabbit.apache.org Subject: Re: Query for Nodes from a given Path On Tue, Jul 7, 2009 at 12:46 PM, BOWLER Paul wrote: > The problem is that the pcf:Color node can appear at many levels within the tree so specifying an absolute path won't work. > [..] > query =3D qm.createQuery("/jcr:root/the/starting/node/pcf:Color", The trick is the "//" location step, which means descendent-or-self, ie. any node named pcf:Color in the subtree under the absolute path given before. Regards, Alex --=20 Alexander Klimetschek alexander.klimetschek@day.com