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

passing values from JavaScript to XSL using MSXML3

Subject: passing values from JavaScript to XSL using MSXML3
From: Neil Smith <neil@xxxxxxxxxxxxxxx>
Date: Mon, 21 Jul 2003 12:36:15 +0100
selectsinglenode javascript
At 02:30 21/07/2003 -0400, you wrote:
Date: Sun, 20 Jul 2003 03:00:10 -0400
From: "Sergey Demidenko" <sergeyd@xxxxxxx>
Subject:  passing values from JavaScript to XSL using MSXML3

Load your stylesheet then reference the param using an XPath expression :
Replace 'sortvalue' by whatever your intended value is then transform the XML document as normal with your modified stylesheet.


oxmlStyleSheet=new ActiveXObject("MSXML2.DOMDocument");
oxmlStyleSheet.selectSingleNode("//xsl:param[@name='sortBy']").value=sortvalue;

(or >>>> )

oxmlStyleSheet.selectSingleNode("//xsl:param[@name='sortBy']").setAttribute("select",'date');

Depends on your question :-)

I need to pass a value from JavaScript code to <xsl:param name="sortBy"
select="'date'" /> in XSL code.
How would I accomplish this?

PS the XPath may not be exactly right for your document - please check and modify if necessary. Sorry if this was already answered - I was out all weekedn at a festival :-)


Cheers - Neil


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.