Re: A schema for each mep?

Amelia A. Lewis wrote:

>A couple of comments.
>
>It appears that the main motivation for this is to set default values.
>
It came out because of this issue, but I think that it is also 
interesting for instance to check that all messages refered via 
wsdl:input and/or wsdl:output are coherent with the pattern used for the 
operation, which is what XML-Schema is meant for.

>
>May I recommend that folks track down what James Clark had to say about
>schemas setting default values?  In a nutshell, it's a bad idea, because
>it means that schema-validating and non-schema-validating parsers
>produce different results.  It means that the schema is, in a sense,
>part of the instance.  RNG doesn't support it, for those reasons.
>
The fact is that for our case, we have redundant data, hence default 
values might not be that bad.
I agree nevertheless with the comments.

>
>Second, it is not possible to give elements of the same name different
>default values in W3C XML Schema (Youenn's 'quick question', below).
>
>Finally, there are real namespace problems here.  In order to define an
>element "wsdl:input", the schema namespace has to be that of WSDL. 
>Which breaks just *lots* of things, although scoping could, potentially,
>resolve some of it (except that it's instance-level scoping, and we
>should not be requiring folks to reference a schema from an instance of
>WSDL).  There is no mechanism (notoriously) for W3C XML Schema to vary
>the content model of an element based on the value of an attribute,
>which is effectively what this requires.
>
That was what I thought when writing the first example, and so I have 
written the second one :o) If the message elements were on the mep 
namespace (as in Jean-Jacques's proposal) there would be no real 
namespace problems for messages, right?
The schema written for faults (as they are not named) would be that 
fault attributes would only be able to take a list of  values 
(messageRef=A or B for instance).

>
>The schema, thus, could not be used for automatic validation, but would
>require special code in order to be programmatically invoked for each
>operation in each interface (presumably, the code would read the value
>of the pattern attribute, and load a schema based on that name).  Does
>it really add significant value to do this?  It seems to me that we are
>only specifying default values, and trading programmed-in default values
>for programmed-in custom schema loading extensions seems to me no great
>win.
>
With the current syntax wsdl:input, a mep schema would only be able to 
give the list of messageRef names that are available, which is not a 
huge bonus.
If using Jean-Jacques syntax, the defaulting mechanism would work (at 
least I think), typically it will give the direction of each message. I 
do not think defaulting values is all that bad in that particular case, 
because we are defaulting redundant data.
    Youenn

>
>Amy!
>On Mon, 10 Nov 2003 14:21:54 +0100
>FABLET Youenn <youenn.fablet@crf.canon.fr> wrote:
>
>  
>
>>At last f2f we discussed about rules to retrieve default values for 
>>message-related constructs.
>>It seems interesting to have a mep schema for at least two reasons:
>>    - allow the validation of the content of each wsdl:operation
>>    instance- allow defaulting of values (such as messageRef or
>>    direction)
>>The idea would be that any author of a wsdl mep spec would also write
>>a mep schema.
>>
>>Attached are examples of what could resemble such schemas (these are
>>not complete schemas, for instance the open content model is not taken
>>into account). There are two examples, one to accomodate the current
>>notation for contents in the wsdl:operation construct and one to
>>accomodate the notation as proposed by Jean-Jacques. In each file
>>(example1.xml and example2.xml), a <syntax> element is related with a
>><schema> element. Each schema should do some validation of the
>><syntax> example and give default values when possible.
>>
>>What do you think ? Is this worth continuing exploring this subject?
>>    Youenn
>>
>>Quick question: in the case of meps with more than one input message,
>>we might have several <wsdl:input> in a <wsdl:operation> construct. Is
>>it possible with XML Schema to give a different type for each of these
>>
>><wsdl:input>? If I recall correctly I would say no, but I am not very 
>>sure (If it is not possible, it might lead to problems for defining 
>>mep's schemas, with XML Schema at least).
>>
>>    
>>
>
>
>  
>

Received on Monday, 10 November 2003 11:27:30 UTC