Return-Path: Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: (qmail 68231 invoked from network); 23 Nov 2010 15:46:44 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 23 Nov 2010 15:46:44 -0000 Received: (qmail 2754 invoked by uid 500); 23 Nov 2010 15:47:16 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 2654 invoked by uid 500); 23 Nov 2010 15:47: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 2645 invoked by uid 99); 23 Nov 2010 15:47:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Nov 2010 15:47:15 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [217.108.10.20] (HELO mail1.europe.adp.com) (217.108.10.20) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Nov 2010 15:47:06 +0000 Received: from EXCHSUR3.gaia.fr ([150.175.3.28]) by ppa1p.europe.adp.com (8.14.3/8.14.3) with ESMTP id oANFkjkw011674 for ; Tue, 23 Nov 2010 16:46:45 +0100 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: xpath query of subnode Date: Tue, 23 Nov 2010 16:46:43 +0100 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: xpath query of subnode Thread-Index: AcuLJaCOJbzj8HifT0Oa9R//L/lcJA== From: "Nicolas Betheuil" To: X-Origincountry: English X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.2.15,1.0.148,0.0.0000 definitions=2010-11-23_07:2010-11-23,2010-11-23,1970-01-01 signatures=0 X-Virus-Checked: Checked by ClamAV on apache.org Hi, I have the following structure for my default sch=E9ma /aRootNode/subNode/onePath/myInterestingNode/conditions[2]/@someHelpffulA= ttributes /aRootNode/subNode/otherVeryDifferentPath/myOtherInterestingNode/ = (without condition) In the first i have two conditions with some attributes On the second my node have no conditions. I have a Profile in memory that have some properties that should match = with conditions. The target is to list interestingNodes on the Profile = if conditions are matching. If no condition, that's mean that's = everybody could see this. I begin with SQL2 like i work with last release of jackrabbit but when = dealing with differents paths make subqueries and join (that's all i = have found) i try xpath. I have read that's deprecated by the spec but = it's always there and working so I try. I success to make an xpath that match when my profile have or not same = conditions. But i donc succeed to make an xpath that match node without conditions. One of my case make this query /aRootNode/subNode/*[(conditions/@property!=3D'propName') or = (conditions/@property=3D'propName' and conditions/@operator=3D'eq' and = conditions/@expectedValue=3Dtrue) or (count(conditions)=3D0)] But the count(conditions)=3D0 doesn't work. Worse, ever it's in an or = condition, all is false and nothing is returned. I try with not(conditions), length(conditions)=3D0 or trying to = understand what's go on count(conditions)>0 to find all nodes with = conditions as children but nothing match. Do you have an idea ? Thank's to have read me to the end