J
J-M Andersson
How can I transform.
<date>20050416</date>
to
<date>2005-04-16</date>
Today I do like this (but I guess there should be some better ways)
<xslt:template match="date">
<xslt:copy>
<xslt:value-of select="substring(.,1,4)"/>-
<xslt:value-of select="substring(.,5,2)"/>-
<xslt:value-of select="substring(.,7)"/>
</xslt:copy>
</xslt:template>
<date>20050416</date>
to
<date>2005-04-16</date>
Today I do like this (but I guess there should be some better ways)
<xslt:template match="date">
<xslt:copy>
<xslt:value-of select="substring(.,1,4)"/>-
<xslt:value-of select="substring(.,5,2)"/>-
<xslt:value-of select="substring(.,7)"/>
</xslt:copy>
</xslt:template>