In a nutshell, we have an XSLT file takes forum discussions and posts in a moodle.xml file from a course backup archive and renders them out to an HTML file. The rendered page is portable and contains the discussions and posts in their original structure but without the original Moodle theme and header/footer. It also includes some JavaScript which lets the reader expand/collapse the discussions.
There is obviously some risk that the moodle.xml schema might change over time but updating the XPath statements for major versions of Moodle wouldn't be too much of a chore. There are no custom or extension functions in the XSLT file so it should run happily on any platform that has an XSLT engine installed (sablotron, libxslt, saxon etc). Having said that, one area where an extension function would be useful is in turning the timestamp integer values from the xml into human-readable textual forms.
We use it from the command-line at the moment but it should be possible to run it as a CGI under any language that has XSLT support (ie most) with an upload form a user could use to submit their archive file. Some of the XPath statements do traverse via the rootnode when looking up user names based on IDs so performance may be a consideration in a CGI usage for a bigger moodle.xml file with lots of discussions/posts.
Be interested in any feedback on the approach and to hear about anyone else doing something similar. You can download the file here and I've attached a screenshot of a sample rendering (customisable thru CSS)
