If you want to embed JavaScript in your ???2html.xsl, you can use the following technique:

<script type="text/javascript">
                <![CDATA[ log("mail", ]]>
                &quot;<xsl:copy-of select="$page"/>&quot;
                <![CDATA[ ); ]]>

This script calls a function "log()" with a fixed parameter and a parameter build from a variable $page.

The function is defined in an external script file, which can be included with

<xsl:element name="script">
        <xsl:attribute name="type">text/javascript</xsl:attribute>
        <xsl:attribute name="src">/resources/scripts/logger.js</xsl:attribute>


<script type="text/javascript" src="/resources/scripts/logger.js" />

in the html <head>.

JavaScriptInXsl (last edited 2009-09-20 23:42:40 by localhost)