[snip]
Following up on what is described above, I'll take a slightly more
enhanced example using your app:meta attribute as well.
<?xml version="1.0" encoding="UTF-8"?>
<app:service xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:app="http://www.w3.org/2007/app" xml:lang="en"
xml:base="http://localhost:8080/">
<app:workspace>
<atom:title type="text">Meta service creation</atom:title>
<app:collection href="meta/service/" app:meta="service">
<atom:title type="text">Meta service creation</atom:title>
<app:accept>application/atom+xml;type=entry</app:accept>
<app:accept>application/atomsvc+xml</app:accept>
</app:collection>
</app:workspace>
<app:workspace>
<atom:title type="text">Meta workspace creation</atom:title>
<app:collection href="meta/workspace/" app:meta="workspace">
<atom:title type="text">Meta workspace creation</atom:title>
<app:accept>application/atom+xml</app:accept>
</app:collection>
</app:workspace>
<app:workspace>
<atom:title type="text">Meta collection creation</atom:title>
<app:collection href="meta/collection/" app:meta="collection">
<atom:title type="text">Meta collection creation</atom:title>
<app:accept>application/atom+xml</app:accept>
</app:collection>
<app:collection href="meta/collection/restricted" app:meta="collection">
<atom:title type="text">Meta collection creation</atom:title>
<app:accept>application/atom+xml</app:accept>
<app:categories fixed="yes">
<atom:category scheme="uri://musicgenre/" term="indie" />
<app:categories>
</app:collection>
<app:collection href="meta/collection/extended" app:meta="collection">
<atom:title type="text">Meta collection creation</atom:title>
<app:accept>application/atom+xml</app:accept>
<app:categories fixed="no">
<atom:category scheme="uri://musicgenre/" term="indie" />
<app:categories>
</app:collection>
</app:workspace>
</app:service>
First I want to highlight that I'm using three different workspaces
because they represent to me three different operations. It's just
convenience not formal.
I'm using the app:meta attribute which Tim suggested so that automated
clients can set discover the supported operations and set their
expectations. That being said, I'm not yet convinced we can't do without.
The usage of the app:categories element is interesting here.
In the collection with @href="meta/collection/restricted", the server
would ensure that any posted atom entry or feed to generate a new
collection would at least have the atom:category listed or reject the
collection creation. Nothing really new here. However on the collection
with @href="meta/collection/extended" I was considering that the newly
created collection would be ensured to have the atom:category listed. I
think that's interesting to allow the client to provide its own
requirements of category elements while giving a way for the server to add
its own metadata.
I'd like to draw a parallel with how XMPP PubSub handles it with a way for
a peer to configure a node for specific behavior. While I don't think we
need such granularity with AtomPub it's certainly interesting to keep it
in mind.
- Sylvain