Project

Profile

Help

found xslt:format-date in xslt 2.0 spec

Added by Anonymous over 15 years ago

Legacy ID: #6913375 Legacy Poster: ngong (rolf_schumacher)

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


Replies (1)

RE: found xslt:format-date in xslt 2.0 spec - Added by Anonymous over 15 years ago

Legacy ID: #6923978 Legacy Poster: Michael Kay (mhkay)

There are many examples of format-date() in the XSLT specification at http://www.w3.org/TR/xslt20/#date-time-examples You will also find examples in my book. Please see http://saxon.sf.net/ to see the current versions of Saxon and where you can download them. There is no official distribution via maven. One of the main reasons for this is that I have not found a way to distribute via maven while also meeting the licensing conditions for various third-party software components included in Saxon, which require that the binaries must only be distributed along with various statutory notices. Any version of Saxon that you find being distributed via maven is unauthorised.

    (1-1/1)

    Please register to reply