FIXTradingCommunity / fix-orchestra

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

[repository schema] Define documentation purposes and add standard purposes #229

Open kleihan opened 1 week ago

kleihan commented 1 week ago

The schema has an optional attribute purpose for documentation elements and defines a few standard purposes. A user may add to the list as it is extensible.

    <xs:simpleType name="purpose_t">
        <xs:annotation>
            <xs:documentation>Extensible annotation purposes</xs:documentation>
        </xs:annotation>
        <xs:union memberTypes="fixr:purpose_enum xs:string"/>
    </xs:simpleType>

The standard purposes are currently SYNOPSIS, ELABORATION, EXAMPLE, DISPLAY. The specification only lists them but does not offer a definition.

Multiple languages can be supported by specifying the language of each element in its langId attribute. 
Also, multiple categories of documentation are supported by populating the purpose attribute. 
Suggested values of purpose include “SYNOPSIS”, “ELABORATION”, “EXAMPLE”, and “DISPLAY”.

It is proposed to define DISPLAY as the purpose to provide a more elaborate name other than the value of the name attribute, for example (taken from #193):

<fixr:message msgType="F" name="OrderCancelRequest">
  ...
  <fixr:annotation>
    <fixr:documentation purpose="DISPLAY">
      Cancel Order Message (Specifying Order Acceptance Number)</fixr:documentation>
  </fixr:annotation>
</fixr:message>

It is further proposed to standardize the following purposes with clear definitions in the specification:

User-defined purposes should still be allowed but the standard purposes should cover most use cases.

martinswanson commented 1 week ago

Generally supportive of adding clearer guidance for the purpose attribute, not least because it simplifies document generation.

Specific notes:

Suggested wording:

Multiple languages can be supported by specifying the language of each element in its langId attribute. Also, multiple categories of documentation are supported by populating the purpose attribute. Suggested values of purpose include “SYNOPSIS”, “ELABORATION”, “EXAMPLE”, “DISPLAY”, “CAPTION”, “TOOLTIP”, and “DEFINITION”.