Re: xsl:script and Xalan ?

Subject: Re: xsl:script and Xalan ?
From: Warren Hedley <w.hedley@xxxxxxxxxxxxxx>
Date: Thu, 15 Jun 2000 13:14:02 -0400
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


Current Thread