Odd to have the same question twice in the same day!
 
Yes, func:function was removed from Saxon a while back. It was too painful to support both the EXSLT and the XSLT 2.0 versions of the facility simultaneously.
 
Michael Kay


From: saxon-help-admin@lists.sourceforge.net [mailto:saxon-help-admin@lists.sourceforge.net] On Behalf Of DuCharme, Bob (LNG-CHO)
Sent: 09 December 2004 21:54
To: 'saxon-help@lists.sourceforge.net'
Subject: [saxon] EXSLT func:function support in 8.1B?

The stylesheet below uses EXSLT syntax to define and call a new function. It worked with Saxon 6.5.2, but not with 8.1B, giving me this error message:
 
Error on line 18 of file:/C:/dat/xml/xslt/exslttest.xsl:
  Cannot find a matching 0-argument function named {http://www.snee.com/ns/misc/}day-from-date()
 
Does anyone know if EXSLT support has been cut back as XSLT 2.0 support was added?
 
thanks,
 
Bob DuCharme
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:date="http://exslt.org/dates-and-times"
                xmlns:func="http://exslt.org/functions"
                xmlns:foo="http://www.snee.com/ns/misc/"
                extension-element-prefixes="date func foo"
                version="1.0">
 
  <func:function name="foo:day-from-date">
    <xsl:param name="date">
      <xsl:value-of select="date:date()"/>
    </xsl:param>
    <func:result>
      <xsl:value-of select="date:day-in-month($date)"/>
    </func:result>
  </func:function>
 
  <xsl:template match="/">
    foo:day-from-date(): <xsl:value-of select="foo:day-from-date()"/>
    foo:day-from-date(): <xsl:value-of select="foo:day-from-date('2004-12-13')"/>
  </xsl:template>
 
</xsl:stylesheet>