Syndication/formats/metafeed

From Bjoern Hassler's website
Jump to: navigation, search
Syndication: Formats  |  metafeed  |  feedheader  |  short item  |  full item  |  Category:Syndication formats
Using Yahoo media for content aggregation
Working with Yahoo Media
Using media rss to syndicate and share media
Example feeds
Formats
metafeed
feedheader
short item
full item
The yahoo media content and group elements
Enclosures in yahoo media, rss, and atom
Media rss media group element
Media rss media group alternatives scheme
Appendix
Atom media extension
Overview of images in rss

Printing and index

For systematic resource discovery, there needs to be a 'master feed', or a 'root feed'. The emphasis here is on 'systematic': We don't just crawl a website and extract feeds, but we know where to look for the 'root feed' that tells us where to look for other feeds.

Often such a root feed is in opml format, a outline-style format used by feed readers to exchange collections of rss/atom feeds. However, for the 'root feed', I would advocate using rss or atom, rather than opml. This is because opml is weakly defined, and usage is not uniform. (Of course, a syndication application should be able to read opml as well, but here we are proposing an optimal format.)

The choice of Atom/rss has the advantage that the feed structure becomes uniform: Metafeeds and feeds both have essentially the same structure, and can be validated and parsed in the same way.

1 Atom[edit]

To create a metafeed (i.e. a feed linking to several rss/atom feeds), I would suggest atom. It provides almost all you need, in a standardised format, that can be validated.

Comments in-line.

<?xml version="1.0" encoding="utf-8"?>
<feed xmlns=”http://www.w3.org/2005/Atom” 
           xmlns:s=”http://purl.org/steeple/v0.1” 
           xmlns:media="http://search.yahoo.com/mrss/">

 <title>Podcasts from the University of Oxford</title>
 <summary>This is the master podcast feed from Oxford University</summary>
 <link rel="self" href=".../this_feed.xml"  />

 <!-- "link rel=alternate" (for the top level metafeed would point to the Oxford web portal -->
 <link rel="alternate" href=".../some_page.html" />
 <updated>2009-09-13T23:55:18Z</updated>

 <!-- <id> is the id used internally, while <s:id> is the id passed to the syndicator as a suggestion -->
 <id>urn:uuid:...</id>
 <s:id>ox.ac.uk/...</s:id>

 <!-- Author/email should be specified, so that feed owners can be contacted, and receive feedback email. -->
 <author>
 <name>OXITEMS, University of Oxford</name>
 <email>oxitems@...</email>
 </author>

 <!-- The main thing lacking is categories for institution / division / department / group, more details elsewhere. 
           The categories can be specified here, or on an entry-item level below.
           For the organisational master feed, only the 'organisation' is required. If this was a master feed for 
           a department, the corresponding categories would also be present. The 'dividision' is whatever structure
          is present between 'organisation' and 'department', it can be omitted. 
  -->
 <category scheme="http://purl.org/steeple/organisation" label="Oxford University" term="http://www.ox.ac.uk" />
 <category scheme="http://purl.org/steeple/division" label="Humanities Division" term="human" />
 <category scheme="http://purl.org/steeple/department" label="" />
 <category scheme="http://purl.org/steeple/group" label="" />

 <!-- top level image goes here, e.g. Oxford Logo -->
 <media:thumbnail url=".../logo.jpg" width="75" height="50" />

 <entry>
   <title>Distinguished Lecture Series 2009</title>
   <id>urn:uuid:...</id>
   <s:id>ox.ac.uk/...</s:id>
   <updated>2009-09-13T18:30:00Z</updated>
   <summary>Distinguished Lecture Series 2009 featuring 10 outstanding speakers</summary>

   <!-- The key part is the linking to further feeds. 
             We use <content> with appropriate types to link to rss and atom version of the feed,
             depending on which feed types are available. -->
   <link type="application/rss+xml" href="http://rss.oucs.ox.ac.uk/modlang/lectures/rss20.xml" rel="http://purl.org/steeple/subfeed" />
   <link type="application/atom+xml" href="http://rss.oucs.ox.ac.uk/modlang/lectures/atom.xml" rel="http://purl.org/steeple/subfeed"  />

   <!-- The "link rel=alternate" points to the part of the oxford web portal hosting these feeds, 
             or perhaps to a departmental site. -->
   <link rel="alternate" type="text/html" href="http://www.mod-langs.ox.ac.uk">

   <!-- entry level image goes here, e.g. series logo -->
   <media:thumbnail url=".../logo.jpg" width="75" height="50" />

   <!-- Categories for institution can be added here and will override categories set above. --->
   <category scheme="http://purl.org/steeple/division" label="Humanities Division" term="human" />
   <category scheme="http://purl.org/steeple/department" label="" />
   <category scheme="http://purl.org/steeple/group" label="" />
 </entry>

  <!-- More entries can be added here ... -->
</feed>

2 RSS[edit]

The rss version uses rss constructs where possible to replace the atom constructs. However, the some key elements (such as atom:content and atom:link in the items themselves) still use atom contracts.

As far as the syndication is concerned, the rss is essentially equivalent to the atom version.

<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" 
    xmlns:atom="http://www.w3.org/2005/Atom" 
    xmlns:s=”http://purl.org/steeple/v0.1” 
    xmlns:media="http://search.yahoo.com/mrss/">

 <title>Podcasts from the University of Oxford</title>
 <atom:link rel="self" href=".../this_feed.xml"  />
 <atom:link rel="alternate" href=".../some_page.html" />
 <guid isPermaLink="false">urn:uuid:...</guid>
 <s:id>ox.ac.uk/...</s:id>
 <pubDate>2009-09-13T23:55:18Z</pubDate>
 <author>
 <name>OXITEMS, University of Oxford</name>
 <email>oxitems@...</email>
 </author>
 <description>This is the master podcast feed from Oxford University</description>

 <atom:category domain="http://purl.org/steeple/organisation" label="Oxford University" />
 <atom:category domain="http://purl.org/steeple/division" label="Humanities" term="human" />
 <atom:category domain="http://purl.org/steeple/department" label="" />
 <atom:category domain="http://purl.org/steeple/group" label="" />

 <media:thumbnail url=".../logo.jpg" width="75" height="50" />

 <item>
   <title>Distinguished Lecture Series 2009</title>
   <guid isPermaLink="false">urn:uuid:...</guid>
   <s:id>ox.ac.uk/...</s:id>
   <pubDate>2009-09-13T18:30:00Z</pubDate>
   <description>Distinguished Lecture Series 2009 featuring 10 outstanding speakers</description>
   <link type="application/rss+xml" href="http://rss.oucs.ox.ac.uk/modlang/lectures/rss20.xml" rel="http://purl.org/steeple/subfeed" />
   <link type="application/atom+xml" href="http://rss.oucs.ox.ac.uk/modlang/lectures/atom.xml" rel="http://purl.org/steeple/subfeed"  />
   <atom:link rel="alternate" type="text/html" href="http://www.mod-langs.ox.ac.uk">
   <atom:category domain="http://purl.org/steeple/division" label="Humanities" term="human" />
   <atom:category domain="http://purl.org/steeple/department" label="" />
   <atom:category domain="http://purl.org/steeple/group" label="" />
   <media:thumbnail url=".../logo.jpg" width="75" height="50" />
 </item>

</rss>

3 OPML[edit]

Here is a version of the feed in opml (as currently used by oxford). Because opml isn't properly specified, it's hard to validate. The use of url/htmlurl/xmlurl isn't necessarily standardised.

There are also things that would possibly need to be 'invented' from scratch, such as placing an image as a top level image, or a detailed category scheme.

<?xml version="1.0" encoding="utf-8"?>
<opml version="2.0">
  <head>
    <title>Podcasts from the University of Oxford</title>
    <ownerName>OXITEMS, University of Oxford</ownerName>
    <ownerEmail>oxitems@...</ownerEmail>
    <dateCreated>Sun, 13 Sep 2009 23:55:18 +0100</dateCreated>
    <dateModified>Sun, 13 Sep 2009 23:55:18 +0100</dateModified>
  </head>
  <body>
    <outline 
      category="/division_code/human,/division_name/Humanities+Division" 
      description="Distinguished Lecture Series 2009 featuring 10 outstanding speakers" 
      htmlUrl="http://www.mod-langs.ox.ac.uk" 
      text="Distinguished Lecture Series 2009" 
      title="Distinguished Lecture Series 2009" 
      type="rss" 
      version="RSS2" 
      xmlUrl="http://rss.oucs.ox.ac.uk/modlang/lectures/rss20.xml" 
    />
 </body>
</opml>

4 Notes[edit]

Incidentally, the new apple podcast producer 2 shipped with snow leopard also uses atom for the podcast library. The above use of the atom specification was written without reference to PCP2, but once I've looked at PCP2, we'll probably revise it a little to harmonise the use of the atom format for this purpose.Template:SMN