Re: format-date
James Fuller <[email protected]>
| Newsgroups | gmane.text.xml.xslt.extensions |
|---|---|
| Organization | Webcomposite |
| Message-ID | <[email protected]> |
[email protected] wrote: > > Hi sir > I hold to thank you, but I made how you said it to me but it always > posts the > dates into Saxon and i want to posts the date in format JJ mm yyyy > could you > help me please > I wish you a very good day saxon supports exslt date functions, so u do not need to import, just declare the namespace pls refer to http://www.saxonica.com/documentation/extensions/exslt.html for exact details of usage. > Here the xslt file > > <?xml version="1.0" encoding="UTF-8"?> > <xsl:stylesheet version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:date="http://exslt.org/dates-and-times" > extension-element-prefixes="date"> > <xsl:output method="xml" version="1.0" encoding="UTF-8" > indent="yes"/> > > > <xsl:template match="carnet"> > > <xsl:apply-templates select="personne"> > <xsl:sort order="descending" select="date"/> > </xsl:apply-templates> > </xsl:template> > > <xsl:template match="personne"> > <xsl:copy-of select="."/> > </xsl:template> > > <xsl:template name="personne"> > <xsl:param name="date"/> > <xsl:call-template name="date:format-date"> > <xsl:with-param name="date-time" select="$date" /> > <xsl:with-param name="pattern" select="'dd MMMM yyyy'" /> > </xsl:call-template> the problem is that your are using call-template...saxon natively supports this extension try something like <xsl:value-of select="date:format-date($date,'dd MMMM yyyy')"/> hth, Jim Fuller