W3C home > Mailing lists > Public > xmlschema-dev@w3.org > June 2004

RE: Chaining <xs:import> statements

From: Delmerico, James <James.Delmerico@ips-sendero.com>
Date: Wed, 23 Jun 2004 08:37:20 -0700
Message-ID: <4F043329520A7A4D997C792418D9E552025E8E03@osgood.ips-sendero.com>
To: ht@inf.ed.ac.uk
Cc: xmlschema-dev@w3.org

Thanks for the feedback - the MS people also pointed me to the following
snippet from the XML Schema Part 1: Structures -

"Schema Representation Constraint: QName resolution (Schema Document) 


4 its *namespace name* is either the target namespace of the schema document
containing the *QName* or that schema document contains an <import> element
information item the *actual value* of whose namespace [attribute] is
identical to that *namespace name*. "

According case 4, the referenced component should have an import for the
namespace if its namespace is not the targetNamespace of the schema.

I am curious why the specification defines that this information must be
declared again locally when in my case it is being declared by the imported
schema?  Should the lack of the <import> be considered a schema validation
error if the implementation can infer this from a child schema?


-----Original Message-----
From: ht@inf.ed.ac.uk [mailto:ht@inf.ed.ac.uk] 
Sent: Wednesday, June 23, 2004 10:47 AM
To: Delmerico, James
Cc: xmlschema-dev@w3.org
Subject: Re: Chaining <xs:import> statements

Just to explain _why_ the previous answer (import both) is correct,
note that <xs:import> achieves _two_ things:

 1) It provides a place for a hint to processors where they can
    find schema documents likely to be of use ('schemaLocation'

 2) It signals to processors that references to components in
    particular namespace _from this schema document_ are allowed
    ('namespace' attribute).

Since the second use is _local_ to the schema document in which it
occurs, it's the one  which is at issue in your situation.

 Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                     Half-time member of W3C Team
    2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
            Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
                   URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged
Received on Wednesday, 23 June 2004 11:37:50 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:22 UTC