Working On Transclusion
The last feature missing from activeRenderer as I need it is transclusion: the ability to expand in place OPML outlines linked from the currently rendered outline.
I recently explored several ways of coding this OPML rendering outside of UserTalk.
My first idea was using the W3C DOM level 1 API from Javascript. Hardly original. I studied opmlLoader from Sjoerd Visscher and Hive Renderer from Andy Edmonds.
Both excellent works rely on the document.load() DOM method to retrieve the original XML file in the browser, then perform transformations in Javascript.
Unfortunately, document.load() doesn't work with non HTML - such as OPML - documents when using non Windows versions of the latest browsers. I tried Mozilla with Redhat Linux 7.2, Chimera 0.28 and Internet Explorer 5.1.4 with MacOS X.
No cross-platform ability: DOM/Javascript is out for now. Time for plan B.
Plan B relies on XSLT stylesheets to transform the OPML file into HTML.
I was reluctant to use XSLT in the first place since the only browser that supports XSLT stylesheets on the client side is Internet Explorer 6 for Windows.
On the other hand, there are a number of reliable server based XSLT engines, such as the Apache group Xalan.
Relying on an external server is less a problem than I would have thought. I will probably code the URL to the server I use in an external global variable, so that it may be changed in a #prefs.txt template file.
My current workstation being a G4 Powerbook, I rely on Marc Liyanage's MacOS X based TestXSLT for experimenting with the Sablotron XSL processor from http://www.gingerall.com/charlie/ga/xml/p_sab.xml.
The pioneer of XSLT based OPML rendering is Joshua Allen, who published an opml.xslt stylesheet quite some time ago.
Joshua's rendered HTML is not compatible with non Windows browsers though. I am currently working on a variation to accomodate for activeRenderer's cross-platform style.
1:16:16 PM Google It!
|