This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes using javascript in xsl Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply Bookmark "using javascript in xsl" Watch "using javascript in xsl" New topic
Author

using javascript in xsl

Nata Van
Greenhorn

Joined: Aug 06, 2001
Posts: 3
Hi!
I'm trying to set up an HTML-site based on an xml-file rendered with xsl. I would like to split the site in two frames by defining a javascript function().
Here's the code:
<!--Root Template-->
<xsl:template match="/">
<html>
<head>
<title>xml-generated module</title>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1"/>
<script language="JavaScript">
<![CDATA[function mainframe() return "<html><body><xsl:apply-templates select="//titre" /></body></html>";}]]>
<![CDATA[function linkframe() {return"<html><body><span>Foo</span></body></html>";}]]>
</script>
</head>
<frameset cols="25%,75%" rows="100%" border="1">
<frame name="linkview" src="javascript arent.mainframe();"/>
<frame name="mainview" src="javascript arent.linkframe();"/>
</frameset>

</html>
</xsl:template>
<!---...-->
Without javascript, everything is working fine.
Does anybody know what I'm missing?
Thanks for your help.
Regards, Nathalie
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: using javascript in xsl
 
Similar Threads
window.Print() not working.
Error running Cocoon
How to determine if one frame has loaded from another?
XSL fails with xmlns
How to pass multiple params