Subject: RE: calendar generation
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 12 May 2010 00:34:36 +0100
|
> Here's something to get you started:
One comment on this
> <xsl:for-each select="1 to 365">
> <xsl:variable name="days"
> select="xs:dayTimeDuration(concat('P',.,'D'))"/>
> <xsl:sequence select="$start-date + $days"/>
> </xsl:for-each>
I would probably write
<xsl:for-each select="1 to 365">
<xs:sequence select="$start-date + .*$ONE_DAY"/>
</xsl:for-each>
with
<xsl:variable name="ONE_DAY" select="xs:dayTimeDuration('P1D')"/>
Regards,
Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay
|