Alain Pierrot wrote:
> There seems to be an incompatibility between xsdvalid and mathml2.xsd:
> 
> When trying to load a schema controlled example of mathML, I get the  
> following error message:
> 
>> http://www.w3.org/Math/XMLSchema/mathml2/common/common-attribs.xsd:E: 
>> 20:0: ne sait pas comment importer un sch?ma quand "schemaLocation"  
>> n'est pas sp?cifi? [x-src-import]
> 
> 
> The error is linked with mathml2 common-attribs.xsd line:
> 
>> <xs:import/> <!-- import any foreign namespace -->
> 
> 
> The file parses and opens correctly if I delete the line on my local  
> instance of common-attribs.xsd, but I feel unsafe 'customizing' the  
> reference schema...
> 
> Is it a restriction of xsdvalid ?

Yes, this is a documented ``specificity'' of xsdvalid. See 
http://www.xmlmind.com/xmleditor/_distrib/docs/xsdvalid/xsdvalid.html#id.s6.2:

-------------------------------------------------------------------------------
* A import construct must almost always specify a schemaLocation 
[x-src-import].

However, the validation engine supports xs:import elements without a 
schemaLocation attribute, if an xs:import element for the same namespace 
but this time having a schemaLocation attribute has previously been 
processed.

Example:

+----+
   <xs:import namespace="foo"
              schemaLocation="http://foo.com/schema1.xsd"; />

   <!-- Later, typically inside an included module. -->
   <xs:import namespace="foo" />
+----+
--------------------------------------------------------------------------------

What follows is legal W3C XML Schema; useless for xsdvalid but legal:
+----+
<xs:import/>
+----+

Therefore, we need to turn "x-src-import" errors into *warnings*. This 
will be done in next release.





Reply via email to