FWIW, while I quite like this use, there's an inherent problem in that
"dumb clients" (atom clients that aren't aware of this particular
extension) won't be able to do anything interesting with the link
element embedded in the category. More comments below.
Bill de hOra wrote:
[snip]
I'm not sure what you mean by spec, but it will be used. Example:
[[[
<entry xmlns='http://www.w3.org/2005/Atom'
xmlns:media='http://search.yahoo.com/mrss/'>
<id>http://example.org/data/jsmith/entry/ae34f5bc90f</id>
<title type='text'>My Holiday Picture</title>
<updated>2007-03-02T02:09:52.000Z</updated>
<summary>My Holiday Picture</summary>
<link rel='alternate' type='application/json'
href='http://example.org/data/jsmith/entry/ae34f5bc90f?fmt=json' />
<link rel='self' type='application/atom+xml'
href='http://example.org/data/jsmith/entry/ae34f5bc90f'/>
<link rel='edit' type='application/atom+xml'
href='http://example.org/data/jsmith/entry/ae34f5bc90f' />
<category term='holidays' label='Holidays'>
<link rel='related' type='application/atom+xml'
href='http://example.org/data/jsmith/category/holidays' />
</category>
<link rel="edit-media" type="image/jpeg"
href="http://example.org/photoedit/lisa.jpg" >
<media:group>
<media:content type='image/jpeg' medium='image'
url='http://example.org/photos/lisa.jpg' >
</media:content>
<media:thumbnail height='128' width='128'
url='http://example.org/thumbnail/lisa.jpg?tw=128&th=128'>
</media:thumbnail>
</media:group>
</link>
</entry>
]]]
It allows you to say, "this link of type application/atom+xml is related
to this category". IMO it's a spec bug to say it's invalid (ergo I
don't see it as a warning either) - especially given what I see people
doing with term/scheme to supply hypertext for a category.
It's definitely better than bastardizing the scheme element to provide a
dereferenceable URL. I would say that this definitely falls within the
realm of the validator's "questionable use" warning... at least until
there's spec text that describes the semantics.
If you need an ID to proceed, I can do that.
[Incidently, there is media RSS embedded inside atom:link in that
example. I've been looking at media rss usage, and feel it's a better
idiom - this way image links are not be hidden from basic readers.]
I also have another 'reuse' case, this time between app:* and atom:*:
[[[
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".
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".
We're also reusing some of the atom: and app: elements in interesting
ways. For instance, including atom:id in the app:category element so we
can uniquely associate the collection with a specific feed.
- James
Bill