Declaring Types (Continued)

<xsl:variable name="date"
              select="'2003-11-20'">

is the string “2003-11-20”.

<xsl:variable name="date"
              select="xs:date('2003-11-20')"/>

is the date November 20, 2003.

<xsl:variable name="date" as="xs:date"
              select="'2003-11-20'"/>

is an error.