You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by David Costanzo <da...@yahoo.com.INVALID> on 2016/06/09 13:34:17 UTC

Interaction between redefine+include breaks augmenting a base schema's element with new attributes

There seems to be an interaction between xs:redefine referring to a schema which then does an xs:include that prevents Xerces from recognizing that an attributeGroup defined in the xs:include'd schema has been extended to include new attributes from a second namespace.  I think this is a bug in xerces2, but I'm not an XML expert, so I have some doubt.  Per the instructions on http://xerces.apache.org/xerces2-j/jira.html, I am emailing this list for clarification.

The basic setup:
base.xsd          - Defines an element named "element" with an attributeGroup
base-wrapper.xsd  - Merely does an "xs:include" of base.xsd
second-ns.xsd     - Defines an attribute named "happy" in a distinct namespace from one in base.xsd

augmented.xsd     - Does "xs:redefine" of base-wrapper.xsd to add the attribute from second-ns.xsd to the attributeGroup in base.xsd.document.xml      - Uses an element from base.xsd with the attribute from second-ns.xsd.


My expectation is that document.xml is valid with respect to augmented.xsd.  However, Xerces2 reports a validation error.

# java jaxp.SourceValidator -a augmented.xsd -i document.xml
[Error] document.xml:7:3: cvc-complex-type.3.2.2: Attribute 'second:happy' is not allowed to appear in element 'element'.


If, instead of redefining base-wrapper.xsd, which does nothing but xs:include base.xsd, augmented.xsd redefine's base.xsd directly, then Xerces reports document.xml as valid.

I have confirmed that "xmllint" (version 20706) reports document.xml as valid.  My JVM uses Xerces-J 2.7.1, but I have also reproduced this on xerces-2.11.0 and on trunk using "java jaxp.SourceValidator".

Is this a bug that I should open in JIRA?  Or am I misunderstanding something about XML?

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: Interaction between redefine+include breaks augmenting a base schema's element with new attributes

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Thanks Gary.

I've been meaning for a long time to fish through JIRA and start building 
release notes. Probably enough new function / enhancements to call it 
2.12.0.

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

Gary Gregory <ga...@gmail.com> wrote on 06/13/2016 05:03:33 PM:

> I can probably help here and there.
> 
> Gary
> 
> On Mon, Jun 13, 2016 at 1:22 PM, Michael Glavassevich 
<mrglavas@ca.ibm.com
> > wrote:
> Regarding a new Xerces release, I think we'd certainly like to see one
> happen, but it needs volunteers to help drive it.
> 
> Thanks.
> 
> Michael Glavassevich
> XML Technologies and WAS Development
> IBM Toronto Lab
> E-mail: mrglavas@ca.ibm.com
> E-mail: mrglavas@apache.org
> 
> David Costanzo <da...@yahoo.com> wrote on 06/10/2016 04:07:52 
PM:
> 
> > > Thanks Mukul, I'll open a JIRA ticket as you suggest.
> >
> > As I went to open the ticket in JIRA, I found that Mukul Gandhi
> > already fixed it.
> >
> > https://issues.apache.org/jira/browse/XERCESJ-1591
> >
> > Thank you, Mukul!
> >
> > The fix was made in the xml-schema-1.1-dev branch that has not been
> > merged into trunk, which is why I could still reproduce the problem
> > on the latest code and in the latest release.  In looking at the
> > release velocity, I see that the fix was made four years ago, Oct
> > 2012 (just hours after it was reported!), the last Xerces release
> > was made in Nov 2010, and the version which a recent HotSpot JVM (1.
> > 8.0_71) uses is Xerces 2.7.1, released in July 2005.
> >
> > So if I want the fix for my program, is my best bet to use a private
> > build from a development branch?  Are there any plans for another
> > Xerces release?
> >
> > By the way, once a minimal repro scenario is constructed, this looks
> > like an esoteric problem on the fringes of the XML standards, but
> > this bug does have a practical, real-world impact.  In the world of
> > clinical research which includes testing new medicines, there's a
> > standards body called CDISC.  CDISC defines an XML standard for
> > interchange of clinical data called ODM and states that a computing
> > system that processes ODM can only claim conformance if it obeys
> > several rules, one of which is "ODM files must validate against the
> > ODM schema for the ODM version indicated in the ODM root element".
> > My project manager has interpreted this as a requirement to validate
> > all ODM documents.
> >
> > The ODM standard allows for "vendor extensions" and requires that
> > they be implemented in a separate namespace.  The extensions are
> > added by redefining special "extension groups" which the ODM base
> > standard defines for exactly this purpose.
> >
> > So to qualify as a "conforming system", my code must validate
> > documents according to a schema that a vendor provides me.  The ODM
> > base standard has a top-level .XSD file that uses an xs:include and
> > the vendor extensions are expected to use a xs:redefine of that.
> > Because of this bug, Xerces 2.11.0 cannot validate ODM against a
> > vendor's extension.  I can make some simple changes to the vendor
> > schema so that Xerces can validate with it, but then that casts
> > doubt on whether it's really validating with the vendor extensions.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> > For additional commands, e-mail: j-users-help@xerces.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: Interaction between redefine+include breaks augmenting a base schema's element with new attributes

Posted by Gary Gregory <ga...@gmail.com>.
I can probably help here and there.

Gary

On Mon, Jun 13, 2016 at 1:22 PM, Michael Glavassevich <mr...@ca.ibm.com>
wrote:

> Regarding a new Xerces release, I think we'd certainly like to see one
> happen, but it needs volunteers to help drive it.
>
> Thanks.
>
> Michael Glavassevich
> XML Technologies and WAS Development
> IBM Toronto Lab
> E-mail: mrglavas@ca.ibm.com
> E-mail: mrglavas@apache.org
>
> David Costanzo <da...@yahoo.com> wrote on 06/10/2016 04:07:52 PM:
>
> > > Thanks Mukul, I'll open a JIRA ticket as you suggest.
> >
> > As I went to open the ticket in JIRA, I found that Mukul Gandhi
> > already fixed it.
> >
> > https://issues.apache.org/jira/browse/XERCESJ-1591
> >
> > Thank you, Mukul!
> >
> > The fix was made in the xml-schema-1.1-dev branch that has not been
> > merged into trunk, which is why I could still reproduce the problem
> > on the latest code and in the latest release.  In looking at the
> > release velocity, I see that the fix was made four years ago, Oct
> > 2012 (just hours after it was reported!), the last Xerces release
> > was made in Nov 2010, and the version which a recent HotSpot JVM (1.
> > 8.0_71) uses is Xerces 2.7.1, released in July 2005.
> >
> > So if I want the fix for my program, is my best bet to use a private
> > build from a development branch?  Are there any plans for another
> > Xerces release?
> >
> > By the way, once a minimal repro scenario is constructed, this looks
> > like an esoteric problem on the fringes of the XML standards, but
> > this bug does have a practical, real-world impact.  In the world of
> > clinical research which includes testing new medicines, there's a
> > standards body called CDISC.  CDISC defines an XML standard for
> > interchange of clinical data called ODM and states that a computing
> > system that processes ODM can only claim conformance if it obeys
> > several rules, one of which is "ODM files must validate against the
> > ODM schema for the ODM version indicated in the ODM root element".
> > My project manager has interpreted this as a requirement to validate
> > all ODM documents.
> >
> > The ODM standard allows for "vendor extensions" and requires that
> > they be implemented in a separate namespace.  The extensions are
> > added by redefining special "extension groups" which the ODM base
> > standard defines for exactly this purpose.
> >
> > So to qualify as a "conforming system", my code must validate
> > documents according to a schema that a vendor provides me.  The ODM
> > base standard has a top-level .XSD file that uses an xs:include and
> > the vendor extensions are expected to use a xs:redefine of that.
> > Because of this bug, Xerces 2.11.0 cannot validate ODM against a
> > vendor's extension.  I can make some simple changes to the vendor
> > schema so that Xerces can validate with it, but then that casts
> > doubt on whether it's really validating with the vendor extensions.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> > For additional commands, e-mail: j-users-help@xerces.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

RE: Interaction between redefine+include breaks augmenting a base schema's element with new attributes

Posted by Sam Harwell <sa...@tunnelvisionlabs.com>.
Yes, we’re talking specifically about the XPath 2.0 test suite. I’m currently in the process of identifying specific bugs revealed by the tests, filing individual reports for those bugs, and breaking up all my changes into specific corrections to them.

Note that all of the bugs have been filed yet, and pull requests are not available for some of the bugs that have been filed. The biggest upcoming change from an implementation standpoint is dramatic improvements to the way “seconds” are stored (xs:decimal instead of xs:double) along with major improvements to timezone handling and very old dates (including before 1AD). The biggest upcoming change from a “size of diff” standpoint is a correction to the eq operator for QName; it needs access to the static context to correctly handle namespaces which ends up changing quite a few evaluation methods (an argument changes from DynamicContext to EvaluationContext). I believe Rackspace is currently relying on Saxon due to bugs within the date/time/timezone handling functionality, so this will be an important change for them.

Thank you,
Sam Harwell

From: Jorge Williams [mailto:jorge.williams@rackspace.com]
Sent: Friday, June 24, 2016 9:16 AM
To: j-users@xerces.apache.org; mukulg@apache.org
Cc: Sam Harwell <sa...@tunnelvisionlabs.com>
Subject: Re: Interaction between redefine+include breaks augmenting a base schema's element with new attributes


Hey Mukul,



Sorry I should have been more specific.  I'm sure that Xerces does indeed pass the XML Schema 1.1 test suite.  That said, we have run into a number of issues that are directly related with errors in XPath  -- which XML Schema 1.1 uses for assertions.  So when I say test suite, I'm talking about PsycoPath passing the W3C XPath / XQuery test suite. If you look at the github project (https://github.com/sharwell/webtools.sourceediting.xpath), you can see that  Sam has integrated the test suite into the build process ​and you can see specifically which tests are failing and which tests have been corrected in the Rackspace branch.



-jOrGe W.





________________________________
From: Mukul Gandhi <mu...@apache.org>
Sent: Friday, June 24, 2016 3:58 AM
To: j-users@xerces.apache.org
Cc: sam@tunnelvisionlabs.com
Subject: Re: Interaction between redefine+include breaks augmenting a base schema's element with new attributes

Hi Jorge,
   We (that includes I think me, Jesper & Dave Carver) had done various fixes earlier to the originally contributed PsycoPath library that Xerces uses for its XML Schema 1.1 implementation. I can say with much responsibility (being a previous committer to Eclipse WTP source editing, and also as a PMC member of Xerces), that the current jar file for PsycoPath, on Xerces SVN conforms fully to the W3C XML Schema 1.1 test suite.

You say, '.. XPath 2 implementation reports over 800 failures in the W3C test suite'. I'm curious what W3C XML Schema 1.1 tests, you and Sam found that PsycoPath library used by Xerces does not pass? Our XML Schema 1.1 conformance reports are located at: http://wiki.apache.org/xerces/xmlschema11TestSuiteReports. I believe, this is also indirectly linked from the XML Schema 1.1 specification.

On 24 June 2016 at 02:49, Jorge Williams <jo...@rackspace.com>> wrote:
Hey Guys,


If we are planning a release of Xerces, may I suggest that we also update version of PsycoPath that Xerces is currently using. The current version of the XPath 2 implementation reports over 800 failures in the W3C test suite.  Sam Harwell has been able to reduce this number to about 34!

I’m in the process of reviewing these fixes — which you can find here:

 <https://github.com/sharwell/webtools.sourceediting.xpath/pulls>https://github.com/sharwell/webtools.sourceediting.xpath/pulls

Any help with these code review these PRs would be great and it would be awesome to include a new build of PsycoPath with the next Xerces release.

Thanks,

-jOrGe W.



> On Jun 17, 2016, at 8:54 AM, Michael Glavassevich <mr...@ca.ibm.com>> wrote:
>
> Thanks David.
>
> Michael Glavassevich
> XML Technologies and WAS Development
> IBM Toronto Lab
> E-mail: mrglavas@ca.ibm.com<ma...@ca.ibm.com>
> E-mail: mrglavas@apache.org<ma...@apache.org>
>
> David Costanzo <da...@yahoo.com>> wrote on 06/17/2016 09:37:56 AM:
>
>> From: David Costanzo
>>>> I started with the JIRA release notes [1] and it doesn't look like I
>>>> have permissions to help with this. [snip]
>>
>> From: Michael Glavassevich
>>> I just add you to the list of contributors in JIRA. Hopefully that
> also
>>> granted you permission to update that field.
>>
>> Yes, that works.  I should be able to build up the release notes,
>> now.  I'll start a new thread in the "xerces-devs" list for any
>> conversation specific to the 2.12.0 release, instead of rambling
>> off-topic on this thread.
>>
>>
>>
>> From: David Costanzo
>>
>>>> As mentioned previously, the fix that my organization wants > >
>> (XERCESJ-1591, r1396551) was made in the "xml-schema-1.1-dev"
>>>> branch, not trunk, so that branch would have to be merged back to
>>>> trunk (or the fix duplicated in trunk) in order for a 2.12.0 release
>>>> to benefit my organization.
>>
>>
>> From: Michael Glavassevich
>>> I'll take a look at the original fix. Assuming it applies to XML
> Schema
>>> 1.0, it should have been committed at the same time to the trunk.
>>
>>
>> That would be appreciated, Michael.  Thanks.
>>

--
Regards,
Mukul Gandhi

Re: Interaction between redefine+include breaks augmenting a base schema's element with new attributes

Posted by Jorge Williams <jo...@rackspace.com>.
Mukul,


While I am sure that PsycoPath unit tests are passing correctly -- we are testing directly against W3C XPath 2.0 test suite.  If you run tests against this suite, you'll note that PsycoPath fails a significant number of them -- enough of these tests are failing that we are not able to use XML Schema 1.1 branch in production. Sam has done an amazing job of closing the gap and bringing PsycoPath much closer to compliance.


Think of the github repo that Sam is working on as a means by which you can review the changes that he's been making. The goal isn't to fork forever. There are a significant number of bug fixes there and we want to contribute them as efficiently as possible.


Here's a pointer to the pull requests that have already been closed...


https://github.com/sharwell/webtools.sourceediting.xpath/pulls?q=is%3Apr+is%3Aclosed


Each pull request contains within it the number of failures against the WC3 test suite before the pull request and after.  More pull requests are coming.


I'd personally prefer option #1, and am open to suggestions on how to get this moving quickly .  Would you mind adding your contacts to  Eclipse WTP to this thread for their input?


I'd like to have Sam continue his work on removing bugs without getting bogged down on how those bugs make it to upstream.  I'm perfectly happy to recreate pull requests, but that seems like a lot of work.  I'd be curious if the team would be interested in reviewing Sam's fork directly and then merging from there?


Thanks,


-jOrGe W.


________________________________
From: Mukul Gandhi <mu...@apache.org>
Sent: Tuesday, June 28, 2016 12:15 AM
To: Jorge Williams
Cc: j-users@xerces.apache.org; sam@tunnelvisionlabs.com; Michael Glavassevich
Subject: Re: Interaction between redefine+include breaks augmenting a base schema's element with new attributes

Hi Jorge,
   I've just re-analyzed the situation you've described in right earnest, and following are my findings:

Xerces-J is supposed to use following two branches from Eclipse WTP project located at dev.eclipse.org<http://dev.eclipse.org>

R3_2_maintenance         (this is where the product code of XPath 2.0 processor, is stored which Xerces-J is using. We use this, because this branch as agreed works with JDK 1.4)
R3_2_xpath2_14unittests    (this is where the unit tests are located, which tests the product code of R3_2_maintenance branch. To run these unit tests, we would need JDK 1.5)

These two code branches were created only to facilitate Xerces-J XML Schema 1.1 development. I think these decisions date back to few years ago.

I have all the latest code from these two branches, on my development workstation. Following are the results of unit tests run, that I get as of today:
There are total 8276 tests on the R3_2_xpath2_14unittests branch. Except for 3 tests in the file CatalogTest.class, that give java.lang.OutOfMemoryError to me, 8273 tests pass. I think these results are great, and there should not be any doubt about the quality of the XPath 2.0 processor, that Xerces-J is currently using on the SVN.

The other points that I would like to reply are:
You've mentioned a github project, that's forking the XPath 2.0 code base from Eclipse WTP dev.eclipse.org<http://dev.eclipse.org> site and making improvements on it. I personally have no issues with this and if you wish to use such an improved PsychoPath XPath 2.0 processor at rackspace.
I think, it is convenient for Xerces-J for the next XML Schema 1.1 release, to use the PsychoPath jar which is kept at present on the SVN. But I also think, Xerces-J must have a mechanism to have an improved XPath 2.0 processor anytime in future, than what we currently have on the SVN. I think, the right way for this will be one of the following options:
1) Any improvements must be mentioned as Eclipse WTP bugs on Eclipse forums, and ask for fixes there. We can get new XPath 2.0 jars as part of Eclipse WTP releases.
2) We host a copy of PsychoPath XPath 2.0 code base from R3_2_maintenance and R3_2_xpath2_14unittests branches, as branches on Xerces-J source code site. I think I'll be able to do this, by committing from my development workstation. But for that, I'll need permission from Xerces-J dev members and ideally from PMC also. Someone else may also, fetch latest code base from Eclipse WTP R3_2_maintenance and R3_2_xpath2_14unittests branches, and commit to Xerces-J SVN.
3) We take all new improvements for PsychoPath XPath 2.0 code base, from the github PsychoPath site that you've created for rackspace.

But the first two options that I've mentioned, look more natural to me when I see how Xerces-J and Eclipse WTP work together.

I'm copying this mail to Michael if he would like to comment anything on this.

On 24 June 2016 at 19:46, Jorge Williams <jo...@rackspace.com>> wrote:

Hey Mukul,


Sorry I should have been more specific.  I'm sure that Xerces does indeed pass the XML Schema 1.1 test suite.  That said, we have run into a number of issues that are directly related with errors in XPath  -- which XML Schema 1.1 uses for assertions.  So when I say test suite, I'm talking about PsycoPath passing the W3C XPath / XQuery test suite. If you look at the github project (https://github.com/sharwell/webtools.sourceediting.xpath), you can see that  Sam has integrated the test suite into the build process ​and you can see specifically which tests are failing and which tests have been corrected in the Rackspace branch.


-jOrGe W.



________________________________
From: Mukul Gandhi <mu...@apache.org>>
Sent: Friday, June 24, 2016 3:58 AM
To: j-users@xerces.apache.org<ma...@xerces.apache.org>
Cc: sam@tunnelvisionlabs.com<ma...@tunnelvisionlabs.com>
Subject: Re: Interaction between redefine+include breaks augmenting a base schema's element with new attributes

Hi Jorge,
   We (that includes I think me, Jesper & Dave Carver) had done various fixes earlier to the originally contributed PsycoPath library that Xerces uses for its XML Schema 1.1 implementation. I can say with much responsibility (being a previous committer to Eclipse WTP source editing, and also as a PMC member of Xerces), that the current jar file for PsycoPath, on Xerces SVN conforms fully to the W3C XML Schema 1.1 test suite.

You say, '.. XPath 2 implementation reports over 800 failures in the W3C test suite'. I'm curious what W3C XML Schema 1.1 tests, you and Sam found that PsycoPath library used by Xerces does not pass? Our XML Schema 1.1 conformance reports are located at: http://wiki.apache.org/xerces/xmlschema11TestSuiteReports. I believe, this is also indirectly linked from the XML Schema 1.1 specification.


On 24 June 2016 at 02:49, Jorge Williams <jo...@rackspace.com>> wrote:
Hey Guys,


If we are planning a release of Xerces, may I suggest that we also update version of PsycoPath that Xerces is currently using. The current version of the XPath 2 implementation reports over 800 failures in the W3C test suite.  Sam Harwell has been able to reduce this number to about 34!

I’m in the process of reviewing these fixes — which you can find here:

 <https://github.com/sharwell/webtools.sourceediting.xpath/pulls>https://github.com/sharwell/webtools.sourceediting.xpath/pulls

Any help with these code review these PRs would be great and it would be awesome to include a new build of PsycoPath with the next Xerces release.

Thanks,

-jOrGe W.



> On Jun 17, 2016, at 8:54 AM, Michael Glavassevich <mr...@ca.ibm.com>> wrote:
>
> Thanks David.
>
> Michael Glavassevich
> XML Technologies and WAS Development
> IBM Toronto Lab
> E-mail: mrglavas@ca.ibm.com<ma...@ca.ibm.com>
> E-mail: mrglavas@apache.org<ma...@apache.org>
>
> David Costanzo <da...@yahoo.com>> wrote on 06/17/2016 09:37:56 AM:
>
>> From: David Costanzo
>>>> I started with the JIRA release notes [1] and it doesn't look like I
>>>> have permissions to help with this. [snip]
>>
>> From: Michael Glavassevich
>>> I just add you to the list of contributors in JIRA. Hopefully that
> also
>>> granted you permission to update that field.
>>
>> Yes, that works.  I should be able to build up the release notes,
>> now.  I'll start a new thread in the "xerces-devs" list for any
>> conversation specific to the 2.12.0 release, instead of rambling
>> off-topic on this thread.
>>
>>
>>
>> From: David Costanzo
>>
>>>> As mentioned previously, the fix that my organization wants > >
>> (XERCESJ-1591, r1396551) was made in the "xml-schema-1.1-dev"
>>>> branch, not trunk, so that branch would have to be merged back to
>>>> trunk (or the fix duplicated in trunk) in order for a 2.12.0 release
>>>> to benefit my organization.
>>
>>
>> From: Michael Glavassevich
>>> I'll take a look at the original fix. Assuming it applies to XML
> Schema
>>> 1.0, it should have been committed at the same time to the trunk.
>>
>>
>> That would be appreciated, Michael.  Thanks.
>>

--
Regards,
Mukul Gandhi



--
Regards,
Mukul Gandhi

Re: Interaction between redefine+include breaks augmenting a base schema's element with new attributes

Posted by Jorge Williams <jo...@rackspace.com>.
Hey Mukul,


Sorry I should have been more specific.  I'm sure that Xerces does indeed pass the XML Schema 1.1 test suite.  That said, we have run into a number of issues that are directly related with errors in XPath  -- which XML Schema 1.1 uses for assertions.  So when I say test suite, I'm talking about PsycoPath passing the W3C XPath / XQuery test suite. If you look at the github project (https://github.com/sharwell/webtools.sourceediting.xpath), you can see that  Sam has integrated the test suite into the build process ​and you can see specifically which tests are failing and which tests have been corrected in the Rackspace branch.


-jOrGe W.



________________________________
From: Mukul Gandhi <mu...@apache.org>
Sent: Friday, June 24, 2016 3:58 AM
To: j-users@xerces.apache.org
Cc: sam@tunnelvisionlabs.com
Subject: Re: Interaction between redefine+include breaks augmenting a base schema's element with new attributes

Hi Jorge,
   We (that includes I think me, Jesper & Dave Carver) had done various fixes earlier to the originally contributed PsycoPath library that Xerces uses for its XML Schema 1.1 implementation. I can say with much responsibility (being a previous committer to Eclipse WTP source editing, and also as a PMC member of Xerces), that the current jar file for PsycoPath, on Xerces SVN conforms fully to the W3C XML Schema 1.1 test suite.

You say, '.. XPath 2 implementation reports over 800 failures in the W3C test suite'. I'm curious what W3C XML Schema 1.1 tests, you and Sam found that PsycoPath library used by Xerces does not pass? Our XML Schema 1.1 conformance reports are located at: http://wiki.apache.org/xerces/xmlschema11TestSuiteReports. I believe, this is also indirectly linked from the XML Schema 1.1 specification.


On 24 June 2016 at 02:49, Jorge Williams <jo...@rackspace.com>> wrote:
Hey Guys,


If we are planning a release of Xerces, may I suggest that we also update version of PsycoPath that Xerces is currently using. The current version of the XPath 2 implementation reports over 800 failures in the W3C test suite.  Sam Harwell has been able to reduce this number to about 34!

I’m in the process of reviewing these fixes — which you can find here:

 <https://github.com/sharwell/webtools.sourceediting.xpath/pulls>https://github.com/sharwell/webtools.sourceediting.xpath/pulls

Any help with these code review these PRs would be great and it would be awesome to include a new build of PsycoPath with the next Xerces release.

Thanks,

-jOrGe W.



> On Jun 17, 2016, at 8:54 AM, Michael Glavassevich <mr...@ca.ibm.com>> wrote:
>
> Thanks David.
>
> Michael Glavassevich
> XML Technologies and WAS Development
> IBM Toronto Lab
> E-mail: mrglavas@ca.ibm.com<ma...@ca.ibm.com>
> E-mail: mrglavas@apache.org<ma...@apache.org>
>
> David Costanzo <da...@yahoo.com>> wrote on 06/17/2016 09:37:56 AM:
>
>> From: David Costanzo
>>>> I started with the JIRA release notes [1] and it doesn't look like I
>>>> have permissions to help with this. [snip]
>>
>> From: Michael Glavassevich
>>> I just add you to the list of contributors in JIRA. Hopefully that
> also
>>> granted you permission to update that field.
>>
>> Yes, that works.  I should be able to build up the release notes,
>> now.  I'll start a new thread in the "xerces-devs" list for any
>> conversation specific to the 2.12.0 release, instead of rambling
>> off-topic on this thread.
>>
>>
>>
>> From: David Costanzo
>>
>>>> As mentioned previously, the fix that my organization wants > >
>> (XERCESJ-1591, r1396551) was made in the "xml-schema-1.1-dev"
>>>> branch, not trunk, so that branch would have to be merged back to
>>>> trunk (or the fix duplicated in trunk) in order for a 2.12.0 release
>>>> to benefit my organization.
>>
>>
>> From: Michael Glavassevich
>>> I'll take a look at the original fix. Assuming it applies to XML
> Schema
>>> 1.0, it should have been committed at the same time to the trunk.
>>
>>
>> That would be appreciated, Michael.  Thanks.
>>

--
Regards,
Mukul Gandhi

Re: Interaction between redefine+include breaks augmenting a base schema's element with new attributes

Posted by Mukul Gandhi <mu...@apache.org>.
Hi Jorge,
   We (that includes I think me, Jesper & Dave Carver) had done various
fixes earlier to the originally contributed PsycoPath library that Xerces
uses for its XML Schema 1.1 implementation. I can say with much
responsibility (being a previous committer to Eclipse WTP source editing,
and also as a PMC member of Xerces), that the current jar file for
PsycoPath, on Xerces SVN conforms fully to the W3C XML Schema 1.1 test
suite.

You say, '.. XPath 2 implementation reports over 800 failures in the W3C
test suite'. I'm curious what W3C XML Schema 1.1 tests, you and Sam found
that PsycoPath library used by Xerces does not pass? Our XML Schema 1.1
conformance reports are located at:
http://wiki.apache.org/xerces/xmlschema11TestSuiteReports. I believe, this
is also indirectly linked from the XML Schema 1.1 specification.


On 24 June 2016 at 02:49, Jorge Williams <jo...@rackspace.com>
wrote:

> Hey Guys,
>
>
> If we are planning a release of Xerces, may I suggest that we also update
> version of PsycoPath that Xerces is currently using. The current version of
> the XPath 2 implementation reports over 800 failures in the W3C test
> suite.  Sam Harwell has been able to reduce this number to about 34!
>
> I’m in the process of reviewing these fixes — which you can find here:
>
>  <https://github.com/sharwell/webtools.sourceediting.xpath/pulls>
> https://github.com/sharwell/webtools.sourceediting.xpath/pulls
>
> Any help with these code review these PRs would be great and it would be
> awesome to include a new build of PsycoPath with the next Xerces release.
>
> Thanks,
>
> -jOrGe W.
>
>
>
> > On Jun 17, 2016, at 8:54 AM, Michael Glavassevich <mr...@ca.ibm.com>
> wrote:
> >
> > Thanks David.
> >
> > Michael Glavassevich
> > XML Technologies and WAS Development
> > IBM Toronto Lab
> > E-mail: mrglavas@ca.ibm.com
> > E-mail: mrglavas@apache.org
> >
> > David Costanzo <da...@yahoo.com> wrote on 06/17/2016 09:37:56
> AM:
> >
> >> From: David Costanzo
> >>>> I started with the JIRA release notes [1] and it doesn't look like I
> >>>> have permissions to help with this. [snip]
> >>
> >> From: Michael Glavassevich
> >>> I just add you to the list of contributors in JIRA. Hopefully that
> > also
> >>> granted you permission to update that field.
> >>
> >> Yes, that works.  I should be able to build up the release notes,
> >> now.  I'll start a new thread in the "xerces-devs" list for any
> >> conversation specific to the 2.12.0 release, instead of rambling
> >> off-topic on this thread.
> >>
> >>
> >>
> >> From: David Costanzo
> >>
> >>>> As mentioned previously, the fix that my organization wants > >
> >> (XERCESJ-1591, r1396551) was made in the "xml-schema-1.1-dev"
> >>>> branch, not trunk, so that branch would have to be merged back to
> >>>> trunk (or the fix duplicated in trunk) in order for a 2.12.0 release
> >>>> to benefit my organization.
> >>
> >>
> >> From: Michael Glavassevich
> >>> I'll take a look at the original fix. Assuming it applies to XML
> > Schema
> >>> 1.0, it should have been committed at the same time to the trunk.
> >>
> >>
> >> That would be appreciated, Michael.  Thanks.
> >>
>
> --
> Regards,
> Mukul Gandhi
>

Re: Interaction between redefine+include breaks augmenting a base schema's element with new attributes

Posted by Jorge Williams <jo...@rackspace.com>.
Hey Guys,


If we are planning a release of Xerces, may I suggest that we also update version of PsycoPath that Xerces is currently using. The current version of the XPath 2 implementation reports over 800 failures in the W3C test suite.  Sam Harwell has been able to reduce this number to about 34!  

I’m in the process of reviewing these fixes — which you can find here:

 <https://github.com/sharwell/webtools.sourceediting.xpath/pulls>https://github.com/sharwell/webtools.sourceediting.xpath/pulls

Any help with these code review these PRs would be great and it would be awesome to include a new build of PsycoPath with the next Xerces release.

Thanks,

-jOrGe W.



> On Jun 17, 2016, at 8:54 AM, Michael Glavassevich <mr...@ca.ibm.com> wrote:
> 
> Thanks David.
> 
> Michael Glavassevich
> XML Technologies and WAS Development
> IBM Toronto Lab
> E-mail: mrglavas@ca.ibm.com
> E-mail: mrglavas@apache.org
> 
> David Costanzo <da...@yahoo.com> wrote on 06/17/2016 09:37:56 AM:
> 
>> From: David Costanzo
>>>> I started with the JIRA release notes [1] and it doesn't look like I
>>>> have permissions to help with this. [snip]
>> 
>> From: Michael Glavassevich
>>> I just add you to the list of contributors in JIRA. Hopefully that 
> also
>>> granted you permission to update that field.
>> 
>> Yes, that works.  I should be able to build up the release notes, 
>> now.  I'll start a new thread in the "xerces-devs" list for any 
>> conversation specific to the 2.12.0 release, instead of rambling 
>> off-topic on this thread.
>> 
>> 
>> 
>> From: David Costanzo
>> 
>>>> As mentioned previously, the fix that my organization wants > > 
>> (XERCESJ-1591, r1396551) was made in the "xml-schema-1.1-dev" 
>>>> branch, not trunk, so that branch would have to be merged back to 
>>>> trunk (or the fix duplicated in trunk) in order for a 2.12.0 release
>>>> to benefit my organization.
>> 
>> 
>> From: Michael Glavassevich
>>> I'll take a look at the original fix. Assuming it applies to XML 
> Schema 
>>> 1.0, it should have been committed at the same time to the trunk.
>> 
>> 
>> That would be appreciated, Michael.  Thanks.
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
>> For additional commands, e-mail: j-users-help@xerces.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org
> 


Re: Interaction between redefine+include breaks augmenting a base schema's element with new attributes

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Thanks David.

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

David Costanzo <da...@yahoo.com> wrote on 06/17/2016 09:37:56 AM:
 
> From: David Costanzo
> > > I started with the JIRA release notes [1] and it doesn't look like I
> > > have permissions to help with this. [snip]
> 
> From: Michael Glavassevich
> > I just add you to the list of contributors in JIRA. Hopefully that 
also
> > granted you permission to update that field.
> 
> Yes, that works.  I should be able to build up the release notes, 
> now.  I'll start a new thread in the "xerces-devs" list for any 
> conversation specific to the 2.12.0 release, instead of rambling 
> off-topic on this thread.
> 
> 
> 
> From: David Costanzo
> 
> > > As mentioned previously, the fix that my organization wants > > 
> (XERCESJ-1591, r1396551) was made in the "xml-schema-1.1-dev" 
> > > branch, not trunk, so that branch would have to be merged back to 
> > > trunk (or the fix duplicated in trunk) in order for a 2.12.0 release
> > > to benefit my organization.
> 
> 
> From: Michael Glavassevich
> > I'll take a look at the original fix. Assuming it applies to XML 
Schema 
> > 1.0, it should have been committed at the same time to the trunk.
> 
> 
> That would be appreciated, Michael.  Thanks.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: Interaction between redefine+include breaks augmenting a base schema's element with new attributes

Posted by David Costanzo <da...@yahoo.com.INVALID>.
From: David Costanzo
> > I started with the JIRA release notes [1] and it doesn't look like I
> > have permissions to help with this. [snip]

From: Michael Glavassevich
> I just add you to the list of contributors in JIRA. Hopefully that also
> granted you permission to update that field.

Yes, that works.  I should be able to build up the release notes, now.  I'll start a new thread in the "xerces-devs" list for any conversation specific to the 2.12.0 release, instead of rambling off-topic on this thread.



From: David Costanzo

> > As mentioned previously, the fix that my organization wants > > (XERCESJ-1591, r1396551) was made in the "xml-schema-1.1-dev" 
> > branch, not trunk, so that branch would have to be merged back to 
> > trunk (or the fix duplicated in trunk) in order for a 2.12.0 release
> > to benefit my organization.


From: Michael Glavassevich
> I'll take a look at the original fix. Assuming it applies to XML Schema 
> 1.0, it should have been committed at the same time to the trunk.


That would be appreciated, Michael.  Thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: Interaction between redefine+include breaks augmenting a base schema's element with new attributes

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Hi David,

David Costanzo <da...@yahoo.com> wrote on 06/15/2016 10:11:18 AM:

> From: David Costanzo <da...@yahoo.com>
> To: "j-users@xerces.apache.org" <j-...@xerces.apache.org>, 
> Date: 06/15/2016 10:12 AM
> Subject: Re: Interaction between redefine+include breaks augmenting 
> a base schema's element with new attributes
> 
> From: Michael Glavassevich <mr...@ca.ibm.com>
> > The release notes in JIRA (e.g. 2.11.0 notes [1]) and updates to the 
> > Xerces documentation [2] are something anyone could help us out with. 
We 
> 
> > likely have a bunch of broken links that should be fixed up.
> 
> I started with the JIRA release notes [1] and it doesn't look like I
> have permissions to help with this.  It looks to be generated 
> automatically from the "Fix Version" of tickets, which I don't have 
> permission to change.

I just add you to the list of contributors in JIRA. Hopefully that also 
granted you permission to update that field.

> I think I can grovel through JIRA to identify which fixes will be 
> included in 2.12.0.  From what I can tell, the candidates are 
> everything in JIRA that is "Fixed" with no "Fix Version" set[2] (which 
has 
> 1168 tickets).  Then some manual verification is needed for each 
> ticket to confirm that comment indicates a subversion revision whose
> changes was made in "trunk" and whose revision is after r1039547 
> (when the branch for 2.11.0 was made).  Does this sound correct?

XML Schema 1.1 specific fixes and improvements will only be on the 
"xml-schema-1.1-dev" branch. If we missed something more generic (i.e. 
also applies to XML Schema 1.0) then we should get that merged back on to 
the trunk.

I think in general, any JIRA resolved with a fix after November 30th, 2010 
(release date of Xerces-J 2.11.0) should be marked as being fixed in 
2.12.0.

> As mentioned previously, the fix that my organization wants 
> (XERCESJ-1591, r1396551) was made in the "xml-schema-1.1-dev" 
> branch, not trunk, so that branch would have to be merged back to 
> trunk (or the fix duplicated in trunk) in order for a 2.12.0 release
> to benefit my organization.

I'll take a look at the original fix. Assuming it applies to XML Schema 
1.0, it should have been committed at the same time to the trunk.
 
> [1] https://issues.apache.org/jira/browse/XERCESJ/fixforversion/12336542
> [2] 
> https://issues.apache.org/jira/issues/?jql=project%20%3D%20XERCESJ%
> 20AND%20status%20in%20%28Resolved%2C%20Closed%29%20AND%20fixVersion%
> 20%3D%20EMPTY
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: Interaction between redefine+include breaks augmenting a base schema's element with new attributes

Posted by David Costanzo <da...@yahoo.com.INVALID>.
From: Michael Glavassevich <mr...@ca.ibm.com>
> The release notes in JIRA (e.g. 2.11.0 notes [1]) and updates to the 
> Xerces documentation [2] are something anyone could help us out with. We 

> likely have a bunch of broken links that should be fixed up.

I started with the JIRA release notes [1] and it doesn't look like I have permissions to help with this.  It looks to be generated automatically from the "Fix Version" of tickets, which I don't have permission to change.

I think I can grovel through JIRA to identify which fixes will be included in 2.12.0.  From what I can tell, the candidates are everything in JIRA that is "Fixed" with no "Fix Version" set[2] (which has 
1168 tickets).  Then some manual verification is needed for each ticket to confirm that comment indicates a subversion revision whose changes was made in "trunk" and whose revision is after r1039547 (when the branch for 2.11.0 was made).  Does this sound correct?


As mentioned previously, the fix that my organization wants (XERCESJ-1591, r1396551) was made in the "xml-schema-1.1-dev" branch, not trunk, so that branch would have to be merged back to trunk (or the fix duplicated in trunk) in order for a 2.12.0 release to benefit my organization.


[1] https://issues.apache.org/jira/browse/XERCESJ/fixforversion/12336542
[2] 
https://issues.apache.org/jira/issues/?jql=project%20%3D%20XERCESJ%20AND%20status%20in%20%28Resolved%2C%20Closed%29%20AND%20fixVersion%20%3D%20EMPTY

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: Interaction between redefine+include breaks augmenting a base schema's element with new attributes

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
The release notes in JIRA (e.g. 2.11.0 notes [1]) and updates to the 
Xerces documentation [2] are something anyone could help us out with. We 
likely have a bunch of broken links that should be fixed up.

Would also be awesome to have help with testing.

[1] 
https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=10520&version=12315151
[2] http://xerces.apache.org/xerces2-j/releases.html

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

David Costanzo <da...@yahoo.com> wrote on 06/14/2016 04:13:11 PM:

> From: David Costanzo <da...@yahoo.com>
> To: "j-users@xerces.apache.org" <j-...@xerces.apache.org>, 
> Date: 06/14/2016 04:14 PM
> Subject: Re: Interaction between redefine+include breaks augmenting 
> a base schema's element with new attributes
> 
> From: Michael Glavassevich <mr...@ca.ibm.com>
> 
> > Regarding a new Xerces release, I think we'd certainly like to see one
> > happen, but it needs volunteers to help drive it.
> 
> I don't what skills/permissions a volunteer needs, but please let me
> know if there's a way that someone who unfamiliar with the code base
> can help out.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: Interaction between redefine+include breaks augmenting a base schema's element with new attributes

Posted by David Costanzo <da...@yahoo.com.INVALID>.
From: Michael Glavassevich <mr...@ca.ibm.com>

> Regarding a new Xerces release, I think we'd certainly like to see one
> happen, but it needs volunteers to help drive it.

I don't what skills/permissions a volunteer needs, but please let me know if there's a way that someone who unfamiliar with the code base can help out.

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: Interaction between redefine+include breaks augmenting a base schema's element with new attributes

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Regarding a new Xerces release, I think we'd certainly like to see one 
happen, but it needs volunteers to help drive it.

Thanks.

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

David Costanzo <da...@yahoo.com> wrote on 06/10/2016 04:07:52 PM:

> > Thanks Mukul, I'll open a JIRA ticket as you suggest.
> 
> As I went to open the ticket in JIRA, I found that Mukul Gandhi 
> already fixed it.
> 
> https://issues.apache.org/jira/browse/XERCESJ-1591
> 
> Thank you, Mukul!
> 
> The fix was made in the xml-schema-1.1-dev branch that has not been 
> merged into trunk, which is why I could still reproduce the problem 
> on the latest code and in the latest release.  In looking at the 
> release velocity, I see that the fix was made four years ago, Oct 
> 2012 (just hours after it was reported!), the last Xerces release 
> was made in Nov 2010, and the version which a recent HotSpot JVM (1.
> 8.0_71) uses is Xerces 2.7.1, released in July 2005.
> 
> So if I want the fix for my program, is my best bet to use a private
> build from a development branch?  Are there any plans for another 
> Xerces release?
> 
> By the way, once a minimal repro scenario is constructed, this looks
> like an esoteric problem on the fringes of the XML standards, but 
> this bug does have a practical, real-world impact.  In the world of 
> clinical research which includes testing new medicines, there's a 
> standards body called CDISC.  CDISC defines an XML standard for 
> interchange of clinical data called ODM and states that a computing 
> system that processes ODM can only claim conformance if it obeys 
> several rules, one of which is "ODM files must validate against the 
> ODM schema for the ODM version indicated in the ODM root element". 
> My project manager has interpreted this as a requirement to validate
> all ODM documents.
> 
> The ODM standard allows for "vendor extensions" and requires that 
> they be implemented in a separate namespace.  The extensions are 
> added by redefining special "extension groups" which the ODM base 
> standard defines for exactly this purpose.
> 
> So to qualify as a "conforming system", my code must validate 
> documents according to a schema that a vendor provides me.  The ODM 
> base standard has a top-level .XSD file that uses an xs:include and 
> the vendor extensions are expected to use a xs:redefine of that. 
> Because of this bug, Xerces 2.11.0 cannot validate ODM against a 
> vendor's extension.  I can make some simple changes to the vendor 
> schema so that Xerces can validate with it, but then that casts 
> doubt on whether it's really validating with the vendor extensions.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: Interaction between redefine+include breaks augmenting a base schema's element with new attributes

Posted by David Costanzo <da...@yahoo.com.INVALID>.
From: David Costanzo

> Thanks Mukul, I'll open a JIRA ticket as you suggest.

As I went to open the ticket in JIRA, I found that Mukul Gandhi already fixed it.

https://issues.apache.org/jira/browse/XERCESJ-1591

Thank you, Mukul!

The fix was made in the xml-schema-1.1-dev branch that has not been merged into trunk, which is why I could still reproduce the problem on the latest code and in the latest release.  In looking at the release velocity, I see that the fix was made four years ago, Oct 2012 (just hours after it was reported!), the last Xerces release was made in Nov 2010, and the version which a recent HotSpot JVM (1.8.0_71) uses is Xerces 2.7.1, released in July 2005.

So if I want the fix for my program, is my best bet to use a private build from a development branch?  Are there any plans for another Xerces release?

By the way, once a minimal repro scenario is constructed, this looks like an esoteric problem on the fringes of the XML standards, but this bug does have a practical, real-world impact.  In the world of clinical research which includes testing new medicines, there's a standards body called CDISC.  CDISC defines an XML standard for interchange of clinical data called ODM and states that a computing system that processes ODM can only claim conformance if it obeys several rules, one of which is "ODM files must validate against the ODM schema for the ODM version indicated in the ODM root element".  My project manager has interpreted this as a requirement to validate all ODM documents.

The ODM standard allows for "vendor extensions" and requires that they be implemented in a separate namespace.  The extensions are added by redefining special "extension groups" which the ODM base standard defines for exactly this purpose.

So to qualify as a "conforming system", my code must validate documents according to a schema that a vendor provides me.  The ODM base standard has a top-level .XSD file that uses an xs:include and the vendor extensions are expected to use a xs:redefine of that. Because of this bug, Xerces 2.11.0 cannot validate ODM against a vendor's extension.  I can make some simple changes to the vendor schema so that Xerces can validate with it, but then that casts doubt on whether it's really validating with the vendor extensions.

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: Interaction between redefine+include breaks augmenting a base schema's element with new attributes

Posted by David Costanzo <da...@yahoo.com.INVALID>.

From: Mukul Gandhi> I would suggest, to open a bug report in Xerce's JIRA with following

> qualifications [snip]


Thanks Mukul, I'll open a JIRA ticket as you suggest.  I'll be sure to attach all the files that are needed to reproduce the issue, as I don't think I'd be able to implement a patch.



From: Michael Glavassevich
> Would also need to review what the standard actually says to determine
> whether there's a bug. Xerces generally tries its best to strictly follow
> the rules from the XML Schema specification and sometimes those rules
> (e.g. type restriction) defy what many users would expect.

I agree that the standards sometimes defy my expectations.  I also understand that appealing to behavior of "xmllint" doesn't mean that Xerces wrong.  I'll try to quote the relevant parts of the specs when I open the ticket.

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: Interaction between redefine+include breaks augmenting a base schema's element with new attributes

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Would also need to review what the standard actually says to determine 
whether there's a bug. Xerces generally tries its best to strictly follow 
the rules from the XML Schema specification and sometimes those rules 
(e.g. type restriction) defy what many users would expect.

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

Mukul Gandhi <mu...@apache.org> wrote on 06/09/2016 11:59:31 PM:
 
> Hi David,
>     Thanks for writing about this issue. I am sure, that Xerces 
> developers are always keen to know from users if there is a genuine 
> bug in Xerces's implementation and they would like to fix the bugs.
> 
> Your problem description looks like a fairly advanced use case of 
> XML Schema (XSD), and it seems difficult to know the actual problem 
> in Xerces's implementation that is causing this (likely) bug, 
> without having an easier presentation of the bug report that is 
> usually expected to write fixes.
> 
> I would suggest, to open a bug report in Xerce's JIRA with following
> qualifications
> 
> Issue Type : Bug
> Priority : Minor or Trivial
> 
> Please also attach XML and XSD files that illustrate the bug, and 
> the actual and expected outputs according to you. If you're keen in 
> helping us further, and are able to follow Xerce's source code, you 
> can try fixing the code and also attach a patch.
> 
> But the least I think we would require are all the steps mentioned 
> here, without a patch.
> 
> On 9 June 2016 at 19:04, David Costanzo 
<david_costanzo@yahoo.com.invalid
> > wrote:
> There seems to be an interaction between xs:redefine referring to a 
> schema which then does an xs:include that prevents Xerces from 
> recognizing that an attributeGroup defined in the xs:include'd 
> schema has been extended to include new attributes from a second 
> namespace.  I think this is a bug in xerces2, but I'm not an XML 
> expert, so I have some doubt.  Per the instructions on http://
> xerces.apache.org/xerces2-j/jira.html, I am emailing this list for 
> clarification.
> 
> The basic setup:
> base.xsd          - Defines an element named "element" with an 
attributeGroup
> base-wrapper.xsd  - Merely does an "xs:include" of base.xsd
> second-ns.xsd     - Defines an attribute named "happy" in a distinct
> namespace from one in base.xsd
> 
> augmented.xsd     - Does "xs:redefine" of base-wrapper.xsd to add 
> the attribute from second-ns.xsd to the attributeGroup in 
> base.xsd.document.xml      - Uses an element from base.xsd with the 
> attribute from second-ns.xsd.
> 
> 
> My expectation is that document.xml is valid with respect to 
> augmented.xsd.  However, Xerces2 reports a validation error.
> 
> # java jaxp.SourceValidator -a augmented.xsd -i document.xml
> [Error] document.xml:7:3: cvc-complex-type.3.2.2: Attribute 
> 'second:happy' is not allowed to appear in element 'element'.
> 
> 
> If, instead of redefining base-wrapper.xsd, which does nothing but 
> xs:include base.xsd, augmented.xsd redefine's base.xsd directly, 
> then Xerces reports document.xml as valid.
> 
> I have confirmed that "xmllint" (version 20706) reports document.xml
> as valid.  My JVM uses Xerces-J 2.7.1, but I have also reproduced 
> this on xerces-2.11.0 and on trunk using "java jaxp.SourceValidator".
> 
> Is this a bug that I should open in JIRA?  Or am I misunderstanding 
> something about XML?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org
> 
> -- 
> Regards,
> Mukul Gandhi


---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: Interaction between redefine+include breaks augmenting a base schema's element with new attributes

Posted by Mukul Gandhi <mu...@apache.org>.
Hi David,
    Thanks for writing about this issue. I am sure, that Xerces developers
are always keen to know from users if there is a genuine bug in Xerces's
implementation and they would like to fix the bugs.

Your problem description looks like a fairly advanced use case of XML
Schema (XSD), and it seems difficult to know the actual problem in Xerces's
implementation that is causing this (likely) bug, without having an easier
presentation of the bug report that is usually expected to write fixes.

I would suggest, to open a bug report in Xerce's JIRA with following
qualifications

Issue Type : Bug
Priority : Minor or Trivial

Please also attach XML and XSD files that illustrate the bug, and the
actual and expected outputs according to you. If you're keen in helping us
further, and are able to follow Xerce's source code, you can try fixing the
code and also attach a patch.

But the least I think we would require are all the steps mentioned here,
without a patch.

On 9 June 2016 at 19:04, David Costanzo <da...@yahoo.com.invalid>
wrote:

> There seems to be an interaction between xs:redefine referring to a schema
> which then does an xs:include that prevents Xerces from recognizing that an
> attributeGroup defined in the xs:include'd schema has been extended to
> include new attributes from a second namespace.  I think this is a bug in
> xerces2, but I'm not an XML expert, so I have some doubt.  Per the
> instructions on http://xerces.apache.org/xerces2-j/jira.html, I am
> emailing this list for clarification.
>
> The basic setup:
> base.xsd          - Defines an element named "element" with an
> attributeGroup
> base-wrapper.xsd  - Merely does an "xs:include" of base.xsd
> second-ns.xsd     - Defines an attribute named "happy" in a distinct
> namespace from one in base.xsd
>
> augmented.xsd     - Does "xs:redefine" of base-wrapper.xsd to add the
> attribute from second-ns.xsd to the attributeGroup in
> base.xsd.document.xml      - Uses an element from base.xsd with the
> attribute from second-ns.xsd.
>
>
> My expectation is that document.xml is valid with respect to
> augmented.xsd.  However, Xerces2 reports a validation error.
>
> # java jaxp.SourceValidator -a augmented.xsd -i document.xml
> [Error] document.xml:7:3: cvc-complex-type.3.2.2: Attribute 'second:happy'
> is not allowed to appear in element 'element'.
>
>
> If, instead of redefining base-wrapper.xsd, which does nothing but
> xs:include base.xsd, augmented.xsd redefine's base.xsd directly, then
> Xerces reports document.xml as valid.
>
> I have confirmed that "xmllint" (version 20706) reports document.xml as
> valid.  My JVM uses Xerces-J 2.7.1, but I have also reproduced this on
> xerces-2.11.0 and on trunk using "java jaxp.SourceValidator".
>
> Is this a bug that I should open in JIRA?  Or am I misunderstanding
> something about XML?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org
>
> --
> Regards,
> Mukul Gandhi
> <j-...@xerces.apache.org>

<j-...@xerces.apache.org>