Daniel Aleksandersen wrote:
<feed … xmlns:xht="http://www.w3.org/1999/xhtml">
…
<summary type="application/xhtml+xml">
<xht:p>This is a <xht:em>summary</xht:em> paragraph.</xht:p>
</summary>
…
</feed>
Is there a better way of doing this? —with ‘better’, I am ‘better
supported and with a higher adoption rate’. My main concern is that some
feed readers may not be able to support my undocumented
implementation/interpretation. Anyone got any experiences in this field?
First off, summary elements can't have a type of "application/xhtml+xml" -
MIME media types are only permitted on content elements.
However, if you're happy to use a content element, then
"application/xhtml+xml" works almost as well as "xhtml" in my experience.
The catch is that you must use an xhtml fragment. If you include a full
xhtml document (as recommended by the spec), your results will tend to be a
lot worse.
Whatever you do, though, don't use namespace prefixes - aggregators don't
deal at all well with that.
And in case it's not obvious, your best bet is actually to avoid xhtml
altogether and use escaped html - but I suspect you won't want to do that.
Regards
James