1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| <?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" indent="no"/>
<xsl:strip-space elements="*"/>
<xsl:decimal-format name="euro" decimal-separator="," grouping-separator="."
zero-digit="0"
digit="#"
/>
<xsl:variable name= "INITX2" select="' '"/>
<!-- retourne la date courante au format YYYY-MM-DD hh:mm:ss -->
<xsl:template name="CurrentDate">
<!-- recuperation de la date courante dans un objet date -->
<xsl:variable name="date" select="date:new()"/>
<!-- Extraction des donnees necessaires a l'affichage de la date -->
<xsl:variable name="year" select="date:getYear()+1900" />
<xsl:variable name="month" select="date:getMonth()+1" />
<xsl:variable name="day" select="date:getDate()" />
<!-- formatage et affichage de la date -->
<xsl:value-of select="$year" />
<xsl:text>-</xsl:text>
<xsl:value-of select="format-number($month,'00')"/>
<xsl:text>-</xsl:text>
<xsl:value-of select="format-number($day,'00')"/>
</xsl:template>
<xsl:variable name="DATEJOUR">
<xsl:call-template name="CurrentDate" />
</xsl:variable>
</xsl:stylesheet> |
Partager