This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
unable to load language: javascript
- To: <XSL-List at mulberrytech dot com>
- Subject: unable to load language: javascript
- From: "Jon Wynacht" <jwynacht at cisco dot com>
- Date: Thu, 31 Aug 2000 12:37:02 -0700
- Reply-To: xsl-list at mulberrytech dot com
Hi,
With the following code, I get the following error:
Call to extension function failed: unable to load language: javascript
Can anybody tell me why?
Thanks,
Jon
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
xmlns:lxslt="http://xml.apache.org/xslt"
xmlns:my-ext="ext1"
extension-element-prefixes="my-ext">
<xsl:preserve-space elements=""/>
<xsl:output method="html"/>
<xsl:param name="sort">3</xsl:param>
<!-- extensions -->
<lxslt:component prefix="my-ext" elements="" functions="currentDate">
<lxslt:script lang="javascript">
function currentDate(regExpress)
{
theDate = new Date(regExpress);
// return theDate.valueOf();
return theDate.getMonth();
// return regExpress
}
</lxslt:script>
</lxslt:component>
<xsl:template match="/">
<html>
<head>
<title/>
</head>
<body>
<table>
<xsl:apply-templates/>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="/PXML/*">
<xsl:variable name="Id">
<xsl:value-of select="@Id"/>
</xsl:variable>
<xsl:for-each select=".">
<xsl:variable name="title">
<xsl:value-of select="Title"/>
</xsl:variable>
<xsl:if test="string-length($title) = 0">
<xsl:variable name="title">
<xsl:value-of select="@Id"/>
</xsl:variable>
</xsl:if>
<tr>
<td><font size="2" face="Arial"><xsl:value-of
select="$title"/></font></td>
<td><font size="2" face="Arial"><xsl:value-of
select="@Owner"/></font></td>
<td>
<font size="2" face="Arial">
<xsl:variable name="modDateDay">
<xsl:value-of select="substring-after(@Modification_date, ' ')"/>
</xsl:variable>
<xsl:variable name="modDateStart1">
<xsl:value-of select="substring-before($modDateDay, ',')"/>
</xsl:variable>
<xsl:variable name="modDateStart">
<xsl:value-of select="substring-before($modDateStart1, ' ')"/>
</xsl:variable>
<xsl:variable name="modDateMiddle">
<xsl:value-of select="substring-after($modDateStart1, ' ')"/>
</xsl:variable>
<xsl:variable name="modDateEnd1">
<xsl:value-of select="substring-after($modDateDay, ', ')"/>
</xsl:variable>
<xsl:variable name="modDateEnd">
<xsl:value-of select="substring-before($modDateEnd1, ' ')"/>
</xsl:variable>
<xsl:variable name="month">
<xsl:value-of
select="my-ext:currentDate(string(@Modification_date))"/>
</xsl:variable>
<!-- <xsl:value-of select="substring-after(@Modification_date, ',
')"/> -->
<xsl:value-of select="$modDateStart"/>/<xsl:value-of
select="$month"/>/<xsl:value-of select="$modDateEnd"/>
</font>
</td>
<td><font size="2" face="Arial"><xsl:value-of
select="@Last_modifier"/></font></td>
<td><font size="2" face="Arial"><xsl:value-of
select="@Expiration_month"/>/<xsl:value-of
select="@Expiration_day"/>/<xsl:value-of
select="@Expiration_year"/></font></td>
</tr>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list