Re: Atom vs Polyglot

On 21/03/2013 15:38 , Noah Mendelsohn wrote:
> There's every chance I'm mistaken in this, in which case I apologize. My
> recollection of ATOM is that it is an RSS-like format that is required
> to be well formed XML. If that recollection is wrong, then my comment
> makes no sense.
>
> My understanding is that it's often useful to include in ATOM feeds
> fragments of HTML "snipped" from the blogs, etc. that are being
> summarized. My assumption was that there might be a need for the blogs
> themselves to be served text/html, but for the snippets in ATOM to be,
> essentially, XHTML fragments. One way (not the only way) to achieve this
> would be to restrict at least the "snippable" parts of the blog to
> polyglot.

Atom has type="html" precisely for this purpose. It basically requires 
its content to be escaped. Perhaps not a solution of jaw-dropping 
elegance, but in practice it is easier to just escape than to provide an 
alternative serialisation of the same content.

-- 
Robin Berjon - http://berjon.com/ - @robinberjon

Received on Thursday, 21 March 2013 14:44:35 UTC