Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 247449

Summary: XSD Validator does not validate correct the xsd files
Product: [WebTools] WTP Source Editing Reporter: Iliyan Dimov <iliyan.dimov>
Component: wst.xsdAssignee: Keith Chong <keith.chong.ca>
Status: CLOSED WORKSFORME QA Contact: Keith Chong <keith.chong.ca>
Severity: normal    
Priority: P3 CC: valentinbaciu
Version: unspecifiedKeywords: helpwanted
Target Milestone: 3.0.4   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Iliyan Dimov CLA 2008-09-16 09:44:57 EDT
+++ This bug was initially created as a clone of Bug #241504 +++

Created an attachment (id=107899)
Xsd file

Build ID: M20080221-1800

Steps To Reproduce:
1. Import or create an XSD (See attachments).
2. Include inside the XSD file the import clause(s) :

<schema>
<import namespace="http://www.w3.org/2002/06/soap-encoding"/>
<complexType> ...
</complexType>
...

</schema>
 
3. Right Click on XSD file > Validate.
   The Validation goes successfully and there are any warning markers (!) in XSD Editor. 
   This is not the expected behaviour, because the XML Catalog page does not contains 
   path to the XSD file for the given namespace : "http://www.w3.org/2002/06/soap-encoding".

Optional Steps:  

4. Open preference page from Web and XML > XML Catalog and add the xsd file  
   for the "http://www.w3.org/2002/06/soap-encoding" namespace (take it from the URL : 
   http://www.w3.org/2002/06/soap-encoding, save it inside workspace as soap_encoding.xsd).
 
5. Right Click on XSD file > Validate 
   The validation says no problem.

6. Rename the soap_encoding.xsd file to soap_encoding_.xsd file. 
   By doing this, the XML catalog will not be able to find the xsd file during the validation. 
   Now when you (Right Click on XSD file > Validate) there will be a warning marker 
   on the open xsd file, close to the place where the file is imported.

7. The problems is that XSD Validator shows warnings only for the xsd namespaces that are inside 
   XML Catalog. For all other it silently ignores thems (instead of showing warningn marker). The XSD editor works just fine for 
   "import" elements that contains @schemaLocation attribute. 


More information:
If you open the wsdl file (see attachments) you will see that it refers to the xsd file (see attachment). 
When you Right Click on wsdl file > Validate you will see that it shows an error saying that XSD is not valid. 
It turns out that wsdl validator validates xsd inside the wsdl better that the xsd validator.
Comment 1 Iliyan Dimov CLA 2008-09-16 09:50:06 EDT
Is it possible this bug to be fixed for Ganymede ?
It is important for the adoption of the product when it is given to the customer all known issues/bugs to be removed in order to guarantee high quality. 
Comment 2 Valentin Baciu CLA 2008-12-17 14:35:13 EST
Tentatively marking for 3.0.4
Comment 3 Valentin Baciu CLA 2009-01-26 15:37:51 EST
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=241504#c5 for the explanation.
Comment 4 Valentin Baciu CLA 2009-02-18 12:08:11 EST
Closing. Please re-open if you disagree.