W3C home > Mailing lists > Public > www-ws-desc@w3.org > October 2003

RE: Can one inline schema import definitions from a second inline schema?

From: Martin Gudgin <mgudgin@microsoft.com>
Date: Fri, 17 Oct 2003 08:59:59 -0700
Message-ID: <DD35CC66F54D8248B6E04232892B63381AE311@RED-MSG-43.redmond.corp.microsoft.com>
To: "Lawrence Mandel" <lmandel@ca.ibm.com>, "Arthur Ryman" <ryman@ca.ibm.com>
Cc: <www-ws-desc@w3.org>, <www-ws-desc-request@w3.org>

 

> -----Original Message-----
> From: Lawrence Mandel [mailto:lmandel@ca.ibm.com] 
> Sent: 17 October 2003 16:47
> To: Arthur Ryman
> Cc: Martin Gudgin; www-ws-desc@w3.org; www-ws-desc-request@w3.org
> Subject: RE: Can one inline schema import definitions from a 
> second inline schema?
> 
> 
> 
> 
> 
> Gudge,
> 
> There are different opinions on this issue in WSDL 1.1. Five of the
> possibilities I encountered are:
> 1. Inline schemas are not allowed to import or include other 
> inline schemas

This one is coherent, but I don't think it's what we want.

> 2. Inline schemas may import or include other inline schemas 
> but no import
> or include statement is required

This is not legal per the schema spec.

> 3. Inline schemas may import or include other inline schemas 
> and an import
> or include statement is required with no schemaLocation

This one makes the most sense to me.

> 4. Inline schemas may import or include other inline schemas 
> and an import
> or include statement is required with the schemaLocation and namespace
> attributes having the same value

This one doesn't make much sense to me.

> 5. Inline schemas may import or include other inline schemas 
> and an import
> or include statement is required with the schemaLocation 
> attribute set to
> the location of the encapsulating WSDL document

This one doesn't make much sense to me either.

> 
> I think Arthur has brought out the key issue.  It's important 
> that the WSDL
> 1.2 specification be clear on the accepted behaviour in this 
> situation.
> Just as the WSDL 1.2 working draft provides modification to 
> the XML schema
> definition on the use of a targetNamespace for inline schemas 
> in section
> 3.1.2,
> 
> "The targetNamespace attribute information item defines the 
> namespace of
> the type definitions and element declarations embedded in 
> this schema. WSDL
> modifies the XML Schema definition of the xs:schema element 
> information
> item to make this attribute information item required. The 
> targetNamespace
> attribute information item has the following infoset properties"
> 
> so it should provided a statement clarifying the use of xs:import and
> xs:include element information items. A statement like,
> 
>  "Schemas defined in the types section of a WSDL document may 
> reference
> other schemas defined in the same types section or a types 
> section defined
> in an imported or included WSDL document. In such a situation, the
> xs:import or xs:include statement must be used with no schemaLocation
> attribute. "
> 
> will give a definite answer to this question and eliminate an 
> ambiguity in
> WSDL 1.2.

If people want to add such language, it's OK with me.

Gudge

> 
> Lawrence Mandel
> 
> Software Developer
> WebSphere Studio Application Developer - XML Tools
> Phone: 905 - 413 - 3814   Fax: 905 - 413 - 4920
> lmandel@ca.ibm.com
> 
> 
>                                                               
>              
>              Arthur                                           
>              
>              Ryman/Toronto/IBM                                
>              
>                                                               
>           To 
>              10/17/2003 09:48          "Martin Gudgin"        
>              
>              AM                        
> <mgudgin@microsoft.com>             
>                                                               
>           cc 
>                                        Lawrence 
> Mandel/Toronto/IBM@IBMCA,  
>                                        www-ws-desc@w3.org,    
>              
>                                        
> www-ws-desc-request@w3.org          
>                                                               
>      Subject 
>                                        RE: Can one inline 
> schema import    
>                                        definitions from a 
> second inline    
>                                        schema?(Document link: 
> Lawrence     
>                                        Mandel)                
>              
>                                                               
>              
>                                                               
>              
>                                                               
>              
>                                                               
>              
>                                                               
>              
>                                                               
>              
> 
> 
> 
> Gudge,
> 
> I agree to some extent, but AFAIK, WSDL is the only application that
> inlines <schema>. I think the XSD spec assumes you have a 
> single <schema>
> per document, i.e. <schema> is the root element. So 
> processing not one, but
> two or more inline schemas is a bit of a shock for your typical XSD
> processor. So probably the "reasonable" behavior you describe 
> is undefined.
> 
> I think it would promote interoperability if the WSDL 1.2 was 
> clear on this
> point, one way or the other. From your response, I assume you 
> would support
> the use of more than one inline <schema> in the <types> element.
> 
> Arthur Ryman
> 
> 
> |---------+---------------------------->
> |         |           "Martin Gudgin"  |
> |         |           <mgudgin@microsof|
> |         |           t.com>           |
> |         |           Sent by:         |
> |         |           www-ws-desc-reque|
> |         |           st@w3.org        |
> |         |                            |
> |         |                            |
> |         |           10/17/2003 06:17 |
> |         |           AM               |
> |         |                            |
> |---------+---------------------------->
>   
> >-------------------------------------------------------------
> --------------------------------------------------------------|
>   |                                                           
>                                                                 |
>   |       To:       Lawrence Mandel/Toronto/IBM@IBMCA, 
> <www-ws-desc@w3.org>                                          
>          |
>   |       cc:                                                 
>                                                                 |
>   |       Subject:  RE: Can one inline schema import 
> definitions from a second inline schema?                      
>            |
>   |                                                           
>                                                                 |
>   
> >-------------------------------------------------------------
> --------------------------------------------------------------|
> 
> 
> 
> 
> 
> To be frank, I think this has very little to do with WSDL. It is
> perfectly coherent for a schema processor, on encountering <xsd:import
> namespace='http://namespace1' /> to say to itself, ah, I have a schema
> for that namespace, I'll use that here. Likewise, when it encounters
> <xsd:import namespace='http://namespace2' /> it would say, 
> ah, not seen
> that namespace yet, I'll wait and see what happens.
> 
> Gudge
> 
> > -----Original Message-----
> > From: www-ws-desc-request@w3.org
> > [mailto:www-ws-desc-request@w3.org] On Behalf Of Lawrence Mandel
> > Sent: 16 October 2003 23:19
> > To: www-ws-desc@w3.org
> > Subject: Can one inline schema import definitions from a
> > second inline schema?
> >
> >
> >
> >
> >
> >
> > Hello,
> >
> > We have customers that do the following in WSDL 1.1:
> >
> > <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>
> >
> > The customers say that this is not explicitly forbidden by
> > the WSDL 1.1 specification and I can't find anything that
> > forbids this in the WSDL 1.1 specification.  However, there
> > is nothing in the WSDL 1.1 specification that states how to
> > import a schema defined in the same types section but with a
> > different namespace.
> >
> > Is this allowed according to the WSDL 1.2 specification?  If
> > so, what is the correct way to import one inline schema 
> into another?
> >
> > Thanks,
> >
> > Lawrence Mandel
> >
> > Software Developer
> > WebSphere Studio Application Developer - XML Tools
> > Phone: 905 - 413 - 3814   Fax: 905 - 413 - 4920
> > lmandel@ca.ibm.com
> >
> >
> >
> 
> 
> 
> 
> 
> 
> 
Received on Friday, 17 October 2003 12:04:22 GMT

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