Hwo to do Hello World From XSLT to JavaScript?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • RC

    Hwo to do Hello World From XSLT to JavaScript?

    Hello World,
    I am try do call a JavaScript function from XSLT, but I got
    function not avaible error. See "????" below.
    Would someone out there tell me how?
    Thank Q!

    <xsl:styleshe et xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
    version="1.0">
    <xsl:output method="html" />
    <xsl:template match="/">

    <html><head><ti tle>Hello World</title>
    <script type="text/javascript" language="JavaS cript1.2">

    function hello(w) {
    return ("Hello " + w + "!");
    }
    //
    </script>
    </head><body>

    <xsl:variable name="w" select='World' />

    <!-- How do I call JavaScript function here? -->
    <xsl:value-of select="????.he llo($w)" />

    </body></html>

    </xsl:template>
    </xsl:stylesheet>
Working...