Project

Profile

Help

Support #6445

open

Are EXSLT function supposed to be supported in SaxonC EE (12.4.2)?

Added by Martin Honnen 6 months ago. Updated 5 months ago.

Status:
New
Priority:
Normal
Category:
Saxon-C Internals
Start date:
2024-06-05
Due date:
% Done:

0%

Estimated time:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Found in version:
SaxonC Languages:
SaxonC Platforms:
SaxonC Architecture:

Description

Hi,

I am currently testing some code to be run with both XSLT 1.0 processors like xsltproc/libxslt as well as XSLT 3 processors like Saxon 12.

I had thought that Saxon 12 EE supports most EXSLT functions and the documentation https://www.saxonica.com/html/documentation12/functions/exslt-dates-and-times/date-time.html says "Requires Saxon-PE or Saxon-EE. Available for Java and C/C++ only".

However, when I run code trying to use an EXSLT function through SaxonCEE 12.4.2's command transform.exe it fails and a test with function-available for all function (even those Saxon Java EE 12.4 supports) returns false.

So I run code

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:date="http://exslt.org/dates-and-times"
  exclude-result-prefixes="date"
  version="1.0">

  <xsl:template match="@* | node()">
    <xsl:copy>
      <xsl:apply-templates select="@* | node()"/>
    </xsl:copy>
  </xsl:template>

  <xsl:template match="/">
    <xsl:copy>
      <xsl:apply-templates/>
      <xsl:comment>Run with <xsl:value-of select="system-property('xsl:vendor')"/> at <xsl:value-of select="date:date-time()"/></xsl:comment>
    </xsl:copy>
  </xsl:template>

</xsl:stylesheet>

through SaxonC EE 12.4.2 command transform.exe and get an error (slightly odd error suggesting it has a class net.sf.saxon.option.exslt.Date but somehow fails to find the function in it)

Error at char 17 in expression in xsl:value-of/@select on line 15 column 128 of sheet1.xsl:
  XTDE1425  Cannot find a 0-argument function named
  Q{http://exslt.org/dates-and-times}date-time(). No method or field matching dateTime with
  0 parameters found in class net.sf.saxon.option.exslt.Date
  In template rule with match="/" on line 12 of sheet1.xsl
Cannot find a 0-argument function named Q{http://exslt.org/dates-and-times}date-time(). No method or field matching dateTime with 0 parameters found in class net.sf.saxon.option.exslt.Date

while Saxon Java EE 12.4 outputs

<?xml version="1.0" encoding="UTF-8"?><root>
  <foo>foo 1</foo>
  <bar>bar 1</bar>
</root><!--Run with Saxonica at 2024-06-05T11:33:48.2533341+02:00-->

Files

Please register to edit this issue

Also available in: Atom PDF