Issue with XSD 1.1 assertions with dateTime and duration...
Hey Guys, I'm working off of the latest 1.1 branch. I have the following schema: 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";> Essentially, I want to make sure that the duration between start and end is not longer than one day. I test against two documents (using options -fx and -xsd11 on the CLI validator): good.xml http://www.rackspace.com/test/simple"; start="2012-03-12T11:51:11Z" end="2012-03-13T11:51:11Z"/> this document should validate. And bad.xml http://www.rackspace.com/test/simple"; start="2012-03-12T11:51:11Z" end="2012-03-13T11:51:12Z"/> which should trip the assertion. Unfortunately xerces fails both documents, which looks like a bug to me especially since Saxon passes good.xml but fails bad.xml. Thoughts? jOrGe W. - To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org For additional commands, e-mail: j-users-h...@xerces.apache.org
Re: Issue with XSD 1.1 assertions with dateTime and duration...
Hi Jorge, With my quick analysis of your use-case, I can conclude that this may be a possible bug (and quite likely in our XSD 1.1 XPath2 engine). As a workaround, I can find the following expression to be working correctly though, (xs:dateTime - xs:dateTime) le xs:dayTimeDuration You may report this issue on the JIRA system, and we'll try to solve it. On Thu, May 17, 2012 at 12:58 PM, Jorge Williams wrote: > > Hey Guys, > > I'm working off of the latest 1.1 branch. I have the following 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";> > > > > > > > > > > > > Essentially, I want to make sure that the duration between start and end is > not longer than one day. I test against two documents (using options -fx and > -xsd11 on the CLI validator): > > good.xml > > http://www.rackspace.com/test/simple"; > start="2012-03-12T11:51:11Z" end="2012-03-13T11:51:11Z"/> > > this document should validate. And > > bad.xml > > http://www.rackspace.com/test/simple"; > start="2012-03-12T11:51:11Z" end="2012-03-13T11:51:12Z"/> > > which should trip the assertion. > > Unfortunately xerces fails both documents, which looks like a bug to me > especially since Saxon passes good.xml but fails bad.xml. > > Thoughts? > > jOrGe W. -- Regards, Mukul Gandhi - To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org For additional commands, e-mail: j-users-h...@xerces.apache.org
Re: Issue with XSD 1.1 assertions with dateTime and duration...
On May 17, 2012, at 2:56 PM, Mukul Gandhi wrote: > Hi Jorge, > With my quick analysis of your use-case, I can conclude that this > may be a possible bug (and quite likely in our XSD 1.1 XPath2 engine). > > As a workaround, I can find the following expression to be working > correctly though, > > (xs:dateTime - xs:dateTime) le xs:dayTimeDuration Cool, I'll give that a try... > > You may report this issue on the JIRA system, and we'll try to solve it. Done: https://issues.apache.org/jira/browse/XERCESJ-1562 Thanks! -jOrGe W. - To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org For additional commands, e-mail: j-users-h...@xerces.apache.org