RE: [xsl] passing parameters to a XSLT from HTML

Subject: RE: [xsl] passing parameters to a XSLT from HTML
From: "Andrew Welch" <andrew@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 9 Jan 2002 12:58:05 -0000
Rafael,

Try this piece of javascript (using MSXML3)


  var xml = new ActiveXObject("MSXML2.DOMDocument.3.0")
  xml.async = false
  xml.load('xmlPath')

  var xsl = new ActiveXObject("MSXML2.FreeThreadedDOMDocument.3.0")
  xsl.async = false
  xsl.load('xslPath')

  var template = new ActiveXObject("MSXML2.XSLTemplate.3.0")
  template.stylesheet = xsl
  processor = template.createProcessor()

  processor.input = xml
  processor.addParameter("param1",'some value')
  processor.addParameter("param2",'some value')
  //...and so on
  processor.transform()

  document.write(processor.output)

and include the following in you stylesheet as top-level elements:

<xsl:param name="param1"/>
<xsl:param name="param2"/>

This should be a start for you.

cheers

andrew




-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of rafael
vazquez
Sent: 09 January 2002 08:51
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] passing parameters to a XSLT from HTML


Hi All! I´d thank a fast response for my question, because I´m a beginner in
XSLT.

I have a HTML page that contains an option list and I want to pass its value
to a XSLT located in other frame, to use the mentioned value in the
stylesheet.
I´m very lost about this question. Can anyone help me?

Thanks in advance, friends!

_________________________________________________________________
MSN Photos es la manera más sencilla de compartir e imprimir sus fotos:
http://photos.latam.msn.com/Support/WorldWide.aspx


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


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.313 / Virus Database: 174 - Release Date: 02/01/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.313 / Virus Database: 174 - Release Date: 02/01/2002


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


Current Thread