Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old February 21st, 2007, 01:55 AM
Authorized User
Join Date: Feb 2007
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to SOMANATHAN10


I want to assign the value of var countno to a xsl:variable.
Anybody have ideas on this please suggest.

 <script language="javascript">
    var countno= counter();

     <script language="javascript">
         var a;
        function counter()
         return a;

Old February 21st, 2007, 04:26 AM
mhkay's Avatar
Wrox Author
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts

If the script is invoking the transformation, then you will find there is a method in the API such as addParameter() that allows the script to bind a value to a global xsl:param defined in the stylesheet.

On the other hand, if the transformation is generating the script as part of its result tree, then there is of course no way the script can set a variable in the transformation because the script will never be executed until the transformation has completed.

Michael Kay
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference

Similar Threads
Thread Thread Starter Forum Replies Last Post
Assigning value from variable cyberddindia Classic ASP Basics 3 November 7th, 2006 11:57 AM
how to submit a form and post java script variable arabuafef ASP.NET 1.0 and 1.1 Basics 2 July 14th, 2006 09:28 PM
pass java variable to xsl variable kathy1016cats XSLT 1 June 14th, 2006 06:23 PM
Assigning a @@ROWCOUNT to a variable ioates SQL Server DTS 2 January 9th, 2004 04:16 AM
Help with assigning a variable from a binding dfranczak ADO.NET 0 July 17th, 2003 01:50 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.