RE: Multiple include problem in XML-Schema (XSD).

Thanks Noah, I overlooked this piece of information in the XMLSchema
specification. Unfortunately, MSXML 4.0 parser (preview) deems it as error
to multiply include a Schema in a <include> hierarchy. So per XMLSchema
specification this is a bug in their parser.

Best Regards,

Venkateswar.

-----Original Message-----
From: Noah_Mendelsohn@lotus.com [mailto:Noah_Mendelsohn@lotus.com] 
Sent: Thursday, June 21, 2001 11:55 AM
To: Wunnava.Venkateswar@kla-tencor.com
Cc: Eddie Robertsson; xmlschema-dev@w3.org
Subject: Re: Multiple include problem in XML-Schema (XSD).


WunnavaVenkateswar wrote (sorry, I'm not sure of the correct order of your 
names): 
 
"Is there a mechanism in XML-Schema specification by which I can stop 
multiple includes of a Schema (XSD)?"

If you read the schema recommendation at [1] you will find the following 
very explicit statement:

"NOTE: The above is carefully worded so that multiple <include>ing of the 
same schema document will not constitute a violation of clause 2 of Schema 
Properties Correct (§3.15.6), but applications are allowed, indeed 
encouraged, to avoid <include>ing the same schema document more than once 
to forestall the necessity of establishing identity component by 
component."

In simple if less precise English: reinclusion of the same schema is not 
an error.  If your processor blows up when you do such multiple 
inclusions, then your processor has bugs.

Processors are required to recognize that the components created from 
subsequent inclusions are indeed identical to the originals, and therefore 
not an error.  It is an error to include conflicting definitions for 
declarations for any particular name.  Reinclusion is discouraged only 
insofar as it may cost the processor a bit of time to detect that the 
reinclusion is in fact legal.  Note also that legal and illegal inclusions 
are distinguished not by the filename or URL, but by whether the 
definitions included are in fact identical.  It is not an error (though 
not necessarily useful or desirable) to include two or more completely 
different schema documents that happen to produce identical definitions 
for some set of components.

Hope this helps.

[1] http://www.w3.org/TR/xmlschema-1/#compound-schema

------------------------------------------------------------------------
Noah Mendelsohn                                    Voice: 1-617-693-4036
Lotus Development Corp.                            Fax: 1-617-693-8676
One Rogers Street
Cambridge, MA 02142
------------------------------------------------------------------------

Received on Friday, 22 June 2001 04:58:11 UTC