Re: Adding XSD 1.1 assertions to a complex type

2014-07-17 Thread Mukul Gandhi
On 17 July 2014 21:19, sshanmug wrote: > Thanks for the response. I added the assert and it's working. > Basically I added the following assert > > That shall also work. Its upto you. If you wish to save few keystrokes, you can opt for the I mentioned. -- Regards, Mukul Gandhi

Re: Adding XSD 1.1 assertions to a complex type

2014-07-17 Thread sshanmug
Thanks for the response. I added the assert and it's working. Basically I added the following assert -- View this message in context: http://apache-xml-project.6118.n7.nabble.com/Adding-XSD-1-1-assertions-to-a-complex-type-tp41267p41274.html Sent from the Xerces - J - Users mailing list archiv

Re: Adding XSD 1.1 assertions to a complex type

2014-07-17 Thread Mukul Gandhi
On 15 July 2014 21:38, sshanmug wrote: > If I have more than one complex types extending from abstract-comp-type, > how do I add validation to check if all the sub types have an element named > element1? > > I think, this can be simply accomplished by having following assertion within your ty

Adding XSD 1.1 assertions to a complex type

2014-07-15 Thread sshanmug
I am using the XSD 1.1 and trying to add assertions to the complex types. I have an abstract complex type and another concrete complex type extending the abstract complex type. For example:

XSD 1.1 assertions

2014-07-15 Thread sri shan
I am using the XSD 1.1 and trying to add assertions to the complex types. I have an abstract complex type and another concrete complex type extending the abstract complex type. For example:

Re: Issue with XSD 1.1 assertions with dateTime and duration...

2012-06-18 Thread Jorge Williams
Just got around to testing. Works! Thank you, -jOrGe W On Jun 16, 2012, at 3:37 AM, Mukul Gandhi wrote: > Hi Jorge, > The fixes for this issue are now available on SVN (revision, > 1350884). You may verify as appropriate. > > On Fri, Jun 15, 2012 at 4:56 PM, Jorge Williams > wrote: >>> If

Re: Issue with XSD 1.1 assertions with dateTime and duration...

2012-06-16 Thread Mukul Gandhi
Hi Jorge, The fixes for this issue are now available on SVN (revision, 1350884). You may verify as appropriate. On Fri, Jun 15, 2012 at 4:56 PM, Jorge Williams wrote: >> If making explicit casts in this case, helps users we would certainly >> try to implement it :) > > It certainly will help m

Re: Issue with XSD 1.1 assertions with dateTime and duration...

2012-06-15 Thread Jorge Williams
(Inline) On Jun 15, 2012, at 1:08 AM, Mukul Gandhi wrote: > Hi Jorge, > > On Thu, Jun 14, 2012 at 5:44 PM, Jorge Williams > wrote: > >> I couldn't find anything in the standard that says that implementation must >> have typed nodes > > The XSD 1.1 asse

Re: Issue with XSD 1.1 assertions with dateTime and duration...

2012-06-14 Thread Mukul Gandhi
Hi Jorge, On Thu, Jun 14, 2012 at 5:44 PM, Jorge Williams wrote: > I couldn't find anything in the standard that says that implementation must > have typed nodes The XSD 1.1 assertions spec here describes how the XDM data model for assertions need to be constructed, http://ww

Re: Issue with XSD 1.1 assertions with dateTime and duration...

2012-06-14 Thread Jorge Williams
There is a case where handling the cast correctly is critically important: when you are dealing with an implementation where nodes are not typed. In this case, you *always* have to do a cast to inform the validator of the type of a particular value. The Saxon implementation works this way, a

Re: Issue with XSD 1.1 assertions with dateTime and duration...

2012-06-13 Thread Mukul Gandhi
Hi Michael & all, Here are few new thoughts I've about these issues, and writing them to list here for records. The XSD type xs:dateTime has the parent type as xs:anyAtomicType. So if an XDM node reference already has a type annotation as xs:dateTime, I see no good value to do an explicit cast

Re: Issue with XSD 1.1 assertions with dateTime and duration...

2012-05-24 Thread Mukul Gandhi
Hi Michael, Surely, the bugs reported in this mail thread were in PsychoPath XPath engine. PsychoPath engine does claim conformance to the W3C XPath 2.0 test suite, and at the moment we do pass 100% of this test suite. Incidentally, the issues highlighted in this mail thread with respect to cer

Re: Issue with XSD 1.1 assertions with dateTime and duration...

