I need to display date like Wednesday, 5th May, 2011 I am trying
<xsl:value-of select="format-date(
current-date(),
开发者_JS百科 '[FNn,*-3], [D01] [MNn,*-3] [Y0001]',
'en',
'',
'US'
)" />
And another one i tried
<xsl:value-of select="format-date(
current-date(),
'[FNn], [MNn] [D1o], [Y]',
'en',
(),
()
)" />
Both gives me following. I need text and it gives number only. I use XSLT 2.0
3, 5 4, 2011
This stylesheet:
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:value-of select="format-date(
current-date(),
'[FNn], [D1o] [MNn,*-3], [Y]',
'en',
(),
()
)" />
</xsl:template>
</xsl:stylesheet>
Output:
Wednesday, 4th May, 2011
Tested on Saxon and Altova.
精彩评论