Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 85249 invoked from network); 19 Oct 2006 14:50:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Oct 2006 14:50:06 -0000 Received: (qmail 39850 invoked by uid 500); 19 Oct 2006 14:50:04 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 39766 invoked by uid 500); 19 Oct 2006 14:50:04 -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 39740 invoked by uid 99); 19 Oct 2006 14:50:04 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Oct 2006 07:50:04 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of marcel.reutegger@gmx.net designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 19 Oct 2006 07:50:01 -0700 Received: (qmail invoked by alias); 19 Oct 2006 14:49:38 -0000 Received: from bsl-rtr.day.com (EHLO [10.0.0.84]) [212.249.34.130] by mail.gmx.net (mp018) with SMTP; 19 Oct 2006 16:49:38 +0200 X-Authenticated: #894343 Message-ID: <4537906D.8040500@gmx.net> Date: Thu, 19 Oct 2006 16:49:17 +0200 From: Marcel Reutegger User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: users@jackrabbit.apache.org Subject: Re: XPath queries for versions References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Alexandru Popescu wrote: > Considering a node: > > /foo/bar/mynode with a property @my:property > > I would like > > 1/ to find the version of this node whose my:property was 'data': //element(*, nt:frozenNode)[@my:property = 'data' and jcr:frozenUuid = ''] please note that you need the uuid of the node in question, because the current path of a node in a workspace does not identify the node in the version storage. A version of a node can be checked out to any place in a workspace. > 2/ to find a labeled version of mynode (label that I know) //element(*, nt:versionLabels)/jcr:deref(@labelIKnow, '*')/*[jcr:frozenUuid = ''] The query dereferences all nt:versionLabel nodes with a @labelIKnow reference property in the version storage. The target of the references are nt:version nodes and their children are the nt:frozenNodes with the versioned properties. regards marcel