Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XSL/JavaScript question & XSL question

 
Brendan Kennedy
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10065
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic