fix-orchestra icon indicating copy to clipboard operation
fix-orchestra copied to clipboard

Explicit link between a field and related fields for its encoded versions

Open kleihan opened this issue 4 years ago • 7 comments

Fields like Issuer(106) are also supported in an encoded version, in this case EncodedIssuer(349). The latter requires a second field EncodedIssuerLen(348) for tag value encoding that defines the length of the encoded field. It refers to the encoded field with the attribute "lengthId".

The link to the base field Issuer(106) is only implicit in the description of the encoded field. It should be an attribute that contains 106 as field reference.

Second aspect is the fact that the length fields are not required by all encodings, similar to all fields with data type NumInGroup not being applicable to FIXML. Probably makes sense to split this off as another issue "Attributes for encoding information".

kleihan avatar Apr 19 '20 13:04 kleihan

The Orchestra schema already has attribute "lengthId" to tie a Length field (e.g. 348) to a data field (349). (There was no machine readable attribute for that in Repository.)

I agree that we need machine-readable encoding-specific rules.

Question: are Issuer and EncodedIssuer considered mutually exclusive? That would be a different rule to enforce.

donmendelson avatar Nov 02 '20 14:11 donmendelson

Issuer and EncodedIssuer are not mutually exclusive. Both representations can be provided and the field description of EncodedIssuer actually proposes it, i.e. "If used, the ASCII (English) representation should also be specified in the Issuer field".

kleihan avatar Nov 02 '20 15:11 kleihan

Propose to add a new attribute, e.g. "baseFieldId" as reference to the non-encoded version of a field. The EncodedIssuer definition would then look like this:

  <fixr:field added="FIX.4.2"
                id="349"
                name="EncodedIssuer"
                type="data"
                abbrName="EncIssr"
                lengthId="348"
                baseFieldId="106">
       <fixr:annotation>
          <fixr:documentation purpose="SYNOPSIS">
               Encoded (non-ASCII characters) representation of the Issuer field in the encoded format specified via the 
               MessageEncoding (347) field. If used, the ASCII (English) representation should also be specified in the Issuer field.
         </fixr:documentation>
       </fixr:annotation>
    </fixr:field>

kleihan avatar Nov 15 '21 10:11 kleihan

This still needs a schema change pull request to be included in v1.1 as of June 14 2022.

donmendelson avatar Jun 14 '22 14:06 donmendelson

Orchestra working group made a decision on June 15, 2022 to keep the proposed baseFieldId attribute name but widen the definition. As originally proposed, it will relate encoded fields to non-encoded fields, but it will also be used to related alternate tags due to encoding rules, e.g. Nested2PartyID related to PartyID due to tag-value encoding rules. The relationship is strictly in presentation layer (message encoding), not semantic.

donmendelson avatar Jun 15 '22 14:06 donmendelson

Question: could this type of cross-reference apply to XML elements other than fields, i.e. component or group references?

donmendelson avatar Jun 16 '22 13:06 donmendelson

Scope was reduced to encoded fields and attribute name was changed to nonEncodedFieldId. See separate issue https://github.com/FIXTradingCommunity/fix-orchestra/issues/194 for additional scope.

kleihan avatar Nov 15 '23 22:11 kleihan

Implemented for RC1

kleihan avatar Jun 03 '24 08:06 kleihan