|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Problem with the use of JavaScript in a XSL file
> From: Andrew Welch [mailto:AWelch@xxxxxxxxxxxxxxx] > Sent: Wednesday, March 05, 2003 5:45 AM > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: RE: Problem with the use of JavaScript in a XSL file > > > I need Help. I have a problem using the character "<"other ">" in a > > javasript in a XSL file. > > Hi, > > Try wrapping script in <xsl:comment> and in a cdata section: > > <script> > <xsl:comment> > <![CDATA[ > > > ]]> > </xsl:comment> > </script> > > This will allow you to write javascript that doesnt bother > the xslt processor, and will wrap the script in <!-- --> in the ouput. Not really an XSLT issue, but if you don't prefix the end comment tag with a JavaScript comment delimiter, interpreters will treat it as a pre-decrement operator, which can generate unexpected errors. So the last line before the end script tag should look like: //</xsl:comment> Could you put the comment tags (literal, not xsl:comment) inside the CDATA block, or would that still cause the processor to ignore the contents? In practice, I no longer see the point of wrapping script code in comment tags. IIRC, it's only needed for browsers that don't understand the script tag (as opposed to not recognizing JavaScript, or having scripting disabled via an option setting). How many people are actually using such beasts these days? cheers, b. | brian martinez brian.martinez@xxxxxxxx | | senior gui programmer 303.708.7248 | | trip network, inc. fax 303.790.9350 | | 6436 s. racine cir. englewood, co 80111 | | http://www.cheaptickets.com/ http://www.trip.com/ | 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
|

Cart








