Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 29812 invoked from network); 5 Nov 2007 19:10:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Nov 2007 19:10:51 -0000 Received: (qmail 55333 invoked by uid 500); 5 Nov 2007 19:10:39 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 55312 invoked by uid 500); 5 Nov 2007 19:10:39 -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 55303 invoked by uid 99); 5 Nov 2007 19:10:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Nov 2007 11:10:39 -0800 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 mwaschkowski@gmail.com designates 64.233.182.186 as permitted sender) Received: from [64.233.182.186] (HELO nf-out-0910.google.com) (64.233.182.186) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Nov 2007 19:10:35 +0000 Received: by nf-out-0910.google.com with SMTP id g16so1265238nfd for ; Mon, 05 Nov 2007 11:10:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=VwDzpfYomK4StaTMjuSe2eSwtQOYXmcSC0iEN5cENNQ=; b=U+SvdhjXRPytBeitmZ9RDLbtwHktN/oH1egLJTiSxqKPUntPTjMP0UYipa6PlyJBxCyjfAp6bqM+7z5Ezo4sfRbmMUZzd1zX++7ZqnYzAXHaysxnsyEFR9W3ddOQOC51jD1JMKcEIkJ78YaZNwOujAEXPo7SWcwfyXUquR3jkHQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=edqniCxN3EBtoWQdCWrvmZEwPaJRdRidfZbgTy4JCipT7GmMDGakMxalJHnGxI5BVCLIrE8vb1Gw8grgjDcWQrbsG3hsIznSJW0XCUXUcpqpN3s8Ib5nCdtpJRw/MPRkR8Qpn6BMIiQvEjJhxoT5ityIofdkKkbkclcfYRG7d+E= Received: by 10.142.212.19 with SMTP id k19mr1200443wfg.1194289805909; Mon, 05 Nov 2007 11:10:05 -0800 (PST) Received: by 10.142.215.16 with HTTP; Mon, 5 Nov 2007 11:10:05 -0800 (PST) Message-ID: <76a6ebd00711051110y1b7940e5sf21a83f68eed5189@mail.gmail.com> Date: Mon, 5 Nov 2007 14:10:05 -0500 From: "Mark Waschkowski" To: users@jackrabbit.apache.org Subject: Re: predicate with descendant child In-Reply-To: <472F663F.8090502@mulesource.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <76a6ebd00711051050n4b2bff96w59595a65f9936be4@mail.gmail.com> <472F663F.8090502@mulesource.com> X-Virus-Checked: Checked by ClamAV on apache.org Hi Dan, Doh, I forgot to mention that I need a particular branch, and realized my example isn't very good. I'll try again. I have the following: /parent1/childJack/years=10 /parent2/childJill/years=12 /parent3/childJohn/years=35 /parent3/childJohn/childSuzy/years=10 I need the _adults_ that have children or grandchildren that are 10 years old because we are running a special promotion for 10 year olds, and need to notify the adults of it. I would like to write this: parents[//@years= '10'] but no go. Any ideas? Thanks, Mark On Nov 5, 2007 1:51 PM, Dan Diephouse wrote: > > Mark Waschkowski wrote: > > Hi, > > > > I'm trying many different combinations to specify a predicate where > > ALL child nodes have some particular value. In other words, I would > > like to get all regions that have any children nodes that have a > > yearBuilt attribute of 2001. > > ie. documents/regions[//@yearBuilt = '2001'] > > > > I tried different combinations of factors but could only make the > > predicate apply if I knew what level the child was at: > > ie. documents/regions[*/@yearBuilt = '2001'] > > > > but in our case we don't always know the level, hence the need to > > apply a predicate using a descendant node. Is this possible? If not, > > are there any workarounds? > > > > Thanks, > > > > Mark > > > I think the correct xpath syntax is: documents/regions//*[@yearBuilt = > '2001']. > Cheers, > - Dan > > -- > Dan Diephouse > MuleSource > http://mulesource.com | http://netzooid.com/blog > >