RE: [xsl] passing parameters with IE

Subject: RE: [xsl] passing parameters with IE
From: Rene de Vries <RdVries@xxxxxxxxxxx>
Date: Mon, 2 Jul 2001 09:35:37 +0200
Hi Ivan,

I don't think it can be done your way, but you can use a JavaScript in my 
HTML to pass parameters. I use a compiled XSL-object, because I use the 
same XSL several times.

Note that I use MXSML4 with IE5.5!!!



		<script type="text/javascript">
			// Load your XSL
			var objXSLT = new ActiveXObject("MSXML2.FreeThreadedDomDocument")
			objXSLT.async = false

			// create a compiled XSL-object
			var objCompiled = new ActiveXObject("MSXML2.XSLTemplate")
			objCompiled.stylesheet = objXSLT.documentElement
			// create XSL-processor
			var objXSLProc = objCompiled.createProcessor()

			// Load your XML
			var objXML = new ActiveXObject("MSXML2.FreeThreadedDomDocument")
			objXML.async = false

			// input for XSL-processor
			objXSLProc.input = objXML
			objXSLProc.addParameter("NameOfYourParameter1", "ValueOfYourParameter1")
			objXSLProc.addParameter("NameOfYourParameter2", "ValueOfYourParameter2")
			// etc.

			// transform

			// display



Greetings Rene
   { @   @ }

"You don't need eyes to see, you need vision!"

-----Oorspronkelijk bericht-----
Van:	Ivan Nicolas San Martin Calera [SMTP:ivan.sanmartin@xxxxx]
Verzonden:	vrijdag 29 juni 2001 16:23
Aan:	xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Onderwerp:	[xsl] passing parameters with IE


    I have one doubt, I want pass parameters to xslt (I know do that
with command line processor) but the transformation is directly done
with IE.

    For example, I have this stylesheet (exampleXSL.xsl):

     <xsl:param name="num">1</xsl:param>

     <xsl:template match="/">
          parameter value: <xsl:value-of select="$num"/>

    the XML file (exampleXML.xml):

    <?xml-stylesheet type="text/xsl" href="exampleXSL.xsl"?>

    and I want pass values for "num" from URL like
"exampleXML.xml?num=3" using IE. Is this possible?


 XSL-List info and archive:

 XSL-List info and archive:

Current Thread