Re: [Bug 4380] Proposal for Assertion InterfaceMessageReference-0042

View: New views
2 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: [Bug 4380] Proposal for Assertion InterfaceMessageReference-0042

by Ramkumar Menon :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Jonathan,
 
I see the update on bug description for 4380 as
"
The specification of a uniqueness constraint is incompatible with the
optionality of the attribute.
"
 
I am trying to understand the rationale of this explanation, but with no luck. :-( Maybe I am missing something here.
Would it be possible to elaborate more on this?
 
regards,
Ram
 


 
On 3/8/07, bugzilla@... <bugzilla@...> wrote:

http://www.w3.org/Bugs/Public/show_bug.cgi?id=4380





------- Comment #1 from jonathan@...  2007-03-08 23:48 -------
The mentioned assertion states "For each Interface Message Reference
component in the {interface message references} property of an Interface
Operation component, its {message label} property MUST be unique.".

Correct me if I am wrong, but can we have the XSD capture this constraint
explicitly ?

For instance,

<xs:element name="operation" type="wsdl:BindingOperationType">
<xs:unique name="messageLabel">
   <xs:selector
xpath="(wsdl:input|wsdl:output:wsdl:infault|wsdl:outfault)">
    <xs:field xpath="@messageLabel">
   </xs:selectpr>
</xs:unique>
</xs:element>




--
Shift to the left, shift to the right!
Pop up, push down, byte, byte, byte!

-Ramkumar Menon
A typical Macroprocessor

Re: [Bug 4380] Proposal for Assertion InterfaceMessageReference-0042

by Amelia A Lewis-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Heyo,

On 2007-05-21 14:04:17 -0400 "Ramkumar Menon"
<ramkumar.menon@...> wrote:
> The specification of a uniqueness constraint is incompatible with the
> optionality of the attribute.
>
> I am trying to understand the rationale of this explanation, but with
> no
> luck. :-( Maybe I am missing something here.
> Would it be possible to elaborate more on this?

It's possible that we missed something, in discussing this.  We were
under the impression that optional attributes could not be used in the
selectors of unique constraints.

Further, the validation that can be done using the unique constraint,
when the target attribute is optional with defaulting rules that are
also inexpressible in WXS, is less than ideal:

<wsdl:operation> <!-- using default, so input-output -->
     <wsdl:output />
     <wsdl:input />
     <wsdl:output messageLabel="Out" />
     <wsdl:input messageLabel="In" />
</wsdl:operation>

This can't be caught with the uniqueness constraint (which is rather
the purpose of the uniqueness constraint).  If we can't catch such
cases, then adding the unique constraint to the XSD is apt to suggest
that all that needs to be checked is the result of that, when in fact
it is entirely inadequate as a consequence of the optionality of the
attribute and the rules for defaulting its value when it is missing.

Note that the above fails for other reasons (not expressed in the
schema, but expressible in the assertions of the component model).

Amy!
--
Amelia A. Lewis
Senior Architect
TIBCO/Extensibility, Inc.
alewis@...