[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding search constraints to collection listing




Right. I am not talking about using templates in atom:link in feeds as it won't make sense since those need to true URIs.

I agree with John that it would be nice to define an extension for the service document so that clients would know how to filter a collection.

Regards,
Subbu

On Apr 27, 2008, at 10:35 AM, Aristotle Pagaltzis wrote:

* Subbu Allamaraju <subbu@xxxxxxxxx> [2008-04-27 18:15]:
AtomPub just says that, use GET to a URI to get a view of the
collection. The URI could very well be a template containing
search terms and other conditions so that the client can fetch
a constrained view of the collection.

RFC 4287 requires a valid IRI in atom:link/@href. A URI template
is purposefully not valid as a URI because it contains curly
braces, which are disallowed in URIs. So you cannot put templates
in Atom links. This design is good interop practice: you have to
provide clients with a way to request the collection feed from a
collection URI anyway, so vanilla Atompub clients will work as
expected. That means doctoring the collection link is out of the
question.

But there is no reason you cannot put the URI template in another
place in your service document, *in addition* to the plain link
you must provide. And since support for the query feature has to
be added to clients specifically, anyway, requiring them to add
support for a template link extension element as part of that
effort is no extra burden.

Regards,
--
Aristotle Pagaltzis // <http://plasmasturm.org/>