Here's a question,

In Section 6.2 of RFC 4287, it says the following:

   The Atom namespace is reserved for future forward-compatible
   revisions of Atom.  Future versions of this specification could add
   new elements and attributes to the Atom markup vocabulary...  For the
   purposes of this discussion, unrecognized markup from the Atom
   vocabulary will be considered "foreign markup".

The beginning of Section 6.3 goes on to say...

   Atom Processors that encounter foreign markup in a location that is
   legal according to this specification MUST NOT stop processing or
   signal an error.

With that in mind, consider this example:

  <feed xmlns="http://www.w3.org/2005/Atom"; dir="rtl">
    ...
  </feed>

The dir attribute is defined in an Internet-Draft:

  http://www.ietf.org/internet-drafts/draft-snell-atompub-bidi-04.txt

As of today, if you run a feed containing the dir attribute through the
Feed Validator today, it will throw an error complaining about the
unknown dir attribute:

This feed does not validate.

    * line 2, column 0: Unexpected dir attribute on feed element [help]

          <a:feed xmlns:a="http://www.w3.org/2005/Atom";

Because the dir attribute is defined by an I-D, Sam has agreed to change
the validator to return a warning instead of an error but this opens up
a more general question about the use and treatment of non-namespaced
extension attributes within Atom.  According the language in Section 6.2
and 6.3, such attributes are to be treated as foreign markup and
ignored.  However, doing so makes validation difficult because of the
difficultly in differentiating between a truly unknown attribute and a
misspelled one.  For instance, <link ref="via" href="foo" /> Is "ref"
actually supposed to be "rel" or is it really "ref".

Sam's position (which he can correct if I have misstated anything) is
that the validator should take a strict approach and mark all unknown,
non-namespaced attributes as an error unless there is a known
specification that is specifically updating RFC4287, as is the case with
the Bidi draft.

I wanted to see what others thought about this.  How should such
extensions be treated?  What if someone wanted to come along and invent
a new element in the atom namespace, e.g. <atom:foo />.  What should the
validator do?  Ignore it? Signal an error?

- James

Reply via email to