| Subject: Re: [xsl] Working with xs:date and xs:gYearMonth From: Colin Paul Adams <colin@xxxxxxxxxxxxxxxxxx> Date: 23 Jun 2004 05:56:19 +0100 | 
>>>>> "Colin" == Colin Paul Adams <colin@xxxxxxxxxxxxxxxxxx> writes:
>>>>> "Michael" == Michael Kay <mhk@xxxxxxxxx> writes:
    Michael> <xsl:variable name="first-of-previous-month"
    Michael> select="xs:date('0000-01-01') + ($previous-month *
    Michael> $one-month)" as="xs:date"/>
    Colin> Well, Saxon 8.0 doesn't allow this (quite right too - there
    Colin> never was a year zero!).  I tried substituting -0001-01-01,
    Colin> which saxon doesn't complain of, but
    Colin> date='{first-of-previous-month}'" is coming out as date=''.
ah well, two typos involved there.
The second one was mine - missed out the $.
The first was yours - you had xs: instead of xdt: for a
yearMonthDuration.
Having corrected that, I end up with first of June rather than 1st of
May, so I will go over the logic, but at least you've shown me how to
work with dates - thanks.
-- 
Colin Paul Adams
Preston Lancashire
| Current Thread | 
|---|
| 
 | 
| <- Previous | Index | Next -> | 
|---|---|---|
| Re: [xsl] Working with xs:date and , Colin Paul Adams | Thread | RE: [xsl] Working with xs:date and , Michael Kay | 
| navigation, TEI, kirunews | Date | RE: [xsl] navigation, TEI, Jarno.Elovirta | 
| Month |