Utilisez la sous-chaîne pour formater?
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" />
<xsl:template match="*">
<xsl:copy>
<xsl:for-each select="@*">
<xsl:copy-of select="." />
</xsl:for-each>
<xsl:apply-templates />
</xsl:copy>
</xsl:template>
<xsl:template match="MyMessage/DateField">
<xsl:copy>
<xsl:value-of select="substring(.,1,4)"/>
<xsl:text>-</xsl:text>
<xsl:value-of select="substring(.,5,2)"/>
<xsl:text>-</xsl:text>
<xsl:value-of select="substring(.,7,2)"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
Quelle fonctionnalité utilisez-vous pour formater la date? –
Ce serait un peu plus facile si vous fournissiez un exemple d'entrée. – oluies