[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Syntax for calling an XSL script function
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|