Creating Custom XSLT Files Offline
The process of working with XSLT files for Portfolio Templates and Forms can be laborious to implement when needing to continually upload materials and preview them in a running Sakai installation. U-M has developed a utility to help make this process more manageable. It is called xslt-facade since it provides a façade for the runtime support of Sakai/OSP (by way of the XsltFunctions extension). It allows the XSL files to be created and run offline without any changes, to accelerate the process and afford the use of tools like a debugger.
Note that a document that walks you through the process of creating alternate form renderers (custom renderers) using xslt-facade is available at Creating Custom Renderers.
Stylesheets used for OSP typically include the XsltFunctions extension like this (note
These stylesheets then use the extension for things like looking up URLs for materials from resources, inserting the code for loading the rich text editor, and some others. Here is an example call to load the editor:
When running within a Sakai instance, these work fine. However, when working with these files offline within, e.g., <oXygen/>, the extension is not available and causes any attempted transformations to fail. Removing the extension declaration and the calls to the various functions to test offline is tedious and error prone when uploading the files back to the server to test online.
The xslt-facade JAR is a single file that provides an offline replacement for the runtime infrastructure of a Sakai instance. It is easy to use the extension from <oXygen/> or other Java-based methods of transformation (such as a custom Xalan loader). The code is licensed under the ECL v2 (the same as Sakai) and is available in contrib. There is also a compiled copy of v1.0 attached to this page.
Compiled extension JAR: xslt-facade-1.0.jar