in OPML, Software Development

Getting started with Federated Bookshelves

Some time ago, I read a post from Ton Zijlstra on the concept of federated bookshelves. His original post was riffing on an idea by Tom Critchlow called Library-JSON. Recently, Ton revisited this topic, and in a short period of time created a working prototype OPML file and a XSL stylesheet to view the OPML file.

I finally had some time this weekend to play around with this. Here is my work so far:

I had some problems using Ton’s XSL file. On my server, when I entered the URL of the OPML file, all that was displayed was the OPML file. However, I found a tool to apply the XSL transformation, and the resulting file was a valid HTML page (the “transformed file” above). I will continue to investigate this and also reach out to Ton to see if I did something wrong.

Write a Comment

Comment

  1. Recently I created a proof of concept of publishing book lists, what I’ve read, what I plan to read etc., using OPML. Andy Sylvester picked it up and created his own list, as a way of experimenting with federated bookshelves. He used the XSLT style sheet I created to be able to render the OPML file in a human readable way in your browser. It seems to work, although it doesn’t render in the browser yet.
    Andy, I think the reason it doesn’t render in the browser is because you are loading the style sheet from my domain. The XSLT file must be hosted on the same domain as the OPML file, otherwise it triggers cross-site scripting protections. It should work properly if you download the XSLT I use and put it on your own host.
    Hosting the XSLT style sheet also allows you to adapt one other detail: right now there are some tweaks in my version based on the author name of a collection or feed. If it is my name it renders as ‘my list’ and otherwise as ‘list I follow’. When you self host the style sheet you can change the mentions of my name to yours and it will make the proper distinction between your lists and lists you follow.

  2. Not sure if my webmentions are coming through. The issue is that you’re loading the stylesheet from my domain, but the stylesheet must be on the same domain as the XML being styled. Otherwise it’s treated as an cross site scripting issue.

  3. Ton, I just approved your comments, thanks for pointing out the XSL reference issue, I will update later today and test.

  4. @frankm thanks for the idea! I did use Little Outliner to create my test file, then added a stylesheet element for the rendering. I also found that my web hosting needs to have the extension of the file be .xml instead of .opml to be able to render it. I am investigating how to update the MIME types on my web host.

  5. @frankm thanks for the idea! I did use Little Outliner to create my test file, then added a stylesheet element for the rendering. I also found that my web hosting needs to have the extension of the file be .xml instead of .opml to be able to render it. I am investigating how to update the MIME types on my web host.

  6. @AndySylvester I think Dave figured that all out with PagePark. He has a template and a CSS for how it renders OPML files so you could do something other than way Dave set it up.

  7. @frankm I will install PagePark and play with it this weekend. I am trying this other method as well because not everyone will install PagePark, but a lot of people have web hosting available to them.

Webmentions

  • Recently, Ton Zijlstra wrote about the concept of “federated bookshelves”, in which he referenced a post by Tom Critchlow on a similar concept called “Library JSON”. I have played with this idea based on Ton’s proof of concept. I also read through the postings flowing from Tom Crichlow’s post in 2020, and the ones from Ton Zijlstra’s post this year, and thought it would be helpful to provide a chronology of the development of this idea. To this end, I have created a Github repo with a chronology and links to tools and other distributed book info concepts that I have come across in reading on this topic. Pull requests and other comments are welcome! I am planning to spend more time on this in the next few weeks, so hopefully more prototypes and ideas to come….

  • Dave Winer posted a few days ago that he was looking for examples of OPML in “production”. I assume that means “being used by someone or in an app”. I thought I would contribute a few items…
    Zylstra.org – Ton Zijlstra’s OPML blog roll in a human readable form (reference)
    Zylstra.org – Ton Zijlstra’s booklist in OPML (reference)
    AndySylvester.com – Andy’s beginning booklist in OPML (reference)
    AndySylvester.com – Reading lists in OPML for the River5 feed reader/aggregator