- From: Martin Gudgin <marting@develop.com>
- Date: Fri, 25 Jan 2002 17:29:55 -0000
- To: "Marc Hadley" <marc.hadley@sun.com>
- Cc: "XML Protocol Discussion" <xml-dist-app@w3.org>
Woah there! Are you asserting that in the absence of a schema you *MUST* use xsi:type? If so, I'm afraid I violently disagree. To my mind, the *ONLY* case for using xsi:type is if the type of the thing being sent is not know until runtime; // Java void Fn ( Object o ); // C++ void Fn ( void* p ); // VB Sub Fn ( v As Variant ) In all other cases you have something that is typed, and that is enough. Gudge ----- Original Message ----- From: "Marc Hadley" <marc.hadley@sun.com> To: "Martin Gudgin" <marting@develop.com> Cc: "XML Protocol Discussion" <xml-dist-app@w3.org> Sent: Friday, January 25, 2002 3:00 PM Subject: Re: Section 5 vs Schema > The ETF discussed this issue in a recent telcon and would like to > propose a change to section 3.4 of the current editors draft[1] to > lessen the schema bias in the examples by showing the mapping from > programming language compound types to SOAP encoding. > > e.g. the first example in section 3.4.1 shows an instance of a book > structure and a schema that describes the structure. This would be > replaced with a C language struct definition and a SOAP encoding > serialisation of the structure, e.g. > > BEGIN EXCERPT > > The following structure: > > struct Book > { > char *author; > char *preface; > char *intro; > } book = {"Henry Ford", "Preface text", "Intro Text"}; > > would be encoded as follows without a schema > > <Book xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:enc="http://www.w3.org/2001/12/soap-encoding"> > <author xsi:type="enc:string">Henry Ford</author> > <preface xsi:type="enc:string">Preface text</preface> > <intro xsi:type="enc:string">Henry Ford</intro> > </Book> > > or as follows if a schema is available > > <e:Book xmlns:e="http://example.org/2001/12/books"> > <e:author>Henry Ford</e:author> > <e:preface>Preface text</e:preface> > <e:intro>Henry Ford</e:intro> > </e:Book> > > END EXCERPT > > Comments, flames etc. > > Marc (on behalf of the ETF) > > [1] http://www.w3.org/2000/xp/Group/1/10/11/soap12-part2.html > > Martin Gudgin wrote: > > >SOAP 1.2 Part 2 Section 4[1] ( old section 5 ) defines a set of encoding > >rules for mapping from programmatic type systems to XML. > > > >There was some discussion on the last editors conference about how to deal > >with issue 17[2] regarding the schemas that appear in section 5. I took an > >action to start discussion about this on this list. Please note I will be on > >holiday from today and will not be back until the New Year so will not be > >able to actively participate until then, hopefully you'll all have nailed > >the issue by then! > > > >One suggestion was that section 5 actually defines an implicit schema so > >each mapping from some programmatic type essentially defines a schema type. > >This seems reasonable but at the same time feels a little odd. We have > >section 5 because when SOAP 0.9, 1.0 and 1.1 were written XML Schema was not > >done, we didn't have an XML based type system. So we had to start from a > >type system we did have. So Section 5 defines a set of rules for mapping > >from programmatic type systems iuntNow that XML Schema is done it is > >possible to define the messages being exchanged entirely in XML Schema > >without reference to any programmatic type system. Mapping to the > >programmatic type system ( if any ) at either end of the exchange is an > >implementation detail. > > > >So, given that we have XML Schema, does it make sense to infer a schema from > >some other type system? > > > >And if it does, what do we do about examples in the spec. It seems very > >strange to say 'we start from a programmatic type system' and then only show > >schemas! We are defining a language binding, even if we never show a Java > >class or a C struct or whatever. > > > >OK, that's it. I hope the discussion is fruitful, I'll read through it when > >I get back from holiday. > > > >Regards > > > >Martin Gudgin > >DevelopMentor > > > > > > > >[1] http://www.w3.org/TR/2001/WD-soap12-part2-20011002/#soapenc > >[2] http://www.w3.org/2000/xp/Group/xmlp-issues.html#x17 > > > >
Received on Friday, 25 January 2002 12:31:18 UTC