TR: format date

"IGP04Bozghiba Imed" <[email protected]>
Newsgroups gmane.text.xml.french.tech
Message-ID <[email protected]>
 


Merci beaucoup de me répondre je suis débutant avec xml. Pourriez-vous me dire où je peux insere votre code 

Merci d'avance et bonne journée 




-----Message d'origine-----
De : Stephane Bortzmeyer [mailto:[email protected]] Envoyé : mercredi, 3. mai 2006 22:58 À : IGP04Bozghiba Imed Cc : [email protected] Objet : Re: format date

On Wed, May 03, 2006 at 10:13:38PM +0200,  IGP04Bozghiba Imed <[email protected]> wrote  a message of 97 lines which said:

> Alors j'ai pensé de créer une fonction pour transformer les date en 
> format américain mais ça ne marche pas.

En XSLT 1.0 portable, je ne crois pas qu'il existe une solution simple. La plus standard est d'utiliser EXSLT (http://exslt.org/), un ensemble d'extensions mises en oeuvre dans de nombreux processeurs XSLT.

J'utilise date:format-date pour formater mes dates. EXSLT en fournit une implémentation en XSLT, pour les processeurs qui ne la gèrent pas nativement. Cela me permet d'écrire des choses comme :

<xsl:template name="print-date">
   <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>
</xsl:template>


-- Binary/unsupported file stripped by Ecartis --
-- Type: text/xml


-- Binary/unsupported file stripped by Ecartis --
-- Type: application/octet-stream


-- Binary/unsupported file stripped by Ecartis --
-- Type: application/octet-stream
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.