Re: JavaScript In Cocoon

Subject: Re: JavaScript In Cocoon
From: Duane Nickull <duane@xxxxxxxxxxxxx>
Date: Thu, 04 Nov 1999 15:25:06 -0800
paul:

There may be several  problems.  I have written a "quick" klodge to
demonstrate the simplistic view of embedding a javascript within an xsl
stylesheet.  While this is not specific to Cocoon, it can be viewed by
anyone using MS IE 5.0+/

The demo is at:

http://www.goxml.com/xqisample/javas.xml  // xml page
http://www.goxml.com/xqisample/javas.xsl  // xsl source

This question has been asked many times and I have pointed people at
these demos as well:

http://www.walkaboutwebs.com/xml/talk2000.xml
and
http://www.walkaboutwebs.com/xmlcart/engine.html

I have briefly looked at cocoon and believe there is some
"enable-escaping" or similar function that may need to be specified. 
Try contacting one of the cocoon guys onthe list.

Some other (non-cocoon) potential problems you may be experiencing:

1. Always try to make sure that a new window knows that it is
"content-type: text/*ml"
Otherwise your parser may not recognize the entity references passed to
it from javascript.  In theory, this should never happen but for some
reason it seems to. 

2. Very silly, but make sure your javascript is enabled.  This has
happend to more than one person in the past that I know of.

3. Another good practice is to use the <xsl:comment> in your xsl
stylesheet around the javascript.

Good luck.

Duane Nickull, President
 
-- 
/**************************************************\
| http://www.xmlglobal.com  /* Corporate site */    |
| http://www.goxml.com     /* XML Search engine */  |
| http://www.cartnetwork.com /* XML E-commerce */   |
|   "Really Cool XML Solutions - available today!"  |
\**************************************************/


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


Current Thread