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

Re: Section 5 vs Schema

From: <noah_mendelsohn@us.ibm.com>
Date: Wed, 30 Jan 2002 15:17:08 -0500
To: jacek@systinet.com
Cc: Martin Gudgin <marting@develop.com>, XML Protocol Discussion <xml-dist-app@w3.org>
Message-ID: <OF2F549CAE.5DD461E9-ON85256B51.00701E37@lotus.com>
Yes, you're right, my mistake, I oversimplified the explanation of the 
examples.  I think we agree on the key point, which is that XML Schema is 
not an appropriate description language for the directed graphs used by 
the encodings.  It would be easy to construct two examples that were very 
different from a schema point of view, and identical per the graph model.

------------------------------------------------------------------
Noah Mendelsohn                              Voice: 1-617-693-4036
IBM Corporation                                Fax: 1-617-693-8676
One Rogers Street
Cambridge, MA 02142
------------------------------------------------------------------







Jacek Kopecky <jacek@systinet.com>
01/29/2002 08:06 AM

 
        To:     Noah Mendelsohn/Cambridge/IBM@Lotus
        cc:     Martin Gudgin <marting@develop.com>, XML Protocol Discussion 
<xml-dist-app@w3.org>
        Subject:        Re: Section 5 vs Schema


 Noah, just a minor point:

 The two examples below are not precisely equivalent:

    <greeting>Hello</greeting>
    <salutation>Hello</salutation>

    <greeting id="0">Hello</greeting>
    <salutation ref="0" />

 That's because in the latter, the values have some relation and
if one changes, the other does as well, while in the former
example the values are independent. I think you wanted to say
that the latter example, while a valid SOAP Encoding graph, is
not valid according to the schema provided.

 Overall, I agree with what you are saying.

 Best regards,

                   Jacek Kopecky

                   Senior Architect, Systinet (formerly Idoox)
                   http://www.systinet.com/



On Mon, 28 Jan 2002 noah_mendelsohn@us.ibm.com wrote:

 > 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
 > distinguished:
 >
 > 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:
 >         <greeting>Hello</greeting>
 >         <salutation>Hello</salutation>
 >
 >         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" />
 >
 >         </xs:schema>
 >
 > 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 Wednesday, 30 January 2002 15:26:17 GMT

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