Subject: Re: [xsl] Re: What is the best way to cast integer to string in X SLT2?|
From: Andrew Watt <andrew@xxxxxxxxxxxxxx>
Date: Tue, 13 May 2003 15:34:07 +0100
Mike wrote: > A "Basic XSLT Processor" supports atomic values conforming to the > built-in types defined in XML Schema. So you can do things like > > xs:duration("P10H30M") + xs:duration("P12H15M") > > to add two durations.
Except you can't because you can only add two yearMonthDurations or two dayTimeDurations. Mike meant:
xdt:dayTimeDuration("PT10H30M") + xdt:dayTimeDuration("PT12H15M")
(Also note the "T" in the duration syntax, which separates the year/month/day from the hours/minutes/seconds.)