Discussion:
Human/machine views for feeds (1.0, 2.0, Atom)
Hammond, Tony
2007-01-25 14:41:40 UTC
Permalink
Hi:

Am looking for some feedback on an approach we are looking at to upgrade our
current RSS feeds (RSS 1.0) to a wider (and neutral) offering (RSS 1.0, RSS
2.0, Atom) which supports both machine and human readable views. Demo
versions (largely complete; filenames just temporary) are available at

RSS 1.0 - http://nurture.nature.com/tony/rss/nature_rdf.rss

RSS 2.0 - http://nurture.nature.com/tony/rss/nature_rss.rss

Atom - http://nurture.nature.com/tony/rss/nature_atom.rss

Some notes below.

Cheers,

Tony


RSS 1.0

Human - Seems to be simply a question of adding in XHTML markup as a CDATA
section within a <content:encoded> element.
Machine - RDF properties already provide for this.

RSS 2.0 - (I know, but still evaluating)

Human - We follow general practice and add XHTML markup as a CDATA section
within the <description> element.
Machine - We use XML namespaces and mimic the RDF properties of RSS 1.0.

Atom - (See skeleton below)

Human - We add in XHTML markup within a <content type="xhtml"> element.
Machine - We add in a complete RSS 1.0 item (sans <content:encoded> element)
within a <content type="application/rdf+xml"> element. This seems preferable
to defining arbitrary RDF/XML and provides best fit with the RSS 1.0 feed.
In essence the Atom entries contain standalone RDF islands along with an
XHTML view.

One question would be whether to explicitly namespace the RSS elements (e.g.
"rss") or just to use a default XML namespace.

###
Atom (Skeleton)

<feed xmlns="">
<title type="text"></title>
<updated/>
<id/>
<link rel="alternate" type="" href=""/>
<link rel="self" type="" href=""/>
<rights/>
<entry/>
</feed>

<entry>
<title/>
<link rel="alternate" type="" href=""/>
<id/>
<updated/>
<published/>
<author>
<name/>
<uri/>
<email/>
</author>
<contributor>
<name/>
</contributor>
<content type="xhtml" xml:lang="">
<div xmlns="http://www.w3.org/1999/xhtml">
Š
</div>
</content>
<content type="application/rdf+xml">
<rdf:Description xmlns:rss="..." xmlns:rdf="..." xmlns:dc="..." ... >
<rss:item rdf:about="http://...">
<rss:title/>
<rss:ink/>
<rss:description/>
<dc:title/>
<dc:creator/>
<dc:identifier/>
<dc:source/>
...
</rss:item>
</rdf:Description>
</content>

</entry>
###

********************************************************************************
DISCLAIMER: This e-mail is confidential and should not be used by anyone who is
not the original intended recipient. If you have received this e-mail in error
please inform the sender and delete it from your mailbox or any other storage
mechanism. Neither Macmillan Publishers Limited nor any of its agents accept
liability for any statements made which are clearly the sender's own and not
expressly made on behalf of Macmillan Publishers Limited or one of its agents.
Please note that neither Macmillan Publishers Limited nor any of its agents
accept any responsibility for viruses that may be contained in this e-mail or
its attachments and it is your responsibility to scan the e-mail and
attachments (if any). No contracts may be concluded on behalf of Macmillan
Publishers Limited or its agents by means of e-mail communication. Macmillan
Publishers Limited Registered in England and Wales with registered number 785998
Registered Office Brunel Road, Houndmills, Basingstoke RG21 6XS
********************************************************************************
James Holderness
2007-01-25 16:46:04 UTC
Permalink
Post by Hammond, Tony
Human - We add in XHTML markup within a <content type="xhtml"> element.
Machine - We add in a complete RSS 1.0 item (sans <content:encoded> element)
within a <content type="application/rdf+xml"> element. This seems preferable
to defining arbitrary RDF/XML and provides best fit with the RSS 1.0 feed.
In essence the Atom entries contain standalone RDF islands along with an
XHTML view.
One major problem is that Atom doesn't allow multiple content elements per
item. I suppose you could put the XHTML in a summary element and leave the
RDF stuff in the content element, but the XHTML isn't really a summary of
the RDF stuff is it? It's probably more appropriate to just have the XHTML
in the content element and then include an alternate link element pointing
to the RDF stuff externally.

Also, your dates and ids aren't valid, but that should be easy to fix.

Regards
James
Hammond, Tony
2007-01-26 12:16:00 UTC
Permalink
Thanks, James.

Gosh, I¹ve got a big red face now. I hadn¹t realized that Atom had a one
content element only per entry restriction. (Was thinking that it had this
real neat content packaging mechanism which would allow for multiple content
views for an entry regulated by media type.)

Ho, hum! Well, certainly agree that the content payload should be an XHTML
fragment. So now, as for structured semantic markup then we could just add
in XML namespaced properties (and do the same for RSS 2.0) although I know
that some really simple processors have problens with namespaces and
especially elements sporting the same name in multiple namespaces.
Preferable would be to reference a standalone RDF description. Perhaps I
could reference the RSS 1.0 feed? And if I wanted to do that on a per-item
basis how best would I index into an RSS 1.0 feed? I don¹t seem to have IDs
on the item elements.

(I note that Atom does allow for <link/> elements, and that RSS 2.0 always
has the <enclosure/> element ­ both taking a media type, I believe.)

Cheers,

Tony


On 25/1/07 16:46, "James Holderness" <j4_james-***@public.gmane.org> wrote:25/1/07
16:46
Post by James Holderness
Post by Hammond, Tony
Human - We add in XHTML markup within a <content type="xhtml"> element.
Machine - We add in a complete RSS 1.0 item (sans <content:encoded> element)
within a <content type="application/rdf+xml"> element. This seems preferable
to defining arbitrary RDF/XML and provides best fit with the RSS 1.0 feed.
In essence the Atom entries contain standalone RDF islands along with an
XHTML view.
One major problem is that Atom doesn't allow multiple content elements per
item. I suppose you could put the XHTML in a summary element and leave the
RDF stuff in the content element, but the XHTML isn't really a summary of
the RDF stuff is it? It's probably more appropriate to just have the XHTML
in the content element and then include an alternate link element pointing
to the RDF stuff externally.
Also, your dates and ids aren't valid, but that should be easy to fix.
Regards
James
********************************************************************************
DISCLAIMER: This e-mail is confidential and should not be used by anyone who is
not the original intended recipient. If you have received this e-mail in error
please inform the sender and delete it from your mailbox or any other storage
mechanism. Neither Macmillan Publishers Limited nor any of its agents accept
liability for any statements made which are clearly the sender's own and not
expressly made on behalf of Macmillan Publishers Limited or one of its agents.
Please note that neither Macmillan Publishers Limited nor any of its agents
accept any responsibility for viruses that may be contained in this e-mail or
its attachments and it is your responsibility to scan the e-mail and
attachments (if any). No contracts may be concluded on behalf of Macmillan
Publishers Limited or its agents by means of e-mail communication. Macmillan
Publishers Limited Registered in England and Wales with registered number 785998
Registered Office Brunel Road, Houndmills, Basingstoke RG21 6XS
********************************************************************************


[Non-text portions of this message have been removed]

Loading...