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

Re: JScript embedded in xsl

Subject: Re: JScript embedded in xsl
From: Robert Koberg <rob@xxxxxxxxxx>
Date: Tue, 20 Jan 2004 15:07:04 -0800
xsl jscript
annirack@xxxxxxx wrote:

Hi,
I realise that this isn't entirely an xslt problem, but I'm not entirely familiar with the JScript API for MSXML which is part of the problem.

I want to add some JScript to the results (html) of an xslt so that when the user clicks a link on the result page, it causes an instance of MSXML to retransform the xml file (possibly taking parameters) and reload the browser window with the new results.

Client side transformation is the only appropriate way of handling this problem in this case. Server side transformation would work quite nicely, but this isn't in a situation where there's a server present.


Hi,


check out microsoft's site for examples, but:

Create a processor object:
// might want to cache this
var templates = new ActiveXObject("Msxml2.XSLTemplate.4.0");
templates.stylesheet = XSLT_as_A_DOM_object_variable;
var processor = templates.createProcessor();
...
processor.input = XML_DOM_source_variable;
processor.addParameter(name, value);
processor.transform;
document.all.containerDiv.innerHTML = processor.output;

best,
-Rob


Thanks,
Brendan


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.