RE: Question about xs:import

Mark Feblowitz writes:

>> As a practical matter, large namespaces are 
>> much more managable when defined across several, 
>> separate files

Yes, which is why we provide a separate <include> mechanism that is 
intended to be used when putting together the several schema documents 
comprising the declarations of a single namespace.  Significantly, you 
will note that schemaLocation on <include> is NOT a hint...it is 
mandatory.  Multiple includes do what you want.

The (often misunderstood) purpose of <import namespace="a"> is to make 
clear to the processor that namespace a is part of the vocabulary being 
defined, as opposed to the vocabularies used in the schema document itself 
(typically xsd:, but also potentially including namespaces used to extend 
xsd:, namespaces used within annotations, etc.)  The schemaLocation on 
<import> is optional, and as you observe is a hint.  It is NOT intended as 
a composition mechanism for multiple schema documents defining a single 
namespace.  <include> and <redefine> are provided for that purpose.

I hope this helps.

------------------------------------------------------------------
Noah Mendelsohn                              Voice: 1-617-693-4036
IBM Corporation                                Fax: 1-617-693-8676
One Rogers Street
Cambridge, MA 02142
------------------------------------------------------------------

Received on Tuesday, 24 September 2002 16:06:09 UTC