W3C home > Mailing lists > Public > xml-dist-app@w3.org > January 2002

Re: Section 5 vs Schema

From: <noah_mendelsohn@us.ibm.com>
Date: Mon, 28 Jan 2002 20:34:35 -0500
To: Martin Gudgin <marting@develop.com>
Cc: XML Protocol Discussion <xml-dist-app@w3.org>
Message-ID: <OF5C2F30C0.FAE4A42E-ON85256B50.00074F02@lotus.com>
Gudge: let me take a stab at the questions that I think you are really 
asking.  There are several uses the schemas in chapter 4, that should be 

Derivation of simple types

Section 4.2 [1}, for example, illustrates the use of W3C XML Schema to 
declare a derived simple type.  As noted in [2], I think this may be 
appropriate insofar as the schema language is a normative W3C 
recommendation, and to clarify the possibility of using the derivation 
mechanism provided therein.  What I would suggest is the following 
additions to the specification:

* Make clear the validation of such types is optional, and that in the 
absence of validation we have a type whose name is known, but with 
indeterminate relation to any of the built-in types, and with any content 
accepted (simple, complex, mixed, etc. in W3C schema terms).  Contents is 
checked only when validation is performed.

* Also make clear that the use of other schema languages to declare types 
is acceptable, but that the soap specification mandates no validation for 
such languages either.

* Make clear that when validation wrt/ any schema language is to be 
performed, it is the responsibility of the communicating nodes to agree on 
the schema language to be used, the schemas to be used, the nature of the 
faults to be reflected if validation fails, etc.  I believe that such 
rules should apply equally to W3C schemas and to others.

Other Uses of Schemas in Chapter 4

In section 4.2.1 [3], a schema is offered as a sample to describe the 
following instance fragment:

        Sample encoded instance fragment:

        Sample schema:
        <?xml version="1.0" ?>
        <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           xmlns:enc="http://www.w3.org/2001/12/soap-encoding" >

          <xs:import namespace="http://www.w3.org/2001/12/soap-encoding" 

          <xs:element name="greeting" type="enc:string" />
          <xs:element name="salutation" type="enc:string" />


I agree that this is misleading and inappropriate, and I suspect that is 
the true essence of your concern.  The schema is basically modeling an XML 
tree, whereas the encoding conveys a directed label graph.  Using one to 
model the other is just inappropriate (and this by the way is one of my 
concerns about the current design of WSDL).  Indeed, it obscures the whole 
point of this section, which is that from the point of view of the 
encoding (but not the schema!), the fragment above is equivalent to:

        <greeting id="String-0">Hello</greeting>
        <salutation href="#String-0"/>

Furthermore, as you point out, one of the main reasons to have the 
encoding at all is that the data becomes substantially self describing. 
While creating a schema for such data is not strictly wrong, I agree that 
it does not belong in our specification.

Bottom line: I think I would restrict examples using W3C XML schema to 
cases like the one in section 4.2 as discussed above.

Thank you very much.

[1] http://www.w3.org/TR/soap12-part2/#simpletypes
[2] http://lists.w3.org/Archives/Public/xml-dist-app/2002Jan/0378.html
[3] http://www.w3.org/TR/soap12-part2/#stringtypes

Noah Mendelsohn                              Voice: 1-617-693-4036
IBM Corporation                                Fax: 1-617-693-8676
One Rogers Street
Cambridge, MA 02142
Received on Monday, 28 January 2002 20:47:36 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:11:45 UTC