[xsl] Adding a xs:yearMonthDuration to a xs:dateTime to obtain a new xs:dateTime variable

Subject: [xsl] Adding a xs:yearMonthDuration to a xs:dateTime to obtain a new xs:dateTime variable
From: Allan Kamau <kamauallan@xxxxxxxxx>
Date: Mon, 16 Oct 2006 04:25:51 -0700 (PDT)
Hi all,
(In xslt2.0)I would like to increment a xs:dateTime
variable dt by one month. And have the result in (or
somehow converted to) xs:dateTime.
How can I achieve this.

Similar to using 
op:add-yearMonthDuration-to-dateTime( $arg1  as
xs:dateTime, $arg2  as xs:yearMonthDuration) as
xs:dateTime

but the above function may not be for direct use by
users as explained from at
[www.w3.org/TR/xpath-functions/#namespace-prefixes]
"These functions are not available directly to users,
and there is no requirement that implementations
should actually provide these functions. For this
reason, no namespace is associated with the op prefix.
"

I am using saxon8.
If I use 
<xsl:variable name="tmp3"
select='$currentGridDate+xs:yearMonthDuration("P1M")'/>
or
<xsl:variable name="tmp3" as="xs:dateTime"
select='$currentGridDate+xs:yearMonthDuration("P1M")'/>

The datetype of $tmp3 will be xs:dayTimeDuration in
both cases.

I would like to have the result in xs:dateTime so I
could call a template to recursively increment the
result by on month while making use of the result at
each recursion (variables are static final in xsl).

Allan.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Current Thread