Hi everybody!
I'm trying to pull in the system time (I'll want the date as well, but one
thing at a time...)
to my XSLT stylesheet. It looked like the EXSLT functions had just what I
need, and
they're supposedly supported by my XSLT processor (Xalan-J 2.6). But I'm
getting this
error:
javax.xml.transform.TransformerException: ElemTemplateElement error:
date:hour-in-day
I might have the namespace wrong or perhaps I'm not calling the extension
function
correctly? I've done a Google search without finding anything. Anybody have any
ideas? Thanks!
Here is a fragment of the stylesheet (I know it's not well-formed -- I'm
just copying the relevant section):
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:date="http://exslt.org/dates-and-times"
extension-element-prefixes="date">
<xsl:output method="xml" version="1.0" omit-xml-declaration="yes"
indent="yes" />
<xsl:template match="BillHeader">
<xsl:variable name="time">
<xsl:variable name="hours">
<xsl:call-template name="date:hour-in-day"/>
</xsl:variable>
<xsl:variable name="minutes">
<xsl:call-template name="date:minute-in-hour"/>
</xsl:variable>
<xsl:value-of select="concat($hours,$minutes)"/>
</xsl:variable>
etc.
Yours,
Chris Loschen
closchen(_at_)stanfordalumni(_dot_)org
781-718-3017 (cell)