On Friday, April 15, 2005, at 02:30  PM, A. Pagaltzis wrote:


* A. Pagaltzis <[EMAIL PROTECTED]> [2005-04-15 20:20]:
* Antone Roundy <[EMAIL PROTECTED]> [2005-04-15 00:10]:
<feed xmlns="our namespace URI">
...
<atom:content type="XHTML" xmlns:atom="our namespace URI"
xmlns="XHTML's namespace URI">
<div>This is XHTML content,<br />
and the default namespace is XHTML's.</div>
</atom:content>

I like this. A lot.

One better, with my @type='xml' suggestion instead of @type='xhtml':

    <feed xmlns="atom-ns-uri" xmlns:atom="atom-ns-uri">
        <!-- ... -->
        <atom:content type="xml" xmlns="http://www.w3.org/1999/xhtml";>
            <p>This is XHTML content.</p>
            <p>The default namespace is XHTML's.</p>
        </atom:content>
        <!-- ... -->
    </feed>

That gets rid of the need to declare the atom: prefix over and
over.

While this approach has it's appeal, I'm pretty sure I'm in favor of keeping "xhtml" as a special case for a few reasons:


1) I presume ("when you presume you make a pres of you and me"?) that XHTML is going to be by far the most common XML type used in atom:content, and least for a while.

2) It makes it more difficult to determine the type of data. We know it's XML, but to find out whether it's a flavor of XML that we know how to deal with, we have to discover the namespace of the content. That will sometimes be easy to determine, as in the example above, because the namespace is declared on the content element. However, sometimes, it may be done like this:

    <feed xmlns="atom-ns-uri" xmlns:xhtml="xhtml-ns-uri">
        <!-- ... -->
        <content type="xml">
            <xhtml:p>This is XHTML content.</xhtml:p>
            <xhtml:p>The default namespace is XHTML's.</xhtml:p>
        </content>
        <!-- ... -->
    </feed>

In this case, we'd have to find a child element and check it's namespace. We've already discussed and rejected the idea of requiring namespaces to be declared at a particular point in Atom documents, so I think requiring to be declared in atom:content to make the type discovery easy has already been rejected.

The alternative would be to use the full MIME type instead of just "xml" and use that instead of the namespace to discover the type. But there's still a problem...

3) Some people are still going to do it the way it's being done now, leaving us with the ambiguous status of the div. Is it part of the content or just a container?

Antone



Reply via email to