Martin Duerst wrote:
At 22:59 05/02/08, Julian Reschke wrote: >http://www.intertwingly.net/wiki/pie/PaceXhtmlNamespaceDiv
I have looked at this pace only just very recently, after following the discussion. So I first want to make sure I get the current status of this proposal right.
As I currently read it, it does:
1) Require an <xhtml:div> as the only direct child of content of type XHTML 2) Not limit the placement of namespace declarations in any way above and beyond those given in the Namespace spec. 3) Not require any specific namespace prefixes.
If 2) and 3) are correct, I can live with this proposal. Anything changing 2) or 3), as may have been previously in this Pace, would get something like a -2 from me. Specs, in particular such fundamental ones as XML Namespaces, are there to be used as is, not to be tweaked.
Agreed.
As for 1), I could live with it, but the rationale given for it in the current version says: "Given that even we often forget when writing examples to declare the XHTML namespace for XHTML text constructs and content elements, it seems likely that people producing actual feeds will forget to do so unless the requirement to do so is stated prominently and unambiguously."
This doesn't seem to match the proposal, where Namespace declarations are only used in the examples, but not mentioned in the text. So while (as said above) I can live with 1), insisting on 1) without a better rationale doesn't seem to make sense to me.
If the concern expressed in the rationale is important (and I can agree it is), then addressing this concern can be done in less constricting ways, i.e. by replacing the requirement for a <div> with something like:
Note: It is important to make sure that correct namespace declarations for XHTML are present. One way to do this is by using an <xhtml:div> element as the content of the <atom:content> element and specifying the XHTML namespace on that div element. Here are some examples: ... [use proposed examples] There are other ways to declare the namespace URI for XHTML content; this specification does not limit the placement of such declarations in any way.
Here's the key question. Consider the following XML fragment:
<summary type='XHTML'><div xmlns='http://www.w3.org/1999/xhtml'>Hey, this is my space, if I want to run a picture of a chair I can. And it’s a <em>nice</em> chair.</div></summary>
Given this fragment, what is the value of the summary? Is the div element to be considered part of the format (and therefore not part of the summary). Or is the div element to be considered part of the summary itself.
Assume for the moment that it is part of the summary. You can give the author a bit of poetic license and say that this is valid. If you look at Tim's feed, you will see that a similar approach is used for syndicating content. The validity of that is not quite so clear.
Now consider what happens when data is resyndicated (Planet XML, for example). If such tools add a div element, and the div element is considered part of the summary/content, then they are technically wrong. But this will likely go unnoticed for a while as visually the results appear correct.
Now consider what happens if tools that implement the protocol do likewise. Get a feed, modify an entry, and POST it. Over time, you will end up with telescoping divs.
The solution that some will likely come up with will be to ignore enclosing divs.
Some may do this. Some may not.
Now assume for the moment that the div is not part of the summary.
- Sam Ruby