Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 25981 invoked from network); 21 Aug 2007 13:47:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Aug 2007 13:47:47 -0000 Received: (qmail 4550 invoked by uid 500); 21 Aug 2007 13:47:44 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 4530 invoked by uid 500); 21 Aug 2007 13:47:44 -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 4521 invoked by uid 99); 21 Aug 2007 13:47:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Aug 2007 06:47:44 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [91.143.96.40] (HELO mail.hms.org) (91.143.96.40) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Aug 2007 13:48:15 +0000 Content-class: urn:content-classes:message Subject: Multiple jcr:deref in query Date: Tue, 21 Aug 2007 15:47:20 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C7E3F9.CC015902" Message-ID: <23E4DD34F112AF40A4F13B73B50BB3065C9A6E@hms-server-01.hms.local> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Multiple jcr:deref in query X-MimeOLE: Produced By Microsoft Exchange V6.5 Thread-Index: Acfj+cvAL1VAho/lR1WnzPvnjY5HdQ== From: "Michael Korat" To: X-Virus-Checked: Checked by ClamAV on apache.org ------_=_NextPart_001_01C7E3F9.CC015902 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Hi all, =20 I have to do a query to retrieve all Nodes from the 'Site'=20 subtree of my repository that contains certain content.The problem=20 is that the actual content is stored in other nodes, and I only hold references to them. Here's a little little overview of the=20 structure of my repository: =20 Root | |+Content | |+DataNodeA | | |@Content | |+DataNodeB | | |@Content | | | |+DocumentNodeA | |+LinkToDataNodeA > my:DataLink | | |@RefToData =3D DataNodeA | |+LinkToDataNodeB | |@RefToData =3D DataNodeB | |+Site |+PageA |+LinkToDocumentNodeA > my:LinkToDoc |@RefToDoc =3D DocumentNodeA =20 The node i want to retrieve in this case is PageA. PageA holds a subnode of the type my:LinkToDoc which contains=20 the reference to a DocumentNode. This DocumentNode has=20 subnodes which have references to DataNodes, which contain the actual content. =20 I wrote a query that should return all the nodes that are somehow=20 referenced by PageA, and contain the wanted value: =20 /jcr:root/Content//element(*, my:LinkToDoc)/jcr:deref(@RefToDoc, '*') //element(*, my:DataLink)/jcr:deref(@RefToData, '*')[jcr:contains(.,'some value')] =20 Unfortunately, the result of this is always zero. If I execute the=20 query without the jcr:contains constraint at the end I get the expected=20 set of DataNodes back: =20 /jcr:root/Content//element(*, my:LinkToDoc)/jcr:deref(@RefToDoc, '*') //element(*, my:DataLink)/jcr:deref(@RefToData, '*') =20 My question is if there is a limitation to the use of multiple jcr:deref in a single query, or mixing jcr:deref with constraints or if there is another convenient (and fast) way to do such a query? =20 Regards, Michael =20 ------_=_NextPart_001_01C7E3F9.CC015902--