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

RE: Using Javascript with XSLT

Subject: RE: Using Javascript with XSLT
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 15 Apr 2009 00:09:58 +0100
RE:  Using Javascript with XSLT
Yes, when your Javascript code initiates a transformation, then it can pass
a parameter to the transformation, using a method such as addParameter() or
setParameter() (different products have different APIs). The parameter is
declared in the stylesheet using xsl:param.

However, the mistake people sometimes make here is to think that a single
transformation can both generate Javascript code and be affected by the
execution of that code. Remember the sequence of events: XSLT generates
HTML, the HTML is executed by the browser, execution of script in the HTML
can initiate another (separate) transformation, that second transformation
can generate more HTML, which in turn can be executed by the browser.

Michael Kay
http://www.saxonica.com/

> -----Original Message-----
> From: Robert G [mailto:nyjets3422@xxxxxxxxx] 
> Sent: 15 April 2009 00:01
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Using Javascript with XSLT
> 
> 
> Hi,
>      Is there anyway that I can use javascript to pass a 
> variable to XSLT? I am trying to use a button to get the next 
> page, but if their are no numbers in the XML for the XSLT to 
> grab, then I am having trouble getting the javascript to 
> allow the XSLT code to know which page is up and which page 
> is next etc. Is it possible to use javascript to put the page 
> number into the xslt? Thanks.

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.