[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem with Metadata Elements (section 6.4)
I was discussing extensions offlist with Dave Powell and came to explain
what I previously said on the list about Simple/Structured Extension
Elements [1] when I thought I found a real problem with that.
There have been much discussion last weeks about authors, contributors and
bylines and bylines were rejected to extensions (and I'm +1 on that,
that's not the point). So imagine I want to create such a byline
extension.
Ideally, I'd like it to be text that can be enriched with some markup. The
obvious choice here is to reuse the Text Construct mechanism: it is
already implemented in every Atom Processor so adding support for my
byline extension would be made much easier than redefining a different
mechanism, and of course it is homogeneous with Atom so better for users.
So my ext:byline element MAY have a "type" attribute with value "text",
"html" or "xhtml". When not present, it defaults to "text". Depending on
the "type" attribute's value, the content is "plain flowed text", escaped
HTML or an XHTML div.
My byline extension then looks like the following, and is obviously a
Structured Extension Element (as it comes in atom:feed, atom:entry or
atom:source):
<ext:byline type="text">By Thomas Broyer and al.</ext:byline>
<ext:byline type="html">By <a href="http://www.ltgt.net/">Thomas
Broyer</a> and al.</ext:byline>
<ext:byline type="xhtml">
<div>By <a href="http://www.ltgt.net/">Thomas Broyer</a> and al.</div>
</ext:byline>
The problem come when I use a "plain flowed text" and can then omit the
"type" attribute:
<ext:byline>By Thomas Broyer and al.</ext:byline>
My extension becomes a Simple Extension Element when processed by an Atom
Processor, and an Atom Processor having some "generic support" for Simple
Extension Elements (which is really the intent of SEE) would change its
behavior when processing it, which is not really wanted.
However, I don't think I badly designed the byline extension, or this
would imply that Atom itself is badly designed (and I don't think so).
Are other people here seeing a problem with Simple vs. Structured
Extension ELements or am I the only one?
[1] http://www.imc.org/atom-syntax/mail-archive/msg15751.html
--
Thomas Broyer