Re: Question on xsd:import

On Tue, 16 Sep 2003 09:59:11 -0700
Roberto Chinnici <Roberto.Chinnici@Sun.COM> wrote:
> Amelia A. Lewis wrote:
> > On Tue, 16 Sep 2003 03:11:09 -0700
> > Martin Gudgin <mgudgin@microsoft.com> wrote:
> > 
> >>This text first appeared in wsdl12.xml CVS revision 1.34.2.2 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.

Entirely possible, with a complex schema.  Solution is to namespace the
schema internally.  If it isn't editable, and doesn't have a namespace,
and breaks when a namespace is imposed, it's not usable.

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

No.  Google for it; it's a sufficiently complex topic that we don't need
to go into it here.

Amy!
> 
> Thanks,
> Roberto
> 
> > 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.
> >>
> >>Gudge
> >>
> >>
> >>>-----Original Message-----
> >>>From: www-ws-desc-request@w3.org 
> >>>[mailto:www-ws-desc-request@w3.org] On Behalf Of Roberto Chinnici
> >>>Sent: 16 September 2003 01:06
> >>>To: www-ws-desc@w3.org
> >>>Subject: Question on xsd:import
> >>>
> >>>
> >>>It's been about a year since we last talked about imports. In
> >>>section 3.1.1.1 of part 1 of the spec I found this sentence 
> >>>describing how xsd:import works (the text in square brackets is
> >>>mine):
> >>>
> >>>"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?
> >>>
> >>>Thanks,
> >>>Roberto
> >>>
> >>>--
> >>>Roberto Chinnici
> >>>Java Web Services
> >>>Sun Microsystems, Inc.
> >>>roberto.chinnici@sun.com
> >>>
> >>>
> >>>
> >>
> > 
> > 
> 
> 


-- 
Amelia A. Lewis
Architect, TIBCO/Extensibility, Inc.
alewis@tibco.com

Received on Tuesday, 16 September 2003 15:25:21 UTC