Another is jquery.xslTransform at http://jquery.glyphix.com/jquery.xslTransform/example/index.html
// now load both files into variables for the next 2 transformations var xsldoc = $.xsl.load('test.xsl'); var xmldoc = $.xsl.load('test.xml'); // with an xpath $('#with').getTransform( xsldoc, xmldoc, { xpath: '/test/inside' } );
Or as indicated in the general documentation:
$.getTransform( 'path-to-xsl.xsl', // path or xsl document in javascript variable 'path-to-xml.xml', // path or xml document in javascript variable { params: { // object for your own xsl parameters paramName1: 'paramValue1', paramName2: 'paramValue2' }, xpath: '/test/inside', // trims your xml file to that defined by this xpath eval: true, // evaluates any <script> blocks it finds in the transformed result callback: function(){} // getTransform evaluates this function when transformation is complete }); // loads an xml file, parses it and stores it in xmlDoc var xmlDoc = xslTransform.load('path-to-xml.xml');
Here is an example of use on a linked page, suggesting that it can satisfy your needs, although it is a javascript-based sarissa shell that attempts to create a browser-independent API for XSL tools in all browsers.
source share