Subject: RE: [xsl] Can you send a parameter to an XSL stylesheet using jav ascript? From: aruniima.chakrabarti@xxxxxxxxxxxxxxxxxx Date: Sat, 17 Aug 2002 11:46:25 +0530 |
Yes u can... u can use xslt = new ActiveXObject("Msxml2.XSLTemplate.4.0"); xslDoc = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.4.0"); xslDoc.async = false; xslDoc.load("PickListDisplay.xsl"); xslt.stylesheet = xslDoc; xslProc = xslt.createProcessor(); xslProc.input = srcTree; xslProc.addParameter("start_point",starting_point); xslProc.transform(); or u can use selectSingleNode & set its nodeValue property to pass the desired value thru JavaScript Regards, aruniima -----Original Message----- From: Kathryn.Grant@xxxxxxxxxxxxxxxxx [mailto:Kathryn.Grant@xxxxxxxxxxxxxxxxx] Sent: Friday, August 16, 2002 11:05 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: [xsl] Can you send a parameter to an XSL stylesheet using javascript? Hi all, I apologize if this is slightly off topic, but I thought I'd be more likely to get an answer to my question here than on a js list (since many xsl programmers probably know js, but not as many js programmers know xsl). I am using the following js to run a transformation in an HTML page: <script type="text/javascript"> // Load XML var xml = new ActiveXObject("MSXML2.DOMDocument") xml.async = false xml.load("BRPfielddeftable.xml") // Load the XSL var xsl = new ActiveXObject("MSXML2.DOMDocument") xsl.async = false xsl.load("brp_fuel_cost_index.xsl") // Transform document.write(xml.transformNode(xsl)) </script> My question is this: If I declare a variable in this script, is there a way to pass its value to a parameter in the xsl stylesheet referenced in this script? Thanks in advance-- Kathryn XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list ---------------------------------------------------------------------------- This message contains privileged and confidential information and is intended only for the individual named. If you are not the intended recepient you should not disseminate, distribute, store, print, copy or deliver this message. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and immediately delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. -------------------------------------------------------------------------- XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Merge - a.xml + b.xml = c, Carsten Klein | Thread | RE: [xsl] Can you send a parameter , aruniima . chakrabar |
[xsl] Re: Using a parameter to repr, Dimitre Novatchev | Date | Re: [xsl] xsl/xslt coding standard, Jeni Tennison |
Month |