Donate Share

Saxon XSLT and XQuery Processor

The forum address has changed, you have been automatically redirected. Please update any bookmarks to use the new URL.

Subscribe

found xslt:format-date in xslt 2.0 spec

You are viewing a single message from this topic. View all messages.

  1. 2009-03-23 03:22:17 UTC
    What is the best way of using formate-date?

    I tried several alternatives, but had no success:

    1.) <xsl:value-of select="xsl:format-date(bll:date,'YYYY-MM-DD')"/>
    Error: Cannot find a matching 2-argument function named {http://www.w3.org/1999/XSL/Transform}format-date()

    2.) <xsl:value-of select="format-date(bll:date,'YYYY-MM-DD')"/>
    no error message, but instead of getting some date value, I get the picture string YYYY-MM-DD

    3.) <xsl:value-of select="fn:format-date(bll:date,'YYYY-MM-DD')"/>
    same result as 2.

    4.) <xsl:value-of select="date:format-date(bll:date,'yyyy-MM-dd')"/> with the appropriate namespaces xmlns:date="http://exslt.org/dates-and-times" extension-element-prefixes="date" defined in the xsl:stylesheet headline.
    Error: Cannot find a matching 2-argument function named {http://exslt.org/dates-and-times}format-date()

    I got to use saxon 8.7 because I can not find a maven repository containing a newer version.

    What did I miss?


    Rolf
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.