This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: xsl:script and Xalan ?


Philippe D'Hont wrote:
> 
> My question is there is something similar to <xsl:script>
> that I can use with Xalan ?

With any XSLT-conforming app, you can just use <xsl:text> and
wrap your script in a <![CDATA[]]> section, which means you
don't manually have to escape everything.

This works for me:

<script type="text/javascript">
<xsl:text><![CDATA[
//<!-- hide javascript from older browsers

function func(num)
{
  for (i=0;i<oSub.length;i++)
  {
    other_func(i);
  }
}
//-->
]]></xsl:text>
</script>

-- 
Warren Hedley


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]