Return-Path: Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: (qmail 54247 invoked from network); 29 Apr 2010 15:53:50 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 29 Apr 2010 15:53:50 -0000 Received: (qmail 6470 invoked by uid 500); 29 Apr 2010 15:53:49 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 6450 invoked by uid 500); 29 Apr 2010 15:53:49 -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 6441 invoked by uid 99); 29 Apr 2010 15:53:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Apr 2010 15:53:49 +0000 X-ASF-Spam-Status: No, hits=-0.6 required=10.0 tests=AWL,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [72.55.186.13] (HELO s010.panelboxmanager.com) (72.55.186.13) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Apr 2010 15:53:43 +0000 Received: from dsl-153-87.aei.ca ([66.36.153.87] helo=[192.168.0.107]) by s010.panelboxmanager.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) (envelope-from ) id 1O7W3G-0007kN-J0 for users@jackrabbit.apache.org; Thu, 29 Apr 2010 11:53:22 -0400 Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Apple Message framework v1078) Subject: Re: How to do this JCR XPath query From: =?iso-8859-1?Q?Fran=E7ois_Cassistat?= In-Reply-To: Date: Thu, 29 Apr 2010 11:53:06 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: References: <97644560-0298-4B74-B25E-95629AA8510D@maya-systems.com> <9FEDB4C6-FE99-4188-B119-C37423EDFD34@maya-systems.com> To: users@jackrabbit.apache.org X-Mailer: Apple Mail (2.1078) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s010.panelboxmanager.com X-AntiAbuse: Original Domain - jackrabbit.apache.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - maya-systems.com X-Source: X-Source-Args: X-Source-Dir: Ok, it's like I thought for JCR XPath... And since I need to do probably = many more complex search operations in the future, I should try learning = to use JQOM which I am not very familiar (and lacks a good tutorial). Anyway, thanks again, Frank Le 2010-04-29 =E0 4:58 AM, Alexander Klimetschek a =E9crit : > 2010/4/29 Fran=E7ois Cassistat : >> Thanks for your answers and sorry if I was not clear enough. >>=20 >> What I need is to test more than one property on a subnode, and maybe = need to do these tests on more than one subnodes. For example, if it was = XML, I could write something like this : >>=20 >> //node[child::*[@att1=3D'a' and @att2=3D'b'] and child::*[@att1=3D'c' = and @att2=3D'd'] and ...] >>=20 >> Theses informations cannot be stored in the name or the node type = (non-unique user-provided strings with no SNS allowed). >=20 > I see, you still want to return the parent node, but check for > properties of children with unknown names. Yes, this is not possible > with JCR XPath. With JQOM/JCR-SQL2 it should be possible, but I don't > know how to build that query ;-) >=20 > Another solution could be to enhance the content model that the child > nodes have well-known names. Or, the solution that is a bit ugly, use > a query that returns the child nodes and on the nodes in the result > set go up the ancestor path. >=20 > Regards, > Alex >=20 > --=20 > Alexander Klimetschek > alexander.klimetschek@day.com