jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clemens Wyss <clemens...@mysign.ch>
Subject AW: 'reverse path prefix' xpath query
Date Wed, 17 Nov 2010 13:40:50 GMT
Where are the subscribers located/persisted?
Beneath /blog/<category>/subscribers (e.g. /blog/wildlife/subscribers)? If so you could
take the node's path, apply the following regexp /(\/.*\/.*\/)/ on it (->/blog/wildlife/)
and then get the childnodes of the regexp result concatenated with 'subscribers' (-> /blog/wildlife/subscribers)...

-----Urspr√ľngliche Nachricht-----
Von: Torgeir Veimo [mailto:torgeir@netenviron.com] 
Gesendet: Mittwoch, 17. November 2010 14:25
An: users@jackrabbit.apache.org
Betreff: Re: 'reverse path prefix' xpath query

On 17 November 2010 22:10, Ard Schrijvers <a.schrijvers@onehippo.com> wrote:
> On Wed, Nov 17, 2010 at 12:57 PM, Torgeir Veimo <torgeir@netenviron.com> 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.


View raw message