function xsltProcess2(xmlDoc, stylesheet) {
if (xsltdebug) {
Log.write('XML STYLESHEET:');
Log.writeXML(xmlText(stylesheet));
Log.write('XML INPUT:');
Log.writeXML(xmlText(xmlDoc));
}
this.exp = new ExprContext(xmlDoc);
//exp.setVariable('qwe', new StringValue('1111'));
this.execute = function() {
var output = (new XDocument).createDocumentFragment();
xsltProcessContext(this.exp, stylesheet, output);
var ret = xmlText(output);
if (xsltdebug) {
Log.write('HTML OUTPUT:');
Log.writeXML(ret);
}
return ret;
}
}
........
var Proc = new xsltProcess2(xml, xslt);
Proc.exp.setVariable('qwe', new StringValue('1111'));
var html = Proc.execute();