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

Syntax for calling an XSL script function

Subject: Syntax for calling an XSL script function
From: "Amit" <Amitr@xxxxxxxxxxxxx>
Date: Mon, 18 May 1998 20:06:32 +0530
xsl script syntax
Hello All,

I am not being able to call an XSL script (defined within the XSL file)
from within an XSL construction rule. IE4 throws a scripting error at the
point I make the script call.


I'm including the code snippets to explain my problem :-

I have one scripting function :-

  <define-script><![CDATA[
     function uniqueID(e) {
      return tagName + formatNumberList(path(this), "1", "_");
    }
  ]]></define-script>


And I have another scripting function :-

   <SCRIPT LANGUAGE="JSCRIPT"><![CDATA[
          function hiLite(e) {
            if (e.style.backgroundColor != 'yellow')
              e.style.backgroundColor = 'yellow';
            else
              e.style.backgroundColor = 'white';
          }
    ]]></SCRIPT>

And a construction rule:-

  <rule>
    <target-element type="item"/>
    <DIV id='=uniqueID(this)'
         onClick='="hiLite("+ uniqueID(this) + ")"'>
      <children/>
    </DIV>
  </rule>

Now, within the above construction rule I am calling  
the hiLite() scripting function.

But the hiLite() function does not get called when running the XSL which
embeds this code. IE4 throws a scripting error.!!!!

	Am I wrong in my syntax of calling the scripting function?

	Thanx in advance,

						Regards,
						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.