Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


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

From: "Michael Kay" <mike@------------>
To:
Date: 2/1/2006 12:47:00 PM
In the hope that the WGs might find time to address this during their
meeting today, I have posted this as

http://www.w3.org/Bugs/Public/show_bug.cgi?id=2789

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: Frans Englich [mailto:frans.englich@xxxxxxxxx] 
> Sent: 01 February 2006 01:05
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] xdt:yearMonthDuration eq xs:duration
> 
> 
> 
> Saxon 8.6 fails this expression with XPTY0004, "Cannot compare 
> xdt:yearMonthDuration to xs:duration":
> 
> xdt:yearMonthDuration("P200Y2M") eq xs:duration("P200Y2M")
> 
> 
> The XPath 2.0 book specifies these operators:
> 
> A eq B  xdt:yearMonthDuration     xdt:yearMonthDuration  
> A eq B  xdt:dayTimeDuration  	  xdt:dayTimeDuration  
> A eq B  xs:duration               xs:duration
> 
> It also says this:
> 
> <quote>
> Any operator listed in the operator mapping tables may be 
> validly applied to 
> an operand of type AT if the table calls for an operand of 
> type ET and 
> type-matches(ET, AT) is true (see 2.5.4 SequenceType 
> Matching). For example, 
> a table entry indicates that the gt operator may be applied 
> to two xs:date 
> operands, returning xs:boolean. Therefore, the gt operator 
> may also be 
> applied to two (possibly different) subtypes of xs:date, also 
> returning 
> xs:boolean.
> </quote>
> 
> Doesn't type-matches(xs:duration, xdt:yearMonthDuration) hold 
> true? My point 
> being that the expression should succeed because 
> xdt:yearMonthDuration is a 
> subtype of xs:duration and that the xs:duration-eq operator 
> therefore can be 
> applied. If that is the case, which I doubt, the eq/ne 
> operators for the two 
> XDT durations are redudant, since the xs:duration-eq/ne 
> operators covers 
> them.
> 
> What clause in any of the specifications disallow the above operand 
> combination? (and the others variations by the same principle)
> 
> 
> Thanks in advance,
> 
> 		Frans


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent