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 15:17:59 -0400
Message-ID: <4DBDB4044ABED31183C000508BA0E97F040AC004@fcpostal.frictionless.com>
To: "'noah_mendelsohn@us.ibm.com'" <noah_mendelsohn@us.ibm.com>, Jeni Tennison <jeni@jenitennison.com>
Cc: Ryan.Barr@ejgallo.com, xmlschema-dev@w3.org, "Michael Rowell (E-mail)" <mrowell@openapplications.org>

Hmmm. Multiple schemaLocations for a given import are treated as hints. But
are separate schemaLocations in separate imports for the same namespace also
intended to be treated as hints?

As a practical matter, large namespaces are much more managable when defined
across several, separate files, especially when users of the definitions
from the namespace need only subsets of the definitions. 

OAGIS 8 has followed this model in implementing its approach to constructing
overlays, building overlyay BODs (business object documents) by importing
only the sets of definitions that are needed, using separate import
statements for each needed set of definitions. This works fine using all
available parsers. 

I certainly hope that developers of these parsers do not decide to start
treating subsequent import statements as merely being hints. Then we'd have
to build a whole bunch of adaptors in a big hurry!


-----Original Message-----
From: noah_mendelsohn@us.ibm.com [mailto:noah_mendelsohn@us.ibm.com]
Sent: Tuesday, September 24, 2002 9:41 AM
To: Jeni Tennison
Cc: Ryan.Barr@ejgallo.com; xmlschema-dev@w3.org
Subject: Re: Question about xs:import

Actually, I think Jeni's answer is right in practice, but not in theory 
(and that's rare, she's usually right all around.)  schemaLocations are 
hints.  So if you have two for a given namespace in the instance, your 
schema processor is free to follow one, the other, both, or neither.  In 
practice, most processors would follow at most the first.   Furthermore, 
it would be illegal to have conflicting definitions or declarations, so 
unless you'd carefully written the two documents to be imported together, 
it's unlikely that processing would proceed without error as the second 
one was brought in.  I don't believe it's strictly an error to put 
together schemas for the same namespace from multiple documents, but any 
uses I can imagine would be highly specialized and would be unlikely to be 
implemented in the sort of "off the shelf" validators that most of us are 
using.  Thanks very much.

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 15:18:34 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:58 UTC