Re: Encoding: mandate validation of XML Schema simple types?

Just to be clear, I do not advocate mandatory schema validation for SOAP.
It's impractical and inappropriate, and I'm sorry if I was misunderstood.
Let me add a bit of detail on my position:

I am not advocating mandatory  validation of complex types, and I am not
advocating mandatory validation of derived simple types.  In general, I
would never want SOAP processing to mandatorily depend on the contents of a
schema document.

What I do think merits consideration, as you say,  is validation of the
simple builtins, either when used in fixed SOAP attributes (if you misspell
"true" as the lexical form of mustUnderstand, that should be a mandatory
error, IMO), and probably when chapter 5  encoding is used >>and xsi:type
names a builtin simple type<<.  This is a case when the SOAP specification
is telling you exactly what simple type is in the encoded graph.

I can see this "validation of encoding" question either way, but the
thinking would be along these lines:  when you use SOAP encoding and
xsi:type, such as:

      <count xsi:type="xsd:integer">12x34</count>  <!-- invalid -->

you are specifically creating a node in the encoded graph which is of known
type per the SOAP spec.  SOAP specifically discusses xsi:type as playing
this role, in a manner that goes beyond what the schema spec says.   One
can argue that the above should be caught as an error by SOAP decoders:
you're using only constructions that the SOAP spec specifically discusses,
and you're misusing them.

I believe that all or most of the validations are near trivial, since I'm
not advocating validation of derived types.  Integers must be all digits,
etc.  You don't even have to convert to values if you don't want to,
because no facets are involved.  For most types, you can just check the
lexical forms.  Dates might be a little harder, I'm not sure.  Most of the
complexity in schema validation of simple types is in the handling of
facets on derived types.

Again, I am in complete agreement that anything that has to do with
understanding a schema document is a completely separate layer, and above
what SOAP should mandate.    Sorry for any confusion.

------------------------------------------------------------------------
Noah Mendelsohn                                    Voice: 1-617-693-4036
Lotus Development Corp.                            Fax: 1-617-693-8676
One Rogers Street
Cambridge, MA 02142
------------------------------------------------------------------------





                                                                                                                                      
                      Jacek Kopecky                                                                                                   
                      <jacek@systinet.         To:      <xml-dist-app@w3.org>                                                         
                      com>                     cc:                                                                                    
                      Sent by:                 Subject: Encoding: mandate validation of XML Schema simple types?                      
                      xml-dist-app-req                                                                                                
                      uest@w3.org                                                                                                     
                                                                                                                                      
                                                                                                                                      
                      12/09/01 02:16                                                                                                  
                      PM                                                                                                              
                                                                                                                                      
                                                                                                                                      




 Hi all. 8-)
 During the F2F test cases generation, Noah said he felt our spec
should mandate validating the XML Schema built-in simple types
(those listed in the XML Schema - Datatypes spec).
 I thought that this was unnecessary. What do others think?
 If we decide SOAP Encoding processors MUST validate XML Schema
simple types, we'll need a new SOAP Encoding fault code, for
example enc:InvalidData to cover faulting.
 Best regards

                   Jacek Kopecky

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

Received on Sunday, 9 December 2001 22:16:03 UTC