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

RE: passing parameters to a XSLT from HTML

Subject: RE: passing parameters to a XSLT from HTML
From: "Andrew Welch" <andrew@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 9 Jan 2002 13:31:40 -0000
html passing parameter
(apologies for the double-post if it happens.. smtp problems)

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:  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

---
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

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.