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

RE: xs:include changing targetNamespace

From: Michael Kay <mhk@mhk.me.uk>
Date: Tue, 5 Oct 2004 11:32:32 +0100
To: "'Henry S. Thompson'" <ht@inf.ed.ac.uk>
Cc: <xmlschema-dev@w3.org>
Message-ID: <E1CEmcz-0007Hk-QL@frink.w3.org>

>  1) The <xs:element ref="A"/> and the declaration of A are in the
>     <include>d schema document.  In that case, the reference has been
>     resolved during the construction of "the .schema components. of
>     I", and clause 3.2.1 will change the TNS of A, a top-level
>     component, to the <includ>ing TNS.

OK, that seems consistent with the spec: though it seems to rely on a model
of the sequence of events by which names are resolved "as early as possible"
which isn't explicit in the spec.

This approach of creating components and then modifying the components
appears to have some problems implicit in phrases such as "where the absent
target namespace name would have appeared", and "whose [form] was
qualified": it seems to require that information is retained in the schema
component about its history, beyond the information that's explicitly part
of the component.

In a schema with no target namespace and no default namespace, the schema
component created by a local element declaration <xs:element name="A"/> is
identical whether form is qualified or unqualified. The rules suggest that I
need to distinguish the two cases, yet the schema components are
indistinguishable.

Similarly the phrase "Where the absent target namespace name would have
appeared" seems to suggest that I should distinguish ##targetNamespace and
##local in a wildcard: in the case of ##targetNamespace, the target
namespace "would have appeared" if there had been one, in the case of
##local, it would not. But again, the schema components don't retain this
history.

Presumably though, the absent namespace is not replaced by the new target
namespace in places where the target namespace would never have appeared,
for example in QName-valued enumeration facets and fixed/default values. But
what about Notation-valued enumeration facets? These can be regarded as
references to schema components, so presumably they are renamed.

I seem to be inventing the rules as I go along... Help!

Michael Kay
http://www.saxonica.com/
Received on Tuesday, 5 October 2004 10:33:05 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:15:11 UTC