[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: how to call Javascript function in .xsl file

Subject: Re: how to call Javascript function in .xsl file
From: "Amit Rekhi" <amitr@xxxxxxxxxxxxx>
Date: Sat, 7 Nov 1998 09:47:23 +0530
calling javascript from xsl
Sorry for joining this thread so late and for asking a basic ques.

>If you are outputting HTML, and want to add in JavaScript code to the
>output, I would suggest you do that through a post-process.

Why should adding HTML JavaScript code to template be a problem.
Can't I have a pattern rule like :-

<xsl:template match="/">
<HTML>
   <HEAD>
     <SCRIPT LANGUAGE="JavaScript"><![CDATA[
        function Test()
        {
          [.....code....]
        }
     ]]></SCRIPT>
   </HEAD>
</HTML>
</xsl:template>

Is not this a valid template ?

I think the problem is in calling a JavaScript function rather than in
adding one to the HTML output
Am I right here?

Function Invocation is a problem since <eval> or any such calling syntax is
not a part of the XSL spec.

But then there is no use in writing a function one cannot invoke.


AMIT




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.