firefox icon

Firefox, Atom 1.0 and namespacing

Posted in Wed, 09 Aug 2006 10:16:00 GMT

It seems that Firefox's basic xml parser gets confused by xmlns and namespacing. Namely that if the feed is defined by:

<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:default="http://www.w3.org/1999/xhtml"
xmlns:dc="http://purl.org/dc/elements/1.1/">

Firefox's basic XML tree renderer won't recognize the XML if the entry content is wrapped by:

    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>Show submenus depending on where your users are.</p>
      </div>
    </content>

Basically it confuses xhtml:div with atom:div. If xmlns is removed from the div, Firefox is fine.

People don't generally use Firefox's XML tree to read Atom and the W3C Feed Validator doesn't have a problem with it so I'm wondering if this bug exists anywhere else.

This shows up when using XML::Atom because it uses XML::LibXML, which explicitly adds xmlns everywhere.

UPDATE 1: I thought it would be useful to include the following:

The Atom spec (section 4.1.3.3 Processing Model) says:

If the value of "type" is "xhtml", the content of atom:content MUST be a single XHTML div element [XHTML] and SHOULD be suitable for handling as XHTML. The XHTML div element itself MUST NOT be considered part of the content.

UPDATE 2: Apparently this behavior may be by design. Not very useful IMO but perhaps intentional. I think it would be more useful to have some Firefox settings that let you switch to XML tree mode or apply a default stylesheet.

del.icio.us:Firefox, Atom 1.0 and namespacing digg:Firefox, Atom 1.0 and namespacing reddit:Firefox, Atom 1.0 and namespacing spurl:Firefox, Atom 1.0 and namespacing wists:Firefox, Atom 1.0 and namespacing simpy:Firefox, Atom 1.0 and namespacing newsvine:Firefox, Atom 1.0 and namespacing blinklist:Firefox, Atom 1.0 and namespacing furl:Firefox, Atom 1.0 and namespacing fark:Firefox, Atom 1.0 and namespacing blogmarks:Firefox, Atom 1.0 and namespacing Y!:Firefox, Atom 1.0 and namespacing smarking:Firefox, Atom 1.0 and namespacing magnolia:Firefox, Atom 1.0 and namespacing segnalo:Firefox, Atom 1.0 and namespacing

7 comments