I've used XSLT transforms for two personal projects recently.
For viewing the documentation online, I thought it would be fun to use the raw XML file itself and write XSL to transform it into readable xhtml. This is all documentation I've written myself, and so there wasn't a real need for this fancy type of transform. It's fun to literally see the .xml extension in the url, though, and it was a new challenge to write the correct XPath.
See the LnzScript documentation.xml in action here.
Also, there's a software development tool called Runtime Revolution that I've been using for a few years. I wanted to be able to look at its documentation from any computer, without having to first install all of the SDK. I couldn't find its documentation posted anywhere online, and so I decided to find the documentation on my own.
- Step 1: Download this file, unzip it, and copy the contents into Revolution's "components" folder. (The documentation we care about is under the path "components/help/dictionary".)
- Step 2: Open "rev_documentation.html" . If you are questioned about "Active Content", click Allow blocked content. You should now see the Revolution dictionary.
What is xsl/xslt? It's a type of xml file that turns one type of xml into another. The Revolution documentation is in xml format, and web browsers render xhtml, so my xslt sheet converts the documentation into something you can see in the browser. If you want to customize the way things are displayed, edit revDictionary.xsl.