I finally had some time this weekend to play around with this. Here is my work so far:
- My first booklist in OPML format
- The transformed file
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.
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.
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.
Ton, I just approved your comments, thanks for pointing out the XSL reference issue, I will update later today and test.
@AndySylvester You could simply edit the reading list in Little Outliner (to maintain the OPML) and use PagePark to server, which is basically what is going on here: my.this.how/frankm/20…
@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.
@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.
@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.
@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.