Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Problems embedding Javascript with a '>' into XSL stylesheet [Thread Next] Re: Problems embedding Javascript with a '>' into XSL stylesheetTo: NULL Date: 10/2/2006 6:40:00 PM On 2 Oct 2006 01:29:18 -0700, tamayi@g... wrote: >I am trying to create an XSLT stylesheet in which the following >javascript is embeded: > > > <script> > function xyyyczz919RemoveApostrophe(val) > { > out = "\'"; // replace this > add = "'"; // with this > temp = "" + entry; // temporary holder > > while (temp.indexOf(out) > -1) { > pos= temp.indexOf(out); > temp = "" + (temp.substring(0, pos) + add + > temp.substring((pos + out.length), temp.length)); > > return temp; > } > </script> > > >However, the line: > >while (temp.indexOf(out) > -1) { > >always comes out as > >while (temp.indexOf(out) > -1) { You could reasonably enclose everything between the <script /> elements in a CDATA block, an exact example matching your post is http://www.w3schools.com/xml/xml_cdata.asp HTH Cheers - Neil ------------------------------------------------ Digital Media MVP : 2004-2006 http://mvp.support.microsoft.com/mvpfaqs | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
