[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|