Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[repositorySchema] mappedDatatype lacks size attribute #152

Closed
donmendelson opened this issue Mar 9, 2022 · 6 comments
Closed

[repositorySchema] mappedDatatype lacks size attribute #152

donmendelson opened this issue Mar 9, 2022 · 6 comments

Comments

@donmendelson
Copy link
Member

The mappedDatatype element specifies how a FIX datatype maps to a message encoding. Most of the elements originated in the Unified Repository schema that were originally used to map FIX to XML Schema. Orchestra was enhanced to map to any FIX or other encoding, such as SBE or Google Protocol Buffers. There is at least one gap, however, the lack of a size or length attribute. SBE and other encodings support fixed-length fields. For example, Symbol field could be fixed to 6 characters for equities. Proposal is to add a size attribute.

More comprehensively, a review of all attributes of mappedDatatype should be made in view of ISO 11404 General Purpose Datatypes, a taxonomy of datatypes, to make sure all needs are met.

@donmendelson donmendelson added this to the Orchestra v1.1 milestone Mar 9, 2022
@donmendelson
Copy link
Member Author

ISO 11404 refers to the size of a sequence and other aggregate types, so it seems that term is more generic than length.

@donmendelson
Copy link
Member Author

Adding some comments to the XML schema for attributes of mappedDatatype:

base - A datatype from which a subtype may be created by restriction or a derived type is created by a generator
pattern - A lexical restriction from a base type
element - Element type of an aggregate type such as an array or sequence

@donmendelson
Copy link
Member Author

I question the utility of Boolean builtin attribute. It seems to imply that it need not be explicitly defined in the target encoding. Even if that is the case, we still need to map to something in the encoding, which would be defined as a base type.

@donmendelson
Copy link
Member Author

Example using proposed size attribute:

<fixr:datatype name="String" scenario="equities" scenarioId="5">
	<fixr:mappedDatatype standard="SBE" base="char" size="6">
		<fixr:annotation>
			<fixr:documentation purpose="SYNOPSIS">
         A character array of size 6 for an equity symbol
			</fixr:documentation>
		</fixr:annotation>
	</fixr:mappedDatatype>
</fixr:datatype>

donmendelson added a commit to donmendelson/fix-orchestra that referenced this issue Mar 25, 2022
@donmendelson
Copy link
Member Author

donmendelson commented Mar 28, 2022

The mappedDatatype element also lacks an attribute for void representation in data structures where presence is optional. This case was encountered in mapping of SBE datatypes that have a configurable nullValue attribute.

In the ISO 11404 standard, an Optional datatype is described as "all values v of the base datatype plus the “nil value” of void."

@kleihan
Copy link
Member

kleihan commented Jun 3, 2024

Implemented in RC1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants