Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>According to <a href="http://www.mindlence.com/WP/?page_id=224" rel="nofollow">this page</a>, you can use</p> <pre><code>XSLTProcessor.addParameter("Parameter Name", "Parameter Value"); </code></pre> <p>where <code>XSLTProcessor</code> is created with</p> <pre><code>var XSLTCompiled = new ActiveXObject("MSXML2.XSLTemplate"); XSLTCompiled.stylesheet = XSL.documentElement; var XSLTProcessor = XSLTCompiled.createProcessor(); </code></pre> <p>The transform call is also different.</p> <pre><code>XSLTProcessor.transform(); </code></pre> <p>Anyway, it looks like there's a quite elaborate explanation of what you're asking for.</p> <p>I did cross-browser XSLT transforms a while back, and here's the code I used. <code>createDocument</code> is just a function to return a DOM document. I didn't do stylesheet parameters, so maybe this is a little off-topic, but anyway it works on IE6+ and Firefox 1.5+.</p> <pre><code>// arguments can be string (uri of document) or document node function xslTransform( content, transform, options ) { if ("string" == typeof content) content = createDocument( content ); if ("string" == typeof transform) transform = createDocument( transform ); var targetEle; if (options &amp;&amp; options.target) targetEle = document.getElementById(options.target); if (targetEle &amp;&amp; options.replace) while (targetEle.hasChildNodes()) targetEle.removeChild( targetEle.firstChild ); if (window.XSLTProcessor) { var processor = new XSLTProcessor(); processor.importStylesheet( transform ); var frag = processor.transformToFragment( content, document ); if (targetEle) targetEle.appendChild( frag ); } else if (window.ActiveXObject) { if (targetEle) targetEle.innerHTML = content.transformNode( transform ); } else return "XSLT not supported"; } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload