Return-Path: Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: (qmail 7403 invoked from network); 17 Nov 2010 13:25:23 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 17 Nov 2010 13:25:23 -0000 Received: (qmail 21940 invoked by uid 500); 17 Nov 2010 13:25:54 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 21870 invoked by uid 500); 17 Nov 2010 13:25:52 -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 21860 invoked by uid 99); 17 Nov 2010 13:25:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Nov 2010 13:25:51 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.216.42] (HELO mail-qw0-f42.google.com) (209.85.216.42) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Nov 2010 13:25:45 +0000 Received: by qwf7 with SMTP id 7so647122qwf.1 for ; Wed, 17 Nov 2010 05:25:24 -0800 (PST) MIME-Version: 1.0 Received: by 10.229.91.211 with SMTP id o19mr7738869qcm.87.1290000324600; Wed, 17 Nov 2010 05:25:24 -0800 (PST) Received: by 10.229.240.211 with HTTP; Wed, 17 Nov 2010 05:25:24 -0800 (PST) In-Reply-To: References: Date: Wed, 17 Nov 2010 23:25:24 +1000 Message-ID: Subject: Re: 'reverse path prefix' xpath query From: Torgeir Veimo To: users@jackrabbit.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On 17 November 2010 22:10, Ard Schrijvers wrote: > On Wed, Nov 17, 2010 at 12:57 PM, Torgeir Veimo wrote: >> I need to query a workspace to find subscribers nodes to be notified >> for a workspace event. Each subscribers have a subscription node with >> a property containing the path prefix for what they're subscribing to. >> The event listener provides the full path to the node being updated. >> >> Eg. someone subscribes to new blog entries under /blog/wildlife/. A >> new blog entry is added with a path of /blog/wildlife/2010/11/17/wolfs >> >> How do I construct an xpath query that finds the nodes with the >> correct path prefix property? > > You mean /jcr:root/blog/wildlife//* I guess? The query will be constructed from the information provided by the onEvent(EventIterator events); call, which is basically the path /blog/wildlife/2010/11/17/wolfs in this case derived from the node. -- -Tor