<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:saxon="http://saxon.sf.net/"
                xmlns:xs="http://www.w3.org/2001/XMLSchema"
                version="2.0">

  <xsl:output method="text"/>

  <xsl:param name="datestr" select="'2004-08-02T13:45:20-04:00'"/>

  <xsl:template match="/">
    <xsl:variable name="date" select="$datestr cast as xs:dateTime"/>

    <xsl:text>The date is: </xsl:text>
    <xsl:value-of select="format-dateTime($date, '[Y]-[M01]-[D01]')"/>
    <xsl:text> (</xsl:text>
    <xsl:value-of select="format-dateTime($date, '[MNn] [D1o], [Y04]', 'en', (), ())"/>
    <xsl:text>)
</xsl:text>

    <xsl:text>That’s week number </xsl:text>
    <xsl:value-of select="format-dateTime($date, '[W]')"/>
    <xsl:text> in the </xsl:text>
    <xsl:value-of select="format-dateTime($date, '[C]')"/>
    <xsl:text> calendar.</xsl:text>
    <xsl:text>&#10;</xsl:text>
  </xsl:template>

</xsl:stylesheet>