Skip to content
treewyrm edited this page Jun 17, 2012 · 2 revisions

Basic usage would go like this:


var xml = new XSLTjs.Document();
var xsl = new XSLTjs.Stylesheet();

var ready = function() {
  if (xml.state == XSLTjs.Document.STATE_COMPLETE && xsl.state == XSLTjs.Document.STATE_COMPLETE) {
    var result = xsl.transform(xml);
    result.insert(document.getElementById('result'));
  }
};

xml.addEventListener("complete", ready);
xsl.addEventListener("complete", ready);

Clone this wiki locally