I'm not sure I fully understand your requrirement but you could query the descendant node and use node.getParent() to get its parent...
-----Mensaje original----- De: Craig S. Dickson [mailto:[email protected]] Enviado el: Martes, 12 de Abril de 2011 02:32 p.m. Para: [email protected] Asunto: Query for nodes based on presence of descendant nodes Hi, I would like to query for nodes based on the presence of a descendant node. In psuedo code, something like: select * from nt:base where hasDescendant('./relative/path/to/descendant/node') I am trying to create the query 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. Is this possible? I would prefer and SQL2 answer, but can use QOM or XPath if necessary. Thanks in advance. Craig ************************************************************************************** La informacion contenida en este mail es de caracter confidencial o para uso exclusivo del Grupo TOYOTA DE VENEZUELA en sus procesos y actividades de negocio. Los puntos de vista u opiniones presentes en el mismo son responsabilidad del remitente y no representan una posicion formal del grupo TOYOTA DE VENEZUELA (TOYOTA DE VENEZUELA, C.A. o TOYOTA INDUSTRIAL DE VENEZUELA, C.A.). Si UD. no es el destinatario o recibio esta informacion por error, agradecemos destruirla de inmediato y notificar al remitente por esta misma via, debido a que su copia, distribucion o uso esta reservado solo para personas autorizadas. *************************************************************************************** The information contained in this mail is strictly confidential or for the exclusive use by TOYOTA DE VENEZUELA Group in its process and business activities. The points of view or present opinions contained in the mail, are the senders responsibility and dont represent a formal opinion of TOYOTA DE VENEZUELA Group (TOYOTA DE VENEZUELA, C.A. or TOYOTA INDUSTRIAL DE VENEZUELA, C.A.) If you are not the destined user or received this information by mistake, we appreciate if you destroy it inmediately and notify the sender by this same way, because its copying, distributing and use is allowed only for authorized people.
