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 May 30th, 2007, 05:20 PM
Registered User
 
Join Date: May 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Javascript Function return save in XSL Variable

Hi experts,

I would like to know if its possible to save what a Javascript Function returns in a XSL Variable?

For example:

Javascript

function returnString(){
 return 'hi';
}

XSL

<xsl:variable name="var" select="returnString()" />

Is it possible to do this?

Thnx!

Antonio M.

 
Old June 1st, 2007, 12:11 PM
Friend of Wrox
 
Join Date: Jul 2006
Posts: 430
Thanks: 28
Thanked 5 Times in 5 Posts
Send a message via Yahoo to bonekrusher
Default

I believe that you can pass the javascript value to a parameter and XSLT can pick it up with the <xsl:param>.

e.g.

www.domainname.com/page.html?myval="yourvalue"

xslt picks it up:

<xsl:param name="myval"/>

 
Old June 2nd, 2007, 02:54 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

XSLT processors allow you to set the value of global parameters albeit each has its own way of doing it. You'll need to state which processor you are using and describe how the overall process is carried out, e.g. is this in a browser, server-side atc.

--

Joe (Microsoft MVP - XML)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Executing a JavaScript Function from XSL IronStar XSLT 5 July 8th, 2010 07:49 PM
Save and Return hdpark BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 1 December 2nd, 2008 02:14 PM
passing javascript variable in xsl:value-of select eruditionist XSLT 2 September 19th, 2008 05:23 PM
how to pass javascript variable to xsl eruditionist XSLT 4 September 8th, 2008 08:37 AM
how to return nodeset in template in xsl:variable alexshiell XSLT 3 March 18th, 2005 01:36 PM





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