Antone Roundy wrote:
Processing type="xhtml" and type="application/xhtml+xml" are very different beasts.

In theory, yes. In practice, no. Bare in mind that the 0.3 Atom spec had type="application/xhtml+xml" with basically the same functionality as the current type="xhtml". Now since Atom 0.3 is still a whole lot more widely used than Atom 1.0, you can be fairly sure than anyone that bothers to handle XML content at all will be capable of handling type="application/xhtml+xml" containing xhtml fragments.

It's possible that an aggregator might specifically check for version 1.0 of Atom and choose to process type="application/xhtml+xml" in a different way, but that is extremely unlikely. Every Atom aggregator that I've tested that was capable of processing XML content (admittedly not that many) has been able to process xhtml fragments when labeled with type="application/xhtml+xml".

With type="application/xhtml+xml", you'd have to figure out to do with everything outside of the <body> element. If there's CSS involved for example, simply throwing it away could lead to some very messed up display.

If an aggregator is filtering (x)html content to strip nasty tags (and I'd hope that most are) then they should already be stripping css. And since there's nothing stopping a malicious content provider from including a full xhtml document as part of type="xhtml" content (yes, it's illegal, but that doesn't stop it), a careful aggregator should already be stripping off any other sub-elements of <head> that might cause problems.

Given the tremendously increased complexity involved, some apps are likely to refuse to process anything that's not one of Atom's three special types.

It doesn't have to be more complex. If you are already handling type="xhtml" safely, it's perfectly feasible to treat type="application/xhtml+xml" in the same way (and most aggregators do). And it certainly isn't advisable to only support Atom's three special types when there are considerably more feeds using MIME types than there are feeds using the basic three.

Regards
James

Reply via email to