Good Day!
How may be send parameter to xsl stylesheet
from JavaScript function?
Thank!
Printable View
Good Day!
How may be send parameter to xsl stylesheet
from JavaScript function?
Thank!
JavaScript runs only after all XSL processing is completed, so I don't think you can do that.
Thank you!
:)
I find it
for xml2 and higher:
--------------------------------------------------------------------------------
var xslt = new ActiveXObject("Msxml2.XSLTemplate");
var xslDoc = new ActiveXObject("Msxml2.FreeThreadedDOMDocument");
var xslProc;
xslDoc.async = false;
xslDoc.load(xslPath);
xslt.stylesheet = xslDoc;
var xmlDoc = new ActiveXObject("Msxml2.DOMDocument");
xmlDoc.async = false;
xmlDoc.load(xmlPath);
xslProc = xslt.createProcessor();
xslProc.input = xmlDoc;
xslProc.addParameter("paramName", "paramValue");
xslProc.transform();
try {
xslProc.transform;
result.innerHTML = xslProc.output;
}
catch(e)
{
result.innerHTML = e.description;
}
*sigh*