W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > October to December 2004

[Fwd: RE: Can multiple inline schemas have same targetNamespace?]

From: David Booth <dbooth@w3.org>
Date: Tue, 05 Oct 2004 10:10:38 -0400
To: www-xml-schema-comments@w3.org
Cc: cmsmcq@w3.org
Message-Id: <1096985438.3417.237.camel@nc6000.w3.org>
Can the XML Schema WG shed some light on this?   It seems clear that if
both inline schema declarations for targetnamespace "a" below were to
define the same type X differently then it would be an error.   But what
if they both defined the same type X exactly the same?  Would the XML
Schema spec consider this to be an error or not?  Or is it
implementation dependent?  

I can envision two viewpoints, and I don't know which of these is

View 1: It's an error, because you've declared two different components
with the same name (even though the definitions happen to be the same).

View 2: It's not an error, because both declarations are declaring the
exact same component.  XML Schema deals with a *set* of components --
not a bag.  Declaring once that a component is in the set is
mathematically the same as declaring it twice or more.

Can the XML Schema WG provide some guidance or advice on this?


David Booth
W3C Fellow / Hewlett-Packard

attached mail follows:


As long as there is no overlap between the component definitions in
multiple schema containers for the same namespace, I think this should
work just fine.  If there is overlap, we simply need to follow what the
schema spec says about how to resolve repeated components in a schema
(I'm not sure, though, if that's fault, first-one-wins, or


> -----Original Message-----
> From: www-ws-desc-request@w3.org 
> [mailto:www-ws-desc-request@w3.org] On Behalf Of Jeehong Min
> Sent: Monday, September 27, 2004 12:48 PM
> To: www-ws-desc@w3.org
> Subject: Can multiple inline schemas have same targetNamespace?
> I would appreciate it if you could address the following 
> issue that I have seen in WSDLs of 2 customers in the past month.
> One vendor's SOAP stack is creating WSDLs with multiple 
> inline schemas that have the same namespace.
> Here's an example:
> <wsdl:definition>
> <wsdl:types>
> <xs:schema targetNamespace="a">
> types and elements
> </xs:schema>
> <xs:schema targetNamespace="a">
> different types and elements
> </xs:schema>
> <xs:schema targetNamespace="b">
> whatever
> </xs:schema>
> </wsdl:types>
> ...
> <wsdl:definition> 
> It's not clear to me whether the above is legal or not (two 
> schemas with the same targetNamespace="a").  Should XML 
> parsers for WSDL be smart enough to handle the above?  Or 
> should parsers report errors?  
> --
> Jeehong Min
> Software Engineer
> SOAPtest Development
> Parasoft Corporation
> "We Make Software Work"
Received on Tuesday, 5 October 2004 14:10:49 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:50:02 UTC