Re: [xsl] MSXLS equivalent for xs:date('2010-11-20')+ xs:yearMonthDuration( concat( 'P',$x,'D'))

Subject: Re: [xsl] MSXLS equivalent for xs:date('2010-11-20')+ xs:yearMonthDuration( concat( 'P',$x,'D'))
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 28 Sep 2010 11:24:53 -0400
At 2010-09-28 17:20 +0200, Bartolomeo Nicolotti wrote:
I've to maintain an XSLT 1.0 stylesheet on .net framework.

I've found that on this version

Cannot find the script or external object that implements prefix
'http://www.w3.org/2001/XMLSchema'.

so no xs:date and xs:yearMontDuration

Does anybody know an equivalent for

xs:date('2010-11-20')+ xs:yearMonthDuration( concat( 'P',$x,'D'))


I've to add $x days to a date. Googled, but hard to find.

Because it isn't there ... XSLT 1.0 does not have W3C Schema data types and, therefore, no knowledge of dates.


I don't know if MSXML supports any or all of EXSLT, but there are some functions in EXSLT that may help you if it does:

http://www.exslt.org/date/index.html

I suggest you first try some of the examples and see if the processor rejects them.

I hope this helps.

. . . . . . . . . . . Ken

--
XSLT/XQuery training:   after http://XMLPrague.cz 2011-03-28/04-01
Vote for your XML training:   http://www.CraneSoftwrights.com/s/i/
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

Current Thread