Skip to content

[repository schema] New element for encoding information specific to an element type #248

@kleihan

Description

@kleihan

Orchestra has element types for messages, groups, components, fields, and code sets. All of these may require specific encoding information and have no such capability so far (except datatypes with the mappedDatatype element). For example, a fixed-length binary encoding like SBE may require to set a block length for an entire message that deviates from the simple addition of the length of all of its elements, i.e. a user may want to defined a larger value.

The same goes for references to these element types, for example, to provide an offset for each field in a message for the purpose of byte alignment. It is proposed to define a new encodings element that consists of a sequence of local encoding elements, each of which needs to provide the name of the standard. The name must be unique inside the enclosing element encodings.

<xs:element name="encodings">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="encoding" type="fixr:namedEncoding" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

<xs:complexType name="namedEncoding">
  <xs:complexContent>
    <xs:extension base="fixr:baseEncoding">
      <xs:attribute name="standard" type="fixr:Name_t" use="required"/>
    </xs:extension>
  </xs:complexContent>
</xs:complexType>

<xs:complexType name="baseEncoding" abstract="true">
  <xs:sequence>
    <xs:element name="annotation" type="fixr:annotation" minOccurs="0"/>
    <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
  </xs:sequence>
</xs:complexType>

Metadata

Metadata

Assignees

No one assigned

    Labels

    ENCODINGSupport for binary and other encoding protocols

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions