Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 30th, 2007, 05:20 PM
Registered User
 
Join Date: May 2007
Location: , , .
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.

Reply With Quote
  #2 (permalink)  
Old June 1st, 2007, 12:11 PM
Friend of Wrox
Points: 1,676, Level: 16
Points: 1,676, Level: 16 Points: 1,676, Level: 16 Points: 1,676, Level: 16
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2006
Location: , , .
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"/>

Reply With Quote
  #3 (permalink)  
Old June 2nd, 2007, 02:54 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
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)
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 12:03 AM.


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