W3C home > Mailing lists > Public > xmlschema-dev@w3.org > September 2002

RE: Question about xs:import

From: Mark Feblowitz <mfeblowitz@frictionless.com>
Date: Tue, 24 Sep 2002 16:54:32 -0400
Message-ID: <4DBDB4044ABED31183C000508BA0E97F040AC00B@fcpostal.frictionless.com>
To: "'noah_mendelsohn@us.ibm.com'" <noah_mendelsohn@us.ibm.com>
Cc: jeni@jenitennison.com, mrowell@openapplications.org, Ryan.Barr@ejgallo.com, xmlschema-dev@w3.org

I assume that there's a reason (rooted in theory) for import not to be
treated as an include from another namespace. If so, I'd like to understand
it. If not, I'd like to recommend that future XML Schema recommendations
move in that direction.

BTW - I've looked around at OAGIS' overlay examples and so far have found
none that contain more than one import from a given namespace. The way the
OAGIS files are structured tends to mimic the adaptor approach, at least for
most cases. 

I did find situations where there is an import from a particular namespace
(e.g., NS1) and an include of a file that imports *different definitions*
from NS1. These seem to fuction properly using MSXML, Xerces-J, and XSV.
Question is, can we rely on this functionality, or must we build adaptors to
reliably handle these cases?

Mark


-----Original Message-----
From: noah_mendelsohn@us.ibm.com [mailto:noah_mendelsohn@us.ibm.com]
Sent: Tuesday, September 24, 2002 3:57 PM
To: Mark Feblowitz
Cc: jeni@jenitennison.com; mrowell@openapplications.org;
Ryan.Barr@ejgallo.com; xmlschema-dev@w3.org
Subject: 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:55:03 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:34 GMT