W3C home > Mailing lists > Public > public-ws-chor@w3.org > May 2006

Fwd: it is impossible to compare QNames

From: Steve Ross-Talbot <steve@pi4tech.com>
Date: Wed, 31 May 2006 07:31:19 +0100
Message-Id: <0c6462416a8b5254eac1154459f6a024@pi4tech.com>
To: 'WS-Choreography List' <public-ws-chor@w3.org>



Begin forwarded message:

> From: "Nickolas Kavantzas" <nickolas.kavantzas@oracle.com>
> Date: 30 May 2006 19:16:18 BST
> To: <matthew@stickledown.com>
> Cc: "Tony Fletcher" <tony_fletcher@btopenworld.com>, "Steve 
> Ross-Talbot" <steve@pi4tech.com>
> Subject: Re: it is impossible to compare QNames
>
> Hi Matthew,
>
> The QName of the /package/relationshipType/roleType/@typeRef references
> the field /package/roleType/@name (a NCName). If you
> want to enforce the WS-CDL spec rule (quoted below),
> then you use the targetNamespace value (a URI) of the WS-CDL package
> that the roleType has being defined within and the roleType name 
> (NCName)
> to construct a QName. Then you can do comparisons of the two QNames.
>
> --
> Nick
>
> ----- Original Message -----
> From: "Steve Ross-Talbot" <steve@pi4tech.com>
> To: <matthew@stickledown.com>
> Cc: "'WS-Choreography List'" <public-ws-chor@w3.org>; "Nickolas 
> Kavantzas"
> <nickolas.kavantzas@oracle.com>; "Tony Fletcher"
> <tony_fletcher@btopenworld.com>
> Sent: Monday, May 29, 2006 12:25 PM
> Subject: Re: it is impossible to compare QNames
>
>
>> I'd like to deal with this at the next conf call (Tuesday if 
>> possible).
>> We ought to be able to fix this or provide an sensible answer to
>> Matthew.
>>
>> Cheers
>>
>> Steve T
>>
>> On 27 May 2006, at 22:45, Matthew Rawlings wrote:
>>
>>>
>>> This is feedback on the WS-CDL Choreography CR of 2005-11-09. I have
>>> been
>>> implementing CDL at a bank and have some questions and feedback on 
>>> the
>>> CR.
>>>
>>> The problem I have with the CR is the XML Schema for WS-CDL requires
>>> you to
>>> compare a QName type with an NCName type. This comparison is 
>>> impossible
>>> because the QName type does not have equality or ordering defined for
>>> it.
>>>
>>> Section 4.2 of the CDL specification states that field
>>> /package/relationshipType/roleType/@typeRef (a QName), must reference
>>> the
>>> field /package/roleType/@name (a NCName). I took this from the text: 
>>> 'A
>>> relationshipType element MUST have exactly two roleTypes defined. 
>>> Each
>>> roleType is specified by the typeRef attribute within the roleType
>>> element.
>>> The "QName" value of the typeRef attribute of the roleType element 
>>> MUST
>>> reference the name of a roleType.'
>>>
>>> Please tell me why the datatype QName was used. I have been unable to
>>> work
>>> out why QName was used. QName is normally used to reference elements
>>> rather
>>> than the contents of elements.
>>>
>>> I have been assuming the word "reference" is as an equality test as
>>> defined
>>> by XPath 1.0. This should be explicit in the specification.
>>>
>>> Looking through the mail-list examples (e.g.
>>> http://lists.w3.org/Archives/Public/public-ws-chor/2005Sep/0001) it
>>> seems
>>> that QName and NCName are being used in the style of xs:ID and
>>> xs:IDREF. Why
>>> not just use xs:ID and xs:IDREF? This would also have the benefit of
>>> making
>>> the constraint that a typeRef must reference a roleType name 
>>> explicit.
>>> Both
>>> xs:ID and xs:IDREF are subtypes of xs:NCName.
>>>
>>> At the very least typeRef and roleType should be some type of string
>>> that is
>>> comparable, otherwise references cannot be tested.
>>>
>>> Matthew Rawlings
>>> +44 791 539 7824
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>
>
>
Received on Wednesday, 31 May 2006 06:31:41 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:30:36 UTC