Calling functions in XSL

Subject: Calling functions in XSL
From: Mallikarjuna Sangappa <malliks@xxxxxxxxxxx>
Date: Thu, 10 Jun 1999 14:38:26 PDT
Hi All,

I'm new to XSL. How do I call the function in the XSL? My XSL file looks like this.

<?xml version="1.0"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0";
indent-result="no" default-space="strip">
<xsl:template match="/booklist">
 <xsl:value-of select="book/code"/>
 <xsl:value-of select="book/code/@codevalue"/>
 <xsl:value-of select="book/category"/>
 <xsl:value-of select="jjc:currentDate()"/>
</xsl:template>

<xsl:functions ns="jjc" type="text/javascript">

function currentDate() {
return Date().toString()
}

<p>When multiple alternative implementations are provided, it is up to
the XSLT processor to determine which to use.</p>

</xsl:functions>

</xsl:stylesheet>

When I compile this using XT I'm getting the following error
file:/C:/Mallik/XSLSamples/booklist.xsl:9: undefined prefix

Thanks in advance.

CU,

Malliks


______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com


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



Current Thread