Bill de hÓra wrote:


Thomas Broyer wrote:

I might have not be enough explicit in what I'm suggesting with this Pace: I just want the XHTML div to be optional for people that don't need it but still meeting other people's needs of a "dummy container to carry their XHTML namespace declarations".

That way, those two summaries would be equivalent:
<atom:summary type="xhtml"
   xmlns:atom="...Atom NS..."
   xmlns="...XHTML NS...">
      This is a <em>sample</em> summary.
</atom:summary>

<summary type="xhtml" xmlns="...Atom NS...">
   <div xmlns="... XHTML NS...">
      This is a <em>sample</em> summary.
   </div>
</summary>


-1 to PaceOptionalXhtmlDiv.

If we are dealing with systems where a div wrapper is deemed neccessary, then you want to take steps to miminise people's options.

Do you have examples?

div wrappers are necessary only when producers don't want to use prefixes. I propose an elegant solution where meaningless wrappers (div without any attribute, other than namespace declarations) may/should/must be discarded.

Atom processors will always have to deal with namespaces (because I can still use prefixes for my Atom and/or XHTML elements, even with the format-08 spec) and actually there is no difference at all between taking the mixed content inside the XHTML div and taking the mixed content inside the atom:content.

So the only difference is on the producers side, and people who don't know anything about their XHTML content (and consider it a black box) apart from it to be well-formed and use no prefix, those people can still use a dummy div wrapper acting just like a "namespace declaration carrier".

I don't see the point.


For example, PaceOptionalXhtmlDiv will help this to occur:

<summary type="xhtml"
   xmlns:atom="...Atom NS..."
   xmlns="...XHTML NS...">
      This is one busted-ass document - <em>yow!</em>.
</summary>

Not more than format-08 won't help this not to occur: <summary type="xhtml" xmlns:atom="...Atom NS..." xmlns="...XHTML NS..."> <div> This is one busted-ass document - <em>yow!</em>. </div> </summary>

What will help people who don't know much about XML and namespaces are examples and pieces of advice in the spec. And, actually, people who don't know much about XML and namespace will probably not read the spec but articles published on mass-market web sites...

If you can't trust people not to need the div, then you can't make it optional.

A div (or span) with no attribute has no meaning at all apart from grouping content, which is already done by the atom:content; so it can be discarded without side effects.


I unfortunately have a good amount of experience dealing with this kind of thing outside Atompub. The simplest answer is to stop the 'envelope' from using a default namespace (don't bother to debate this with me, it's not an imo). We're not doing that with Atom. Failing that, the next thing consideration is to add/enforce a protective scoping barrier between the envelope and the content. We are doing that with Atom.

The first solution is not on the protocol side but on the "producers" side: they are responsible of making a well-formed and "valid" document, just like they make well-formed and "valid" MS Word, CSV, etc. documents, SQL queries, etc.
The second one is on the protocol side.


I don't think such a think have to go on the protocol spec. If hacks have to exists to allow prefix-free Atom documents, people wanting them will have to find (it's already done) and use them, without bothering other people with that.

There will be conforming Atom processors, Atom validators, etc. Such a namespace error will show as soon as the Atom document will be read/processed by one of them, that is as soon as it will be used. I don't expect much people continue producing such documents if they're not usable...

--
Thomas Broyer




Reply via email to