Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 12799 invoked from network); 15 Jul 2008 22:49:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Jul 2008 22:49:58 -0000 Received: (qmail 93572 invoked by uid 500); 15 Jul 2008 22:49:54 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 93544 invoked by uid 500); 15 Jul 2008 22:49:54 -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 93508 invoked by uid 99); 15 Jul 2008 22:49:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Jul 2008 15:49:54 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of aklimets@day.com designates 62.192.10.254 as permitted sender) Received: from [62.192.10.254] (HELO goobak01.day.com) (62.192.10.254) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Jul 2008 22:49:00 +0000 Received: by goobak01.day.com (Postfix, from userid 1212) id 27FF150843; Wed, 16 Jul 2008 00:47:44 +0200 (CEST) Received: from rn-out-0910.google.com (rn-out-0910.google.com [64.233.170.188]) by goobak01.day.com (Postfix) with ESMTP id AF1855081F for ; Wed, 16 Jul 2008 00:47:43 +0200 (CEST) Received: by rn-out-0910.google.com with SMTP id m69so1893723rnd.1 for ; Tue, 15 Jul 2008 15:48:19 -0700 (PDT) Received: by 10.142.222.21 with SMTP id u21mr4861072wfg.67.1216162098411; Tue, 15 Jul 2008 15:48:18 -0700 (PDT) Received: by 10.142.188.14 with HTTP; Tue, 15 Jul 2008 15:48:18 -0700 (PDT) Message-ID: Date: Wed, 16 Jul 2008 00:48:18 +0200 From: "Alexander Klimetschek" To: users@jackrabbit.apache.org Subject: Re: Query for objects with reduced set of attributes In-Reply-To: <01E8A990E317A1409EEC9E6858B09B9501D8885B@USDALSMBS02.ad3.ad.alcatel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <01E8A990E317A1409EEC9E6858B09B9501D8885B@USDALSMBS02.ad3.ad.alcatel.com> X-Virus-Checked: Checked by ClamAV on apache.org You need predicates defined in square brackets. Simply stating the property checks for its existence: //root/obj_level_1/obj_level_2[@attr1 and not(@attr2) and not(@attr3)] This query would find all nodes with a property "attr1", but without a property "attr2" and "attr3". Regards, Alex On Wed, Jul 16, 2008 at 12:06 AM, MARTINEZ Antonio wrote: > Hello, > > If I do query > > //root/obj_level_1/obj_level_2 > > I get all obj_level_2 objects, these containing all its attributes (say > attr1, attr2, attr3, ...) > > Is it possible to formulate a query to get all obj_level_2 objects with > a reduced # of attributes per object? I tried > > //root/obj_level_1/obj_level_2/@attr1 , trying to get all > obj_level_2 objects with only attr1, but I get the same result as with > the previous string > > Thanks, > Antonio > -- Alexander Klimetschek alexander.klimetschek@day.com