[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: atom:category excludes atom:* children?
Bill de hOra wrote:
> [[[
> POST http://example.org/user/jsmith/cat HTTP/1.1
>
> <?xml version="1.0" ?>
> <app:categories xmlns:app="http://www.w3.org/2007/app"
> xmlns:atom="http://www.w3.org/2005/Atom">
> <atom:category term="dog" label="Dog" >
>
> <atom:id>http://example.org/users/jsmith/entry/ae34f5bc90f</atom:id>
>
> <atom:id>http://example.org/users/jsmith/entry/ae22ghbc90f</atom:id>
> </atom>
> </app:categories>
> ]]]
>
> this provides a structure that we can send to a server
> saying, "please categorise the things with those ids using
> this category".
I tried doing something similar:
<atom:category term="dog" label="Dog" >
<atom:id>http://example.org/categories/dog</atom:id>
</atom:category>
to mean "The category may be uniquely identified by the IRI http://example.org/categories/dog." Similarly, I tried using:
<atom:author>
<atom:id>http://briansmith.org/identitiy</atom:id>
<name>Brian Smith</name>
</atom:author>
to indicate that the author can be uniquely identified by the IRI http://briansmith.org/identitiy.
> Conclusion: we can do a lot with the Atom/Atompub
> elements we already have, if we are allowed the
> freedom to compose the markup - call it "Freedom 0.1".
On the other hand, reusing the existing markup like this creates a lot of problems when people give different semantics to the same construct, as shown above. That is why I stopped trying to reuse any existing markup for new purposes.
By the way, I think it would often make more sense to say "please categorize the things with those ids using this category" by making each category its own AtomPub collection, and then POSTing links to the collection:
POST /examples/categories/dog HTTP/1.1
Host: example.org
Content-Type: application/atom;type=entry
<entry>
<content src='http://example.org/users/jsmith/entry/ae22ghbc90f'/>
...
</entry>
or:
POST /exmaples/categories/dog HTTP/1.1
Host: example.org
Content-Type: text/uri-list
http://example.org/users/jsmith/entry/ae22ghbc90f
http://example.org/users/jsmith/entry/ae22ghbc90f
Then, you can keep up to date with what entries are in that category by polling the category's collection feed.
By the way, why did you decide to link to entries using their atom:id, instead of by their URI? There seems to be not much difference between:
<category><id>http://example.org/users/jsmith/entry/ae22ghbc90f</id></category>
and:
<category><link rel='categorized' href='atom:http://example.org%2Fusers/http://example.org/users/jsmith/entry/ae22ghbc90f'/>
In other words, when you link by atom:id, it is basically the same as linking using a new Atom-specific URI scheme. It seems simpler to give every resource a working HTTP URL, and then create hyperlinks using those URLs. The major problem with linking by atom:id is that atom:id is not a unique identifier (even though it is *supposed* to be), but a resolvable HTTP URL can be guarenteed unique as long as you control the servers that handle that URL.
Regards,
Brian