2012-05-24 Thread Michael Glavassevich
, 2012, at 4:10 PM, Mukul Gandhi wrote: > > > Hi Michael, > >I believe, the W3C's XML Schema 1.1 test suite has a significant > > coverage for XSD 1.1 assertions. > > > > But I would agree, that tests like those cited within this > > thread and pr

Re: Issue with XSD 1.1 assertions with dateTime and duration...

2012-05-24 Thread Jorge Williams
's XML Schema 1.1 test suite has a significant > coverage for XSD 1.1 assertions. > > But I would agree, that tests like those cited within this > thread and probably some others as well could be added to W3C XSD 1.1 > test suite, for the reasons you've mentioned. >

Re: Issue with XSD 1.1 assertions with dateTime and duration...

2012-05-24 Thread Jorge Williams
On May 24, 2012, at 3:45 PM, Mukul Gandhi wrote: Thanks, Jorge for bringing these issues to the list :) No problem. Thanks for addressing these issues so quickly! -jOrGe W.

Re: Issue with XSD 1.1 assertions with dateTime and duration...

2012-05-24 Thread Mukul Gandhi
Hi Michael, I believe, the W3C's XML Schema 1.1 test suite has a significant coverage for XSD 1.1 assertions. But I would agree, that tests like those cited within this thread and probably some others as well could be added to W3C XSD 1.1 test suite, for the reasons you've

Re: Issue with XSD 1.1 assertions with dateTime and duration...

2012-05-24 Thread Michael Glavassevich
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

Re: Issue with XSD 1.1 assertions with dateTime and duration...

2012-05-24 Thread Mukul Gandhi
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, http://www.w3.org/2001/XMLSchema";>

Re: Issue with XSD 1.1 assertions with dateTime and duration...

2012-05-24 Thread Mukul Gandhi
Hi Michael, > Can this issue with the explicit cast be fixed in PsychoPath? Definitely, fixing this issue is doable within PsychoPath engine. I'll try to study, and possibly fix this as soon as I can or write something on the list with my findings. -- Regards, Mukul Gandhi --

Re: Issue with XSD 1.1 assertions with dateTime and duration...

2012-05-24 Thread Michael Glavassevich
Hi Mukul, Regardless of the severity I agree with Jorge that it's a pain if you can't write an XPath expression which works with both (Xerces and Saxon) implementations. Can this issue with the explicit cast be fixed in PsychoPath? Thanks. Michael Glavassevich XML Technologies and WAS Develop

Re: Issue with XSD 1.1 assertions with dateTime and duration...

2012-05-23 Thread Mukul Gandhi
Hi Jorge, On Thu, May 24, 2012 at 1:15 AM, Jorge Williams 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 > sho

Re: Issue with XSD 1.1 assertions with dateTime and duration...

2012-05-23 Thread Jorge Williams
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. I bring this up because the Saxon implementation fails if

Re: Issue with XSD 1.1 assertions with dateTime and duration...

2012-05-22 Thread Mukul Gandhi
Hi Jorge, Your example uses explicit casts on the XDM nodes, in xs:assert expressions. If I remove explicit casts from the attribute node references in your examples, I get the expected results. i.e likeand . Since the xs:assert XDM nodes are typed, we don't need to explicitly cast them

Re: Issue with XSD 1.1 assertions with dateTime and duration...

2012-05-22 Thread Jorge Williams
Hi Mukul, Just updated. Unfortunately, I'm still getting the same error with the same example. Am I doing something wrong? I'm attaching example and sample documents. good.xml should succeed for both schema, but it doesn't :-( Thanks, -jOrGe W. On May 22, 2012, at 3:46 PM, Mukul Gandhi

Re: Issue with XSD 1.1 assertions with dateTime and duration...

2012-05-22 Thread Mukul Gandhi
Hi Jorge, I did try to fix this issue, and the changes for this are now committed to SVN. Xerces's XPath2 engine had a bug doing addition of xs:dateTime and xs:dayTimeDuration values, which I hope is now fixed completely. Please feel free to report, if you find anything still incorrect. On Fr

Re: Issue with XSD 1.1 assertions with dateTime and duration...

2012-05-17 Thread Jorge Williams
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, >

Re: Issue with XSD 1.1 assertions with dateTime and duration...

2012-05-17 Thread Mukul Gandhi
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 rep

Issue with XSD 1.1 assertions with dateTime and duration...

2012-05-17 Thread Jorge Williams
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";>