Hi Jorge,
   If I use an xs:assert with the following expression (i.e without
explicit casts on the attribute nodes, since attribute nodes are typed
within the xs:assert XDM tree)

(@end - @start) le xsd:dayTimeDuration('P1D')

I seem to get the expected result. Can you please check, if this would
work fine for you.

On Fri, May 18, 2012 at 5:24 AM, Jorge L. Williams (JIRA)
<[email protected]> wrote:
> Mukul Gandhi, mentioned the following on the list:
>
> "As a workaround, I can find the following expression to be working
> correctly though,
>
> (xs:dateTime - xs:dateTime) le xs:dayTimeDuration"
>
> Based on that I rewrote the schema to:
>
>
> <schema
>    elementFormDefault="qualified"
>    attributeFormDefault="unqualified"
>    xmlns="http://www.w3.org/2001/XMLSchema";
>    xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>    xmlns:tst="http://www.rackspace.com/test/simple";
>    targetNamespace="http://www.rackspace.com/test/simple";>
>
>    <element name="test" type="tst:Duration"/>
>
>    <complexType name="Duration">
>        <attribute name="start" type="xsd:dateTime" use="required"/>
>        <attribute name="end" type="xsd:dateTime" use="required"/>
>        <assert test="(xsd:dateTime(@end) - xsd:dateTime(@start)) le 
> xsd:dayTimeDuration('P1D')"/>
>    </complexType>
>
> </schema>
>
> It's still not working correctly :-(




-- 
Regards,
Mukul Gandhi

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to