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

RE: Syntax for calling an XSL script function

Subject: RE: Syntax for calling an XSL script function
From: Jonathan Marsh <jmarsh@xxxxxxxxxxxxx>
Date: Tue, 19 May 1998 13:36:06 -0700
xsl script
I assume you are using the Microsoft XSL ActiveX Control from within a web
page?  If so, this is a manifestation of an IE4 bug that prevents script
blocks from being created dynamically.  If you copy the <SCRIPT> block from
your XSL file into the HTML page that contains the control, I think you will
find that the script block can be found and executed.  If this workaround is
not adequate, perhaps the output of the XSL control can be sent to another
frame, or an IFRAME, so that the result is treated as an entire page and not
as a dynamically inserted block.

Hope this is helpful.

- Jonathan

		-----Original Message-----
		From:	Amit [mailto:Amitr@xxxxxxxxxxxxx]
		Sent:	Monday, May 18, 1998 7:37 AM
		To:	xsl-list@xxxxxxxxxxxxxxxx
		Subject:	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


 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.