This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes XSL/JavaScript question & XSL question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XSL/JavaScript question & XSL question" Watch "XSL/JavaScript question & XSL question" New topic
Author

XSL/JavaScript question & XSL question

Brendan Kennedy
Ranch Hand

Joined: May 02, 2001
Posts: 65
Hey
1. How would you pass a JavaScript variable into an xsl tag?
(e.g.
<script language="JavaScript">
var passed=window.location.search.substring(1)
</script>
<xsl:for-each select="passed">

2. What is the earliest version of namespace that supported the xsl:variable tag/ what was used before we had this option. I want to put the info inside a couple of tags
(e.g. <FrequentFlyerID>GC1235 </FrequentFlyerID> )
into the href attribute of an <a> tag.
Brendan
Mapraputa Is
Leverager of our synergies
Sheriff

Joined: Aug 26, 2000
Posts: 10065
I am not sure you can access JavaScript variable from XSLT, but you can call JavaScript function which returns a value � through so-called �extension functions�, if your XSLT processor supports them. For more details you can read Xalan�s documentation: http://xml.apache.org/xalan-j/extensions.html


Uncontrolled vocabularies
"I try my best to make *all* my posts nice, even when I feel upset" -- Philippe Maquet
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XSL/JavaScript question & XSL question
 
Similar Threads
xsl a href = {XPath} not working
lightbox Question
Have a tree displayed using javascript, xml, xslt - need help with action events for the nodes
using javascript in xsl
XSL fails with xmlns