Tuesday Feb 27, 2007

OpenId for blogs.sun.com ?

The volume of posts on OpenId, is clearly growing in importance, and big players such as AOL and Microsoft are joining the party. The technical introduction for web developers on the openid wiki will help make more sense of the following discussion:

Given the Web 2.0 is so very much about Micro Killer Apps single sign on is an absolute necessity. As Paul Diamond notes web 2.0 has created a huge number of services that need to be integrated. Indeed, there are services (eg Convinceme) I have not used recently, or blogs I have not responded to, just because I did not want to go through yet another sign on service.

Having OpenId on blogs.sun.com would allow many nice features. Once someone had been allowed to answer a comment on a blog, they could be enabled for every other comments they make without requiring any further aproval. One could generalize this to allow anyone who had ever been allowed by someone on blogs.sun.com to comment, or to all of one's friends as specified in a foaf file.
Danbri points to Doxory.com (tag line: life by committee) as being one such service that uses both the openid information with a foaf file to provide some interesting service. Danny Ayers points to videntity.org as one of the many open id identity registrars that offers you a foaf file. Open Data Spaces, which is built on Virtuoso uses the same url for the openid and the foaf file, and furthermore that URL is editable using WebDav!

Having read the technical introduction carefully, I think the meshing with foaf is simply accomplished like this:
The Foaf url can simply be the open id. According to current OpenId specs the id would have to be able to return a text/html representation, so that the consumer (the blog that is requiring authentication for example), can search the html for the openid.server link relation. The foaf id would then also be able to return and xml/rdf representation by a client on request. This would save the end user from having to learn two different ids, and it would be a way of authenticating a foaf file on top of it. In this scenario the html representation should have a foaf link relation pointing back the the same url.

Otherwise it would probably be useful to have a sioc property to link to an open id.

Monday Nov 06, 2006

How to create an RSS1.0 feed in Roller 3.1

Of the many feed formats, only two have long term viability: Atom and RSS 1.0. RSS1.0 is an rdf crystallization, which means that it is easy to parse using simple xml DOM and xslt tools and also very easy to extend. It is easy to extend because it is RDF, and so the interpretation of the extensions are given automatically by the rdf semantics. In the Atom world, understanding extensions always requires one to find the particular RFC for the extension (if there is one) and read it carefully. Machines cannot do very much with atom extensions, other than ignore them. RSS1.0 extensions on the other hand can be processed and partially understood by RDF tools, even if they never heard about them before.

Roller automatically creates Atom feeds now (I added mine a while back). Here is how to create an RSS1.0 feed in the latest version of Roller (which now supports tagging).

  1. Log in to your roller account
  2. Click on the Preferences Tab
  3. Click on Templates
  4. In the "Add a new template" entry box add a name such as rss10.xml (make sure your file name ends in xml, and click add.
  5. In the form add the following template
    <?xml version="1.0" encoding='utf-8'?>
    <rdf:RDF xmlns="http://purl.org/rss/1.0/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
     #set($blg = $model.weblog)
     #set($items = $model.weblog.getRecentWeblogEntries("SemWeb", 25))
     <channel rdf:about="$url.home">
       <title>$utils.escapeXML($blg.name)</title>
       <link>$url.home</link>
       <description>$utils.escapeXML($blg.description)</description>        
       <dc:date>$utils.formatIso8601Date($blg.lastModified)</dc:date>
       <admin:generatorAgent rdf:resource="http://rollerweblogger.org/"/>
       <items>
          <rdf:Seq>
          #foreach($item in $items)
            <rdf:li rdf:resource="$item.permalink"/>
          #end
          </rdf:Seq>
       </items>
     </channel>
    
    #foreach($item in $items)
      <item rdf:about="$item.permalink">
         <title>$utils.removeHTML($item.title)</title>
         <link>$item.permalink</link>
         <dc:date>$utils.formatIso8601Date($item.updateTime)</dc:date>
         <dc:creator>$item.creator.fullName</dc:creator>
         <foaf:maker xmlns:foaf="http://xmlns.com/foaf/0.1/">
            <foaf:Person rdf:about="http://bblfish.net/people/henry/card#me">
              <foaf:name>$item.creator.fullName</foaf:name>
            </foaf:Person>
         </foaf:maker>
         #foreach ($cat in $item.categories)
         <dc:subject>$cat.name</dc:subject>
         #end
         #foreach ($tag in $item.tags)
         <dc:subject>$tag.name</dc:subject>     
         #end
         #if( $utils.isNotEmpty($item.summary) )
         <description>$utils.escapeXML($item.transformedSummary)</description>
         #end
         #if( $utils.isNotEmpty($item.text) )
         <content:encoded>$utils.escapeXML($item.transformedText)</content:encoded>
         #end
      </item>
    #end
    </rdf:RDF>
    
  6. adapt the above to your needs.
    • The above feed only selects entries from the "SemWeb" category. If you would like to have all entries appear replace the SemWeb above with nill
    • http://bblfish.net/people/henry/card#me is my web 2.0 name. If you have your own, make sure to replace mine with yours, otherwise remove the rdf:about="..." attribute from the template.
  7. Your rss feed is now available at http://blogs.sun.com/${blogname}/page/rss10.xml. Mine is available http://blogs.sun.com/bblfish/page/rss10.xml

About

bblfish

Search

Archives
« April 2014
MonTueWedThuFriSatSun
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today