[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: passing parameters with IE

Subject: RE: passing parameters with IE
From: Rene de Vries <RdVries@xxxxxxxxxxx>
Date: Mon, 2 Jul 2001 09:35:37 +0200
xsl parameter internet explorer
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!!!

<html>

	<body>

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

			// 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
			objXML.load("YourXML.xml")

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

			// transform
			objXSLProc.transform()

			// display
			document.write(objXSLProc.output)
		</script>

	</body>

</html>

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:	 passing parameters with IE

Hi,

    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"/>
     </xsl:template>

    the XML file (exampleXML.xml):

    <?xml-stylesheet type="text/xsl" href="exampleXSL.xsl"?>
    <doc>
         <p>one</p>
         <p>two</p>
         <p>3</p>
         <p>4</p>
    </doc>

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

    Thanks!!


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.