FIXTradingCommunity / fix-orchestra

Machine readable rules of engagement
Apache License 2.0
71 stars 34 forks source link

[repository schema] Typo in documentation of optional name reference? #188

Closed kleihan closed 3 months ago

kleihan commented 1 year ago

The definition of refidGrp contains an optional name attribute as follows:

<xs:attribute name="name" type="fixr:Name_t">
    <xs:annotation>
        <xs:documentation>Name is optional for convenience, but it is not enforced by referential integrity. 
            Only the name of the referred object is authoritative.
        </xs:documentation>
    </xs:annotation>
</xs:attribute>

Should it be "Only the ID of the referred object is authoritative."?

donmendelson commented 1 year ago

First, both ID and name of a referred object are authoritative and are constrained to be unique within its class. For example , the tag and name of a field must be unique within fields.

The ID of a reference is constrained to match a referred object. For example, the tag of a fieldRef must point to an actual field.

However, the name of a fieldRef is for convenience only and is not constrained by the schema to match the name of the referred field. (Of course, an external validator process could check for inconsistencies.)

I hope that helps.

kleihan commented 10 months ago

It is hence not a typo but the text may be ambiguous. The name occurs in two places:

  1. In the object reference
  2. In the object itself

Orchestra v1.1 supports ID and name in both places. The current text "Only the name of the referred object is authoritative." means that the name is NOT authoritative in the object reference (and only for convenience) but that it IS authorative in the object itself. The text will be changed as follows:

The name is optional as part of a reference and only for convenience. 
It is not enforced by referential integrity. However, the name of the referred object is authoritative. 
A validator may check the consistency between the name used for the reference and the name of the referred object.
kleihan commented 3 months ago

Implemented in RC1