| Summary: | [validation] Investigate XML Schema 1.1 support | ||
|---|---|---|---|
| Product: | [WebTools] WTP Source Editing | Reporter: | Jesper Moller <jesper> |
| Component: | wst.xsd | Assignee: | wst.xsd-triaged <wst.xsd-triaged> |
| Status: | NEW --- | QA Contact: | Keith Chong <keith.chong.ca> |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | adrian.aichner, bugs.eclipse.org, Charlin.joe, david_williams, ivost, john.ruud, keritaf, kingoleg, kurellajunior, mukul.gandhi, rsc, thatnitind, tonny.madsen, tristan.tarrant, victor.noel |
| Version: | unspecified | Flags: | thatnitind:
review?
(keith.chong.ca) |
| Target Milestone: | Future | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: |
https://bugs.eclipse.org/bugs/show_bug.cgi?id=204125 https://bugs.eclipse.org/bugs/show_bug.cgi?id=288527 |
||
| Whiteboard: | |||
| Attachments: | |||
|
Description
Jesper Moller
Thanks Jesper, could you please add a link to the Xerces-J 2.10 page? We should discuss this enhancement while we plan for the next WTP version. At that point, we'll probably need a bugzilla against Orbit to pull in this new Xerces-J version. I would like to see how I can help here. How much of the CVS repository do I need to get? Should I check out HEAD? I would start contributing patches for review when I get anywhere. Adrian Hi Adrian, thank you for offering to help. The XML schema validator code is in this plug-in org.eclipse.wst.xsd.core. One of the first things to do is to figure out the impact of this new Xerces version on the WTP XML tools, beyond just the XML schema validator. The WTP XML tools depend quite heavily on Xerces; for example org.eclipse.wst.xml.core re-exports the org.apache.xerces bundle. From what I know, the XML validator (part of org.eclipse.wst.xml.core) and likely the WSDL validator (hosted in org.eclipse.wst.wsdl.validation) also depend on Xerces and will need to be assessed. There may be more affected bundles, so we'll need to compute a list with all bundles that depend on org.apache.xerces, directly or indirectly by depending on org.eclipse.xml.core. We'll need to better understand the dependency between Xerces 2.10 and PsychoPath. Adopter products may also be impacted so we'll need to thread lightly and communicate well. If all tests look good, as Jesper said, Xerces 2.10 will have to be adopted by Orbit http://www.eclipse.org/orbit/ to allow WTP and other interested Eclipse projects to consume it. Jesper, Nitin, I wonder if this enhancement is not better tracked in wst.xml instead of wst.xsd given the tight coupling between org.eclipse.wst.xml.core and org.apache.xerces. Alternatively, perhaps we need a to change this bugzilla's goal to be "adopt Xerces 2.10". (In reply to comment #3) > Hi Adrian, thank you for offering to help. The XML schema validator code is in > this plug-in org.eclipse.wst.xsd.core. > > One of the first things to do is to figure out the impact of this new Xerces > version on the WTP XML tools, beyond just the XML schema validator. The WTP XML > tools depend quite heavily on Xerces; for example org.eclipse.wst.xml.core > re-exports the org.apache.xerces bundle. Hello Jesper, I have been able to make some good progress with some bootstrapping from Dave. I have build https://svn.apache.org/repos/asf/xerces/java/branches/xml-schema-1.1-dev inside eclipse and created a org.apache.xerces plugin 2.10.0 from all its jars. I had to add Require-Bundle: org.eclipse.osgi;bundle-version="3.6.0" to my newly created: Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Xerces Bundle-SymbolicName: org.apache.xerces Bundle-Version: 2.10.0 but then I was able to launch a new eclipse configuration with changes to other plugins I had to modify. I'm a bit stuck now how to wire up /org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidator.java and /org.eclipse.wst.xsd.core/src-validation/org/eclipse/wst/xsd/core/internal/validation/XSDValidator.java to public static final String W3C_XML_SCHEMA11_NS_URI = "http://www.w3.org/XML/XMLSchema/v1.1".intern(); in what corresponds to /xerces-java-xml-schema-1.1-dev/src/org/apache/xerces/impl/Constants.java in the org.apache.xerces plugin. Currently I can switch between 1.0 validation which finds validation failures as before and 1.1 validation which always passes (even on trivial errors) on XSD files. I will attach patches as a basis for discussion in the cominig few minutes. Thanks for any help! Adrian > > From what I know, the XML validator (part of org.eclipse.wst.xml.core) and > likely the WSDL validator (hosted in org.eclipse.wst.wsdl.validation) also > depend on Xerces and will need to be assessed. > > There may be more affected bundles, so we'll need to compute a list with all > bundles that depend on org.apache.xerces, directly or indirectly by depending > on org.eclipse.xml.core. > > We'll need to better understand the dependency between Xerces 2.10 and > PsychoPath. > > Adopter products may also be impacted so we'll need to thread lightly and > communicate well. > > If all tests look good, as Jesper said, Xerces 2.10 will have to be adopted by > Orbit http://www.eclipse.org/orbit/ to allow WTP and other interested Eclipse > projects to consume it. > > Jesper, Nitin, I wonder if this enhancement is not better tracked in wst.xml > instead of wst.xsd given the tight coupling between org.eclipse.wst.xml.core > and org.apache.xerces. Created attachment 168635 [details] org-eclipse-wst-validation-xsd11 Here come the patches: 900 May 15 20:34 org-eclipse-wst-validation-xsd11-2010-05-15T203240+0200.txt 7074 May 15 20:35 org-eclipse-wst-xml-core-xsd11-2010-05-15T203240+0200.txt 895 May 15 20:36 org-eclipse-wst-xml-xpath2-processor-xsd11-2010-05-15T203240+0200.txt 9267 May 15 20:37 org-eclipse-wst-xsd-core-xsd11-2010-05-15T203240+0200.txt 5835 May 15 20:38 org-eclipse-wst-xsd-ui-xsd11-2010-05-15T203240+0200.txt 1485 May 15 20:39 org-eclipse-wst-xsl-core-xsd11-2010-05-15T203240+0200.txt > I will attach patches as a basis for discussion in the cominig few minutes. > > Thanks for any help! > > Adrian Created attachment 168636 [details]
org-eclipse-wst-xml-core-xsd11-2010-05-15T203240+0200.txt
Created attachment 168637 [details]
org-eclipse-wst-xml-xpath2-processor-xsd11-2010-05-15T203240+0200.txt
Created attachment 168638 [details]
org-eclipse-wst-xsd-core-xsd11-2010-05-15T203240+0200.txt
Created attachment 168639 [details]
org-eclipse-wst-xsd-ui-xsd11-2010-05-15T203240+0200.txt
Created attachment 168640 [details]
org-eclipse-wst-xsl-core-xsd11-2010-05-15T203240+0200.txt
This is patch 6 of 6.
Tentatively marking as a possible WTP 3.3 plan item. Moving out of plan. Now that XMLSchema 1.1 has been ratified as a standard by the W3C, can we expect this issue to be revived ? As 1.0 validation cannot cope with
<xsd:any> we are forced to disable xsd validation at all.
So we need option to switch to XMLSchema 1.1 support for eclipse.
"Description Resource Path Location Type
cos-nonambig: ".../oms/businessevents/imm":ArticleMaterial and WC[##any] (or elements from their substitution group) violate "Unique Particle Attribution". During validation against this schema, ambiguity would be created for those two particles. product-detail.xsd /oms-imm-xml-bind/resources/xsd line 254 XML Schema Problem
"
<xsd:complexType name="ArticleType">
....
<xsd:element maxOccurs="unbounded" minOccurs="0" name="ArticleMaterial" type="ArticleMaterialType" />
<!-- new attributes here -->
<xsd:any minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
See https://blogs.oracle.com/rammenon/entry/xml_schema_11_what_you_need_to
Hi, What is the status of this issue? I'm waiting also for a solution :-) Why is validator version not selected over? <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" vc:minVersion="1.1" ...> |