Return-Path: Delivered-To: apmail-incubator-jackrabbit-dev-archive@www.apache.org Received: (qmail 90444 invoked from network); 25 Aug 2005 21:40:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 25 Aug 2005 21:40:03 -0000 Received: (qmail 70352 invoked by uid 500); 25 Aug 2005 21:40:02 -0000 Mailing-List: contact jackrabbit-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jackrabbit-dev@incubator.apache.org Delivered-To: mailing list jackrabbit-dev@incubator.apache.org Received: (qmail 70338 invoked by uid 99); 25 Aug 2005 21:40:02 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Aug 2005 14:40:02 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=HTML_20_30,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [204.178.39.204] (HELO mother.thoughtworks.com) (204.178.39.204) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Aug 2005 14:40:18 -0700 In-Reply-To: <3df33a2505082514185fba4f9b@mail.gmail.com> To: jackrabbit-dev@incubator.apache.org Subject: Re: "instanceof" function for xpath queries MIME-Version: 1.0 X-Mailer: Lotus Notes Release 6.5.3 September 14, 2004 Message-ID: From: Matthew P Foemmel Date: Thu, 25 Aug 2005 16:40:02 -0500 X-MIMETrack: Serialize by Router on Mother/ThoughtWorks.COM/US(Release 6.5.4|March 27, 2005) at 08/25/2005 04:39:54 PM, Serialize complete at 08/25/2005 04:39:54 PM Content-Type: multipart/alternative; boundary="=_alternative 0076FABA86257068_=" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --=_alternative 0076FABA86257068_= Content-Type: text/plain; charset="US-ASCII" That did the trick - thanks! Matthew Foemmel ThoughtWorks, Inc. Peeter Piegaze wrote on 08/25/2005 04:18:42 PM: > The XPath function you are looking for is element(). For example, > > //element(*, nt:file) > > will find all the nodes in the workspace of primary type nt:file, > including nodes > whose primary node type is a *subtype* of nt:file. > > -Peeter > > On 8/25/05, Matthew P Foemmel wrote: > > Hi all, > > > > I was wondering if there was an easy way to search a repository for all > > nodes of a specific type, including subtypes? For example, the xpath > > query: > > > > //*[@jcr:primaryType='my:nodeType'] > > > > will match all nodes with the exact type 'my:nodetype', but not nodes with > > types that inherit from it. I guess what I'd like to see is an "is" > > function that works like the "instanceof" function in Java: > > > > //*[is(my:nodeType)] > > > > I've read the JSR-170 spec and checked out some of the xpath query code, > > but couldn't find support for something like this. I feel like I'm missing > > something obvious though... > > > > Cheers, > > > > Matthew Foemmel > > ThoughtWorks, Inc. > > --=_alternative 0076FABA86257068_=--