Sergey Shafiev
Sergey Shafiev

Reputation: 4375

Cannot find a matching 0-argument EXSLT function named {http://exslt.org/dates-and-times}date-time()

I am using the IntelliJ IDEA 13. The XSLT processor is SAXON. I need to convert date and time a in my transformation. I have decided to use EXSLT. Here is what I've added to my transformation:

<xsl:stylesheet version="2.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:setupCustom="urn:customization_2013_1.setup.webservices.netsuite.com"
                xmlns:platformCore="urn:core_2013_1.platform.webservices.netsuite.com"
                xmlns:date="http://exslt.org/dates-and-times"
                extension-element-prefixes="date">
    <xsl:import href="exslt/date/date.xsl"/>

The "exslt" directory is located on the same level as current transformation file. Here is the way I try to call EXSLT functions:

<CreationDateTime>
    <xsl:value-of select="date:date-time()"/>
</CreationDateTime>

Here is the compilation error:

Cannot find a matching 0-argument function named {http://exslt.org/dates-and-times}date-time(). There is no Saxon extension function with the local name date-time

Could you please tell me what I am doing wrong? I have read that date and time extensions are usually natively supported by SAXON, but I have chosen EXSLT to be able to run the transformation on any XSLT processor.

Upvotes: 3

Views: 1624

Answers (0)

Related Questions