Further info on validation issue

Alex Brown alexb at griffinbrown.co.uk
Tue Aug 4 12:28:24 CEST 2009


Rick,

As an aside, the schemas have to manually edited before they will work
with Xerces also (this is related to the declaration of the 'xml'
Namespace IIRC). I have a defect report brewing to this effect ...

- Alex. 

> -----Original Message-----
> From: rjelliffe at allette.com.au [mailto:rjelliffe at allette.com.au] 
> Sent: 30 July 2009 17:13
> To: MURATA Makoto
> Cc: e-sc34-wg4 at ecma-international.org
> Subject: Further info on validation issue
> 
> 
> 1) The validator I was using is the MSXML validator (I think 
> the 2009 version of MSXML 4) *not* Xerces, apologies.
> 
> 
> 2) The problem is one of circular imports.
> 
> For example, when I try to validate dml-lockedCanvas.xsd I 
> get the error  "Duplicate element declaration with the name 
> "{http://purl.oclc.org/ooxml/drawingml/lockedCanvas}lockedCanvas"
> 
> dml-lockedCanvas.xsd has
>  	<xsd:import 
> namespace="http://purl.oclc.org/ooxml/drawingml/main"
> schemaLocation="dml-main.xsd"/>
> 
> dml-main.xsd has
> 	<xsd:import 
> namespace="http://purl.oclc.org/ooxml/drawingml/lockedCanvas"
> schemaLocation="dml-lockedCanvas.xsd"/>
> 
> 
> 3) XSD allows circular imports. XSD has the strange note on 
> this at s4.2.3
> "Note: The above is carefully worded so that multiple 
> <import>ing of the same schema document will not constitute a 
> violation of clause 2 of [], but applications are allowed, 
> indeed encouraged, to avoid <import>ing the same schema 
> document more than once to forestall the necessity of 
> establishing identity component by component. Given that the 
> schemaLocation [attribute] is only a hint, it is open to 
> applications to ignore all but the first <import> for a given 
> namespace, regardless of the *actual value* of 
> schemaLocation, but such a strategy risks missing useful 
> information when new schemaLocations are offered."
> 
> 
> 4) However XSD tools are notoriously buggy in this regard. I 
> had thought that removing circular imports was one of the 
> goals for the revised schemas.
> 
> 
> 5) The BRM adopted JP-02 as resolution 39:
> 
> 39.    Multiple schema processors        [Japan] JP-02(R-344)
> XML schemas are used by XML parsers for validating the 
> structure and content of XML files using the matching data 
> model.  The Open XML reference schemas were fully compatible 
> with the W3C XSD schema standard; however, the 
> implementations of XML parsers have varying levels of XSD 
> standard conformance.  Japan discovered during testing that 
> these schemas were not processible by the Apache Xerces-J and 
> Sun's MSV validators because of a module importation problem. 
>  Ecma agreed that supporting the broadest range of 
> development and testing tools is an important priority and 
> therefore modified the Office XML schemas to be compatible 
> with many validators including the 2 previously cited by 
> Japan. The updated Ecma schemas were adopted. Approved.
> http://blogs.msdn.com/brian_jones/archive/2008/03/15/narrative
> -of-the-iso-iec-dis-29500-brm-meeting.aspx
> 
> Since this relates to a Japanese BRM issue, I am happy to 
> defer to Murata-san's judgement on all aspects.
> 
> Cheers
> Rick Jelliffe
> 
> 



More information about the sc34wg4 mailing list