Yes :)
So you probably know all this now, but for reference...
There are three "contexts" in which you can configure the link extensions
plugin to decorate links: "feed", "entry", and "entry-in-feed".
If you configure a link extension in the "feed" context, then any links
that appear as direct children of the atom:feed element and that match one
of the given rel values will be decorated. Obviously that only applies when
you are listing a collection (i.e., doing a GET on a collection URI).
If you configure a link extension in the "entry" context, then when you
retrieve a collection member directly (i.e., do a GET on a member URI),
any links that appear as direct children of the atom:entry element and that
match a rel value will be decorated. This does *not* apply to entries that
appear within a feed document, only entries that you retrieve directly.
If you configure a link extension in the "entry-in-feed" context, then when
you list a collection (i.e., do a get on a collection URI) then any links
that appear as direct children of an atom:entry within the atom:feed and
that match a rel value will be decorated.
Because computing the value of the atombeat:allow attribute is relatively
expensive, then any link extensions you configure for the "entry-in-feed"
context may have a noticeable performance cost, because the computation will
need to be done for every matching link in every entry in the feed, and if
the feed has hundreds or thousands of entries, that can add up to seconds.
So generally it's fine to configure as many link extensions as you like for
the "entry" and "feed" contexts, but you will want to avoid configuring a
link extension in the "entry-in-feed" context unless you absolutely need it.
Cheers
Alistair
P.S. Lee hope you don't mind, I've cced this to the AtomBeat mailing
list. If anyone has any general AtomBeat questions then please cc
atom...@googlegroups.com, then the discussion and any useful explanation
will get saved for posterity. Ta.
>
> Cheers,
> Lee
>
> On 5 January 2011 14:52, Lee Hart <lee....@well.ox.ac.uk> wrote:
> > Hi,
> >
> > I'm a little bit stuck on something...
> >
> > I'm trying to add an atombeat:allow attribute to the
> > security-descriptor link in the submitted media feed, i.e.:
> >
> > <feed>
> > �<link atombeat:allow="?"
> > rel="http://purl.org/atombeat/rel/security-descriptor"/>
> > �<entry>
> > � �<link/>
> > �</entry>
> > </feed>
> >
> >
> > The feed contains the following link-extensions config:
> >
> > <atombeat:config-link-extensions>
> > �<atombeat:extension-attribute name="allow"
> > namespace="http://purl.org/atombeat/xmlns">
> > � �<atombeat:config context="entry-in-feed">
> > � � �<atombeat:param name="match-rels" value="edit-media"/>
> > � �</atombeat:config>
> > � �<atombeat:config context="entry">
> > � � �<atombeat:param name="match-rels" value="*"/>
> > � �</atombeat:config>
> > �</atombeat:extension-attribute>
> > </atombeat:config-link-extensions>
> >
> >
> > The first atombeat:config is doing its job of decorating the
> > edit-media link *inside entries* with the @allow, i.e.:
> >
> > <feed>
> > �<link/>
> > �<entry>
> > � �<link atombeat:allow="?" rel="edit-media"/>
> > �</entry>
> > </feed>
> >
> > ...But I can't see what effect the second atombeat:config has. I
> > guessed it's meant to be decorating all the links in the feed "entry"
> > with the @allow, which would work for me, but it doesn't seem to be
> > doing that.
> >
> > I've tried a few things, but I can't seem to get this particular
> > security-descriptor link decorated. It's behaving contrary to my
> > expectations, but I can't tell whether it's the behaviour or my
> > expectations that are wrong. I suspect the latter, especially since
> > I've made a dodgy assumption that "entry" means "the bit outside of
> > the entries" in a feed context (as opposed to "entry-in-feed").
> >
> > Cheers,
> > Lee
> >
--
Alistair Miles
Head of Epidemiological Informatics
Centre for Genomics and Global Health <http://cggh.org>
The Wellcome Trust Centre for Human Genetics
Roosevelt Drive
Oxford
OX3 7BN
United Kingdom
Web: http://purl.org/net/aliman
Email: alim...@gmail.com
Tel: +44 (0)1865 287669