Return-Path: Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: (qmail 59648 invoked from network); 28 Apr 2010 22:21:11 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 28 Apr 2010 22:21:11 -0000 Received: (qmail 35304 invoked by uid 500); 28 Apr 2010 22:21:11 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 35273 invoked by uid 500); 28 Apr 2010 22:21:11 -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 35264 invoked by uid 99); 28 Apr 2010 22:21:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Apr 2010 22:21:11 +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: domain of aklimets@day.com designates 207.126.148.89 as permitted sender) Received: from [207.126.148.89] (HELO eu3sys201aog103.obsmtp.com) (207.126.148.89) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 28 Apr 2010 22:21:04 +0000 Received: from source ([209.85.217.219]) by eu3sys201aob103.postini.com ([207.126.154.11]) with SMTP ID DSNKS9i0uZJACM4Jl88XPOpkYPaQATNANpbG@postini.com; Wed, 28 Apr 2010 22:20:43 UTC Received: by gxk19 with SMTP id 19so8706809gxk.0 for ; Wed, 28 Apr 2010 15:20:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.150.174.9 with SMTP id w9mr702427ybe.0.1272493241103; Wed, 28 Apr 2010 15:20:41 -0700 (PDT) Received: by 10.151.105.8 with HTTP; Wed, 28 Apr 2010 15:20:40 -0700 (PDT) In-Reply-To: <9FEDB4C6-FE99-4188-B119-C37423EDFD34@maya-systems.com> References: <97644560-0298-4B74-B25E-95629AA8510D@maya-systems.com> <9FEDB4C6-FE99-4188-B119-C37423EDFD34@maya-systems.com> Date: Thu, 29 Apr 2010 00:20:40 +0200 Message-ID: Subject: Re: How to do this JCR XPath query From: Alexander Klimetschek To: users@jackrabbit.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org 2010/4/28 Fran=E7ois Cassistat : > Your solution looks good, but what if I need to do this kind of test more= than once in the same query? Sorry, I don't understand. Do you mean check a single node for multiple node types at the same time? Instead of element(*, nt), you can also search for the (virtual) "jcr:primaryType" property, eg. [@jcr:primaryType=3D'nt:file' or @jcr:primaryType=3D'my:foo'] Regards, Alex --=20 Alexander Klimetschek alexander.klimetschek@day.com