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(_at_)yahoo(_dot_)com]
Sent: 15 April 2009 00:01
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] 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.
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--