XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Jay UpadhyaySubject: Assign a JavaScript variable value to XSLT
Author: Jay Upadhyay
Date: 23 Jan 2007 05:26 PM
Originally Posted: 22 Jan 2007 07:59 PM
Can someone help me with, how can I assign JavaScript variable value to XSLT?

I am trying to do paging using XML and XSLT. I am passing a parameter to a page link and on page submit I receive the start page number and end page number in URL. I menipulate the url string and get the start page and end page number in javascript variable. That I need to put in a condition to display the list of items.

e.g.

<script type="text/javascript">
<![CDATA[
var sPage = 11; // Start page number
var ePage = 20; // End page number
]]>
</script>

<xsl:if test="position &lt;= '(here I have to use javascript variable value) and position &gt;= '(here I have to use javascript variable value)">
rest of the code to print the list.
...
...
...
</xsl:if>

Thank you in advance for any help.

Posttop
Tony LavinioSubject: Assign a JavaScript variable value to XSLT
Author: Tony Lavinio
Date: 25 Jan 2007 10:45 AM
You can't do that directly.

<SCRIPT> tags aren't handled in XSLT the way they are by the browser.

However, you can write an extension function that can be called by
XSLT that will return the value of a JavaScript variable.

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.