| Summary: | XSD Validator does not validate correct the xsd files | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Source Editing | Reporter: | Iliyan Dimov <iliyan.dimov> | ||||||
| Component: | wst.xsd | Assignee: | Keith Chong <keith.chong.ca> | ||||||
| Status: | CLOSED WORKSFORME | QA Contact: | Keith Chong <keith.chong.ca> | ||||||
| Severity: | normal | ||||||||
| Priority: | P2 | CC: | valentinbaciu | ||||||
| Version: | unspecified | Keywords: | helpwanted | ||||||
| Target Milestone: | 3.1 M5 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Iliyan Dimov
Created attachment 107900 [details]
wsdl file that imports xsd file
The soap encoding import appears to be unused; that is no component refers to components from the soap encoding namespace. We may have to look into the feasibility of providing better user feedback when either the import is unused or the actual schema it points to cannot be resolved. It seems to me this would be best addressed in WTP 3.1. Iliyan, do you require a fix for this for WTP 3.0.*? I have marked as helpwanted. I require a fix for both WTP 3.0.* and WTP 3.1. Its because SAP adopts every version of the Eclipse. It it important for us the bug to be fixed in all versions. OK Iliyan, we will consider it for both 3.1 and 3.0.*. As always, patches are welcome and appreciated. Iliyan, I think the XML Schema validator works as designed. The way I understand it. the schemaLocation is just a hint and an XSD processor can choose to ignore it. The attribute itself is not required. The behaviour of not putting out any warning when there is no schema location or when the referenced schema cannot be loaded should be fine in principle. Failure to resolve the imported schema is not an error in itself, but of course it can cause downstream errors. In this case that import is not really used. The XSD validator will always honour a schema location attribute if present. Using the XML catalog to map a namespace URI to a location is similar to specifying a schemaLocation attribute in the file. When the catalog points to an existent location all is good. When the catalog points to an bad location, then the validator will report a warning, because the validator will attempt to de-reference the location. I would argue that it is the WSDL validator that behaves differently and not necessarily for the better. In bug 179072 I have found that the WSDL validator will always report errors for any inline schema problems, even when those are really warnings. In this case, the WSDL validator reports an error when a warning should be sufficient. I would argue that really nothing should be reported in this case by the WSDL validator. The difference in behaviour is likely due to the fact that the WSDL validator does not really reuse the XSD validator, but instead has a separate logic for inline schema validation; see bug 204488. I am going to mark this as working as designed and hopefully we'll fix the WSDL validator sometime in the near future. Please add yourself as cc to those other bugs. Closing. |