Re: XML Schema import and include questions

Arthur,

You've answered my question 2 - thanks. My question 1 was actually asking 
if an XML schema can be imported using the wsd:import mechanism as in

<wsdl:import namespace="http://mynamespace" location="myschema.xsd"/>

AFAIK this is not allowed by the wording of Section 2.3.1 of the primer 
seems to suggest otherwise.

Lawrence Mandel

Software Developer
IBM Rational Software
Phone: 905 - 413 - 3814   Fax: 905 - 413 - 4920
lmandel@ca.ibm.com



Arthur Ryman/Toronto/IBM
07/25/2005 10:34 AM

To
Lawrence Mandel/Toronto/IBM@IBMCA
cc
www-ws-desc@w3.org, www-ws-desc-request@w3.org
Subject
Re: XML Schema import and include questions





Lawrence,

1. An inlined XML Schema may use xs:import or xs:inlclude to refer to any 
XML document that contains an xs:schema element. The schemaLocation URI 
must reference to an xs:schema element. If the URI has no fragment id, 
then the root element of the schemaLocation document MUST be xs:schema. 
However, if the schemaLocation URI has a fragment id, that the fragment id 
MUST refer to an xs:schema element, i.e, it may be a child element. This 
means the the fragment id could refer to an xs:schema that is defined in a 
wsdl:types element in a WSDL document.  So although you are refering to a 
WSDL document, you are not using wsdl:import - you are using xs:import 
(with a suitable fragment id).

2. No, you can't have an xs:include in wsdl:types based on the WSDL 2.0 
Core Language Spec.. The WSDL 2.0 spec only defines xs:schema or 
xs:import. (of course, some other spec could define the meaning of other 
elements). The WSDL 2.0 only explicitly defines the use of xs:schema and 
xs:import. Anything else is undefined. The spec doesn't explicilty 
excluded everything else since extensions are allowed.

Arthur Ryman,
Rational Desktop Tools Development

phone: +1-905-413-3077, TL 969-3077
assistant: +1-905-413-2411, TL 969-2411
fax: +1-905-413-4920, TL 969-4920
mobile: +1-416-939-5063, text: 4169395063@fido.ca
intranet: http://labweb.torolab.ibm.com/DRY6/



Lawrence Mandel/Toronto/IBM@IBMCA 
Sent by: www-ws-desc-request@w3.org
07/22/2005 06:10 PM

To
www-ws-desc@w3.org
cc

Subject
XML Schema import and include questions







I have a couple WSDL 2.0, XML Schema questions as well. 

1. Section 2.3.1 of the primer states, 
"Although WSDL 2.0 provides a wsdl:import mechanism (described in the next 
section), an inlined XML schema may also use XML Schema's native xs:import 
and xs:include elements to refer to schemas either in separate files or 
inlined in the same WSDL 2.0 document. " 
This seems to suggest that wsdl:import can be used for XML Schema as well. 
As far as I understand WSDL 2.0 this is not the case. Can wsdl:import be 
used for XML Schemas? 

2. Can the xs:include element be used as a child element of types to 
include an XML Schema with the same targetNamespace as the enclosing WSDL 
document as in 
<wsdl:types> 
        <xs:include schemaLocation="somelocation.xsd"/> 
</wsdl:types> 
I don't see anything in the WSDL 2.0 spec that forbids this. Does it even 
make sense to use an include when crossing between the WSDL and XML Schema 
type languages? 

Thanks, 

Lawrence Mandel

Software Developer
IBM Rational Software
Phone: 905 - 413 - 3814   Fax: 905 - 413 - 4920
lmandel@ca.ibm.com 


Arthur Ryman/Toronto/IBM@IBMCA 
Sent by: www-ws-desc-request@w3.org 
07/22/2005 04:41 PM 


To
"John Kaputin (gmail)" <jakaputin@gmail.com> 
cc
John Kaputin <KAPUTIN@uk.ibm.com>, www-ws-desc@w3.org, 
www-ws-desc-request@w3.org 
Subject
Re: Clarification on multiple schemas with same namespace









John, 

Your interpretation is correct. 

Thx for spotting the error in 3.1.2. It should say "inline".: 

"It is NOT an error to inline two or more schemas from the same
targetNamespace. " 

The intent of the Primer was to explicitly state information that is 
implicit in the other specs. The policy of the WSDL spec has been to be 
very terse about XML Schema and to expand on the implications in the 
Primer. However, we have recently received a fair amount of questions 
about the interaction of XML Schema and WSDL, so I think it is worth 
adding more clarification to the WSDL spec. 


Arthur Ryman,
Rational Desktop Tools Development

phone: +1-905-413-3077, TL 969-3077
assistant: +1-905-413-2411, TL 969-2411
fax: +1-905-413-4920, TL 969-4920
mobile: +1-416-939-5063, text: 4169395063@fido.ca
intranet: http://labweb.torolab.ibm.com/DRY6/ 

"John Kaputin (gmail)" <jakaputin@gmail.com> 
Sent by: www-ws-desc-request@w3.org 
07/21/2005 10:38 AM 

Please respond to
"John Kaputin (gmail)"



To
www-ws-desc@w3.org 
cc
John Kaputin <KAPUTIN@uk.ibm.com> 
Subject
Clarification on multiple schemas with same namespace











I want to confirm that I have interpreted WSDL 2.0 spec correctly on
multiple schemas with the same namespace.

My interpretation is:
1) The <types> element may contain multiple <xs:import> with the same 
namespace.
2) The <types> element may contain multiple <xs:schema> with the same
targetNamespace.

Is this correct?

Part 1 Section 3.1.2 "Inlining XML Schema" confused me a bit with the 
text:

"It is NOT an error to import two or more schemas from the same
targetNamespace . "

This text mentions 'import' but the section heading is 'Inlining'.  Is
this a typo or should the text be in section 3.1.1 "Importing XML
Schema"?

The only mention of multiple inline schemas with the same namespace is
in the Primer section 3.2.2 "Multiple Inline Schemas" which states:

" two or more schemas may have the same target namespace provided that
they do not define the same elements or types"

This statement or words to this effect should probably be in the Part
1 normative spec too.

regards,
John Kaputin.

Received on Monday, 25 July 2005 15:16:36 UTC