Return-Path: Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: (qmail 47418 invoked from network); 13 Apr 2011 21:04:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Apr 2011 21:04:30 -0000 Received: (qmail 63390 invoked by uid 500); 13 Apr 2011 21:04:29 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 63367 invoked by uid 500); 13 Apr 2011 21:04:29 -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 63359 invoked by uid 99); 13 Apr 2011 21:04:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Apr 2011 21:04:29 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=MIME_QP_LONG_LINE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ttemprano@toyota.com.ve designates 200.44.126.218 as permitted sender) Received: from [200.44.126.218] (HELO tdv-hfkfdg1.Toyota.com.ve) (200.44.126.218) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Apr 2011 21:04:22 +0000 Received: from tdv-g83d1j1.toyota.com.ve [10.16.0.7] by tdv-hfkfdg1.Toyota.com.ve - Websense Email Security (7.2.0); Wed, 13 Apr 2011 16:33:57 -0430 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: Query for nodes based on presence of descendant nodes Date: Wed, 13 Apr 2011 16:33:57 -0430 Message-ID: In-Reply-To: <8398CEE8-9665-4457-A466-9FFCF9C5EE0C@thejuggernautgroup.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Query for nodes based on presence of descendant nodes Thread-Index: Acv5RDktomEcUi4tQq6TessYLiVX3wA2bZsg References: <8398CEE8-9665-4457-A466-9FFCF9C5EE0C@thejuggernautgroup.com> From: =?iso-8859-1?Q?Tom=E1s_Temprano?= To: X-SEF-7853D99-ADF1-478E-8894-213D316B8FFA: 1 X-SEF-Processed: 7_2_0_00441__2011_04_13_16_33_58 I'm not sure I fully understand your requrirement but you could query the d= escendant node and use node.getParent() to get its parent...=0D=0A=0D=0A=0D= =0A-----Mensaje original-----=0D=0ADe: Craig S. Dickson [mailto:craig@theju= ggernautgroup.com]=20=0D=0AEnviado el: Martes, 12 de Abril de 2011 02:32 p.= m.=0D=0APara: users@jackrabbit.apache.org=0D=0AAsunto: Query for nodes base= d on presence of descendant nodes=0D=0A=0D=0AHi,=0D=0A=0D=0AI would like to= query for nodes based on the presence of a descendant node. In psuedo code= , something like:=0D=0A=0D=0Aselect * from nt:base where hasDescendant('./r= elative/path/to/descendant/node')=0D=0A=0D=0AI am trying to create the quer= y with SQL2 and I can see the ischild() and isdescendant() constraints, but= I am not clear how to use them to query for and return the parent/ancestor= nodes, instead of the child/descendant nodes.=0D=0A=0D=0AIs this possible=3F= I would prefer and SQL2 answer, but can use QOM or XPath if necessary.=0D=0A=0D= =0AThanks in advance.=0D=0A=0D=0ACraig=0D=0A=0D=0A=0D=0A*******************= *******************************************************************=0D=0ALa= informacion contenida en este mail es de caracter confidencial o para uso = exclusivo=0D=0Adel Grupo TOYOTA DE VENEZUELA en sus procesos y actividades = de negocio. Los puntos de=20=0D=0Avista u opiniones presentes en el mis= mo son responsabilidad del remitente y no=20=0D=0Arepresentan una posic= ion formal del grupo TOYOTA DE VENEZUELA (TOYOTA DE VENEZUELA, C.A.=0D=0Ao = TOYOTA INDUSTRIAL DE VENEZUELA, C.A.). Si UD. no es el destinatario o r= ecibio esta=20=0D=0Ainformacion por error, agradecemos destruirla de inmed= iato y notificar al remitente por=0D=0Aesta misma via, debido a que su copi= a, distribucion o uso esta reservado solo para=0D=0Apersonas autorizadas.=0D= =0A************************************************************************= ***************=0D=0AThe information contained in this mail is strictly con= fidential or for the exclusive use=0D=0Aby TOYOTA DE VENEZUELA Group in its= process and business activities. The points of view=0D=0Aor present opin= ions contained in the mail, are the senders responsibility and dont=0D=0A= represent a formal opinion of TOYOTA DE VENEZUELA Group (TOYOTA DE VENEZU= ELA, C.A. or=0D=0ATOYOTA INDUSTRIAL DE VENEZUELA, C.A.) If you are not the = destined user or received this=0D=0Ainformation by mistake, we appreciate i= f you destroy it inmediately and notify the=0D=0Asender by this same = way, because its copying, distributing and use is allowed only for=20=0D=0A= authorized people.=0D=0A