Re: Question on xsd:import

Amelia A. Lewis wrote:
> On Tue, 16 Sep 2003 03:11:09 -0700
> Martin Gudgin <> wrote:
>>This text first appeared in wsdl12.xml CVS revision as part
>>of the types work ( it was subsequently merged into the main branch in
>>version 1.35 ). It was part of the write up that Amy did, I think.
>>Note that this ONLY applies to schemas that DO NOT have a target
>>namespace. It cannot be used to override the namespace of an imported
>>schema document that DOES have a target namespace. The text
>>essentially means that all schemas constructs are qualified. I can't
>>remember the rationale for allowing this, perhaps Amy will have better
>>powers of recall.
> As I recall, this deals with XML Schemas that were originally designed
> for use as "chameleons", and it also provides a pattern for use with
> other schema languages (for instance, the DTD example uses a similar
> technique to place all of the elements imported into a single
> namespace).

Yes, but the dtd:import element is brand new, so we can assign it an
arbitrary semantics. It worries me that we're redefining how the
xsd:import construct works. This new functionality doesn't seem to
be too well defined either.

For instance, wouldn't the clause "as if it contained a corresponding
targetNamespace declaration" be likely to break the references between
components in the imported schema? After all, if I did literally what
the spec says, i.e. read the schema in, ran a transform on it to set
its targetNamespace attribute to the desired value, then processed the
resulting document per the XML Schema spec, I'd most likely run into
some invalid references.

By the way, I'm not sure what you mean by "chameleons". Could you
clarify that?


> As Gudge says, I believe that this is simply intended to force schemas
> lacking namespaces into a namespace.  The principle is simplicity: if
> you're going to refer to components of a schema by namespace, it ought
> to be the same as the namespace that labels the import.  But I believe
> the language was specifically chosen to avoid allowing chameleons.
> Amy!
>>I would note that this text was reviewed as part of the types work in
>>January 2003 and was agreed by the WG. That said, I don't feel
>>strongly about it and would be happy for us to open an issue to
>>claridy this point.
>>>-----Original Message-----
>>>[] On Behalf Of Roberto Chinnici
>>>Sent: 16 September 2003 01:06
>>>Subject: Question on xsd:import
>>>It's been about a year since we last talked about imports. In
>>>section of part 1 of the spec I found this sentence 
>>>describing how xsd:import works (the text in square brackets is
>>>"If the [imported] schema does not have a targetNamespace 
>>>AII, then the namespace specified by the namespace AII [of 
>>>the xsd:import EII inside the wsdl:type EII] is applied to 
>>>all components of the schema as if it contained a 
>>>corresponding targetNamespace declaration."
>>>This looks very different from what XML Schema does. It seems 
>>>that to honor this clause a WSDL processor would need to use 
>>>a specially rigged XML Schema processor that allows for this 
>>>namespace overriding to happen.
>>>Can someone refresh my memory as to when we approved the text 
>>>above and what its rationale was?
>>>Roberto Chinnici
>>>Java Web Services
>>>Sun Microsystems, Inc.

Received on Tuesday, 16 September 2003 12:57:55 UTC