On 23 November 2010 23:47, Nicolas Betheuil <[email protected]> wrote: > Hi, > > If I understand well the question, you have some posts under > /blog/wildlife/ > > For all nodes added or modified under this node you have an event that is > published > You have on other hand an EventListener. > > So you receive an Event from this eventListener on which you can call > event.getPath() > This call will give you /blog/wildlife/2010/11/17/wolfs > > On other hand you have a list of subscribers for example like that > /subscribers/tom/@prefix=/blog/wildlife > +---/tim/@prefix=/blog/otherOne > +---/titi/@prefix=/blog/wildlife/2010
Yes that's all correct. > By the event path, you can have all of those paths by the JCR API or by an > regexp > /blog/wildlife/2010/11/17/ > /blog/wildlife/2010/11/ > /blog/wildlife/2010/ > /blog/wildlife/ > /blog/ > > So with an xpath like this it's ok ? > //*...@target='/blog/wildlife/2010/11/17/' or ... @target='/blog/wildlife/'] > > Sorry if i don't well understand the problem ... > Is it this ? Yes. What I wanted to avoid was to traverse the parent relations to the event node. I don't want to query for subscribers to the path /blog/wildlife/2010/11/17/, then to the path /blog/wildlife/2010/11/, then the path /blog/wildlife/2010/ etc, I just wanted a single xpath or sql style query. But it seems this is just not possible to avoid. -- -Tor
