I'm curious what kind of coverage there is for assertions in the W3C's XML 
Schema 1.1 test suite. If it were enhanced to cover more scenarios like 
this one and others we've been discussing on this list lately it would 
help improve interoperability.

Thanks.

Michael Glavassevich
XML Technologies and WAS Development
IBM Toronto Lab
E-mail: mrgla...@ca.ibm.com
E-mail: mrgla...@apache.org

Mukul Gandhi <muk...@apache.org> wrote on 24/05/2012 04:45:07 PM:

> Interestingly, related to the addition dateTime's evaluation bug the
> PaychoPath XPath2 engine also had a bug doing subtraction operations
> on the same data types.
> 
> For e.g, the following XSD 1.1 validation didn't work correctly,
> 
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";>
> 
>    <xs:element name="test" type="X1"/>
> 
>    <xs:complexType name="X1">
>          <xs:attribute name="start" type="xs:dateTime" use="required"/>
>     <xs:assert test="(@start - xs:dayTimeDuration('P2D')) eq
> xs:dateTime('2012-03-10T10:10:05')"/>
>    </xs:complexType>
> 
> </xs:schema>
> 
> This schema should successfully validate the following XML instance 
document,
> 
> <test start="2012-03-12T10:10:05"/>
> 
> I've committed this fix as well few minutes ago.
> 
> Thanks, Jorge for bringing these issues to the list :)
> 
> On Thu, May 24, 2012 at 1:15 AM, Jorge Williams
> <jorge.willi...@rackspace.com> wrote:
> > Okay confirmed that the validation works if you remove the 
> explicit casts...but doesn't that mean that there's another bug? 
>  Regardless as to whether or not the explicit casts are needed the 
> behavior of the validation should be the same.
> 
> 
> 
> 
> -- 
> Regards,
> Mukul Gandhi
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org
> For additional commands, e-mail: j-users-h...@xerces.apache.org

Reply via email to