[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Adding a xs:yearMonthDuration to a xs:dateTime to obta

Subject: 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)
xs datetime
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.