Rich,
I'm not yet convinced that the for attribute is necessary. Presumably,
the schema format itself will be capable of identifying which elements
it defines, meaning that a schema-aware processor could identify which
schema to apply with relative ease. Further, since the atom:content
element is only going to have a single top-level element, it would
follow that within a single atom:entry element, there'd only ever be
reason for a single schema link in the entry. schema links at the feed
level don't make a lot of sense to me since the schema link itself is
part of the entry metadata. Lastly, schema links at the feed level imply
some kind of inheritance model for atom:link elements (e.g. an entry
would inherit the schema links of the parent feed). The challenge with
this is that Atom does not define any such inheritance model for
atom:link and experience has shown that inheritance is not necessarily a
good thing.
My suggestions would be to drop the for attribute, limit the schema link
to one instance per entry, and do not use schema links at the atom:feed
level at all.
- James
Richard Salz wrote:
<link rel="schema" href="..." for="foo" />
<link rel="schema" href="..." for="bar" />
<atom:content type="application/xml+something">
<foo:blarg>...</foo:blarg>
<bar:blarg>...</bar:blarg>
</atom:content>
This is close, the link/@for values would actually be "for='foo:blarg'"
for example.
I went back to the RFC and re-read 4.1.3.1. It appears that you are
right, multiple top-level elements inside atom:content are not allowed.
Rats. But we still need link/@for for use at the feed level, where
individual atom:entry/atom:content elements might have different types of
content. Does that make more sense?
(Original, the schema link was intended for content in an atom:feed
document, but other discussion convinced our group that "content" belonged
in atom:content. When I made that change I didn't go back and carefully
check this. Sorry.)
/r$
--
Visiting Member, IBM Academy
STSM, DataPower Chief Programmer
WebSphere DataPower SOA Appliances
http://www.ibm.com/software/integration/datapower/