RE: [xsl] xdt:yearMonthDuration eq xs:duration

Subject: RE: [xsl] xdt:yearMonthDuration eq xs:duration
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 1 Feb 2006 20:44:36 -0000
> With your comment in that bug report as background; doesn't 
> it mean that any 
> comparison involving xdt:dayTimeDuration and 
> xdt:yearMonthDuration always 
> will evaluate to false


xdt:dayTimeDuration('PT0S') = xdt:yearMonthDuration('P0M')

will return true.

> Why is it of interest to have the following expression return false?
> op:duration-equal(xs:duration("P1Y"), xs:duration("P365D"))

Because (for example) if you are doing grouping using xsl:for-each-group or
distinct-values(), then you want these values to end up in different groups.

Michael Kay

Current Thread