W3C home > Mailing lists > Public > www-ws-desc@w3.org > November 2004

inline schema import usage

From: Jeehong Min <jeehongm@parasoft.com>
Date: Tue, 2 Nov 2004 16:00:10 -0800
Message-ID: <00f801c4c138$169a8050$2e200a0a@trout>
To: <www-ws-desc@w3.org>

I have a "yes" or "no" clarification question about the usage of import in 
an inline schema.

Consider the legal WSDL fragment below.  My question is:
1. Would the inline schemas be fine without the import statements?  Or do 
they need the import statements since each schema references a type defined 
in the other schema?

I was leaning toward concluding that the import statements are needed, but I 
found the following comment by Jonathan Marsh which made me unsure: "In 
WSDL, we say that QName references to schema-defined QNames must come from 
either the targetNamespace of an inlined schema, or a namespace indicated by 
an import." 
(http://lists.w3.org/Archives/Public/www-ws-desc/2003Oct/0174.html)

Does the phrase "... must come from either the targetNamespace of an inlined 
schema" mean that import statements are not needed for namespaces that are 
targetNamespaces of other inline schemas?

Also, another reason why I ask is that I have customers who are telling me 
that IBM WSAD and XML Spy are handling inline schemas without the import 
statements.

------

<types>
 <schema targetNamespace="http://namespace1" xmlns=
  http://www.w3.org/2001/XMLSchema xmlns:two="http://namespace2">
  <import namespace="http://namespace2"/>
   <complexType name="myComplexType">
    <sequence>
     <element name="myElement" type="two:B"/>
    </sequence>
   </complexType>
    <complexType name="A">
     <sequence>
      <element name="elementA" type="xsd:string"/>
     </sequence>
    </complexType>
   </schema>
   <schema targetNamespace="http://namespace2" 
xmlns="http://www.w3.org/2001/XMLSchema"
 xmlns:one="http://namespace1">
    <import namespace="http://namespace1"/>
    <complexType name="myComplexType">
     <sequence>
      <element name="myElement" type="one:A"/>
     </sequence>
    </complexType>
    <complexType name="B">
     <sequence>
      <element name="elementB" type="xsd:string"/>
     </sequence>
    </complexType>
   </schema>
</types>

-------

Thanks,

Jeehong Min
Software Engineer
SOAPtest Development
Parasoft Corporation

"We Make Software Work" 
Received on Tuesday, 2 November 2004 23:59:02 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:58:33 GMT