xsl-list
[Top] [All Lists]

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

2006-10-16 07:09:10
Thanks Abel, it worked.

Allan.

--- Abel Braaksma <abel(_dot_)online(_at_)xs4all(_dot_)nl> wrote:

Allan Kamau wrote:

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 think that you should explicitly convert the first
argument to 
xs:dateTime, or it must be explicitly declared. This
works, and returns 
"2004-12-15T15:12:10" (which is 1 day and 1 hour
later than the supplied 
date time):

<xsl:value-of
select="xs:dateTime('2004-12-14T14:12:10') + 
xs:dayTimeDuration('P1DT1H')"></xsl:value-of>

I tried it with Saxon 8.8, newest release.

Hth,

Cheers,
-- Abel Braaksma
   http://www.nuntia.com


--~------------------------------------------------------------------
XSL-List info and archive: 
http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to:
http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>