W3C home > Mailing lists > Public > www-ws-desc@w3.org > March 2006

Re: Must XML schema elements by imported in WSDL 2.0?

From: Amelia A Lewis <alewis@tibco.com>
Date: Mon, 20 Mar 2006 14:05:36 -0500
To: Arthur Ryman <ryman@ca.ibm.com>
Cc: www-ws-desc@w3.org
Message-Id: <20060320140536.d5ba2358.alewis@tibco.com>

I took this to our schema guru, who is also on the schema WG.

He agreed with Arthur and Robert; we need to require an import for use
of schema global definitions (element and type, although I don't
believe we permit use of type?), but not for use of schema simple types.

Amy!
On Thu, 16 Mar 2006 12:58:30 -0500
Arthur Ryman <ryman@ca.ibm.com> wrote:

>Roberto, I agree with your proposal.
>
>I did an experiment with Xerces. Consider the following valid schema, 
>test1.xsd:
>
><?xml version="1.0" encoding="UTF-8"?>
><schema xmlns="http://www.w3.org/2001/XMLSchema"
>        targetNamespace="http://www.example.org/test1"
>        xmlns:tns="http://www.example.org/test1">
> 
>        <import namespace="http://www.w3.org/2001/XMLSchema"></import>
>
>        <complexType name="schemaType">
>                <sequence>
>                        <element ref="schema"></element>
>                </sequence>
>        </complexType>
></schema>
>
>If I remove the <import> Xerces gives me the following error:
>
>src-resolve.4.2: Error resolving component 'schema'. It was detected
>that 'schema' is in namespace 'http://www.w3.org/2001/XMLSchema', but 
>components from this namespace are not referenceable from schema
>document 'file:///D:/workspaces/WSD/schematest/test1.xsd'. If this is
>the incorrect namespace, perhaps the prefix of 'schema' needs to be
>changed. If this is the correct namespace, then an appropriate
>'import' tag should be added to
>'file:///D:/workspaces/WSD/schematest/test1.xsd'.
>
>Therefore, to be consistent with XSD, we must require the <import>
>when refering to elements. In contrast, the following valid schema
>test2.xsd refers to a built-in simple type and there is no <import>
>
><?xml version="1.0" encoding="UTF-8"?>
><schema xmlns="http://www.w3.org/2001/XMLSchema"
>        targetNamespace="http://www.example.org/test2"
>        xmlns:tns="http://www.example.org/test2">
> 
>        <complexType name="countType">
>                <sequence>
>                        <element name="count" type="int"></element>
>                </sequence>
>        </complexType>
></schema>
>
>Arthur Ryman,
>IBM Software Group, Rational Division
>
>blog: http://ryman.eclipsedevelopersjournal.com/
>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


-- 
Amelia A. Lewis
Senior Architect
TIBCO/Extensibility, Inc.
alewis@tibco.com
Received on Monday, 20 March 2006 19:06:15 GMT

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