Home MORPH Syntax Datatypes
  Sponsored by Magnetar Games Main Specification Forum Syntax

MORPH Syntax

Datatypes
Datatypes are declared using XML Schema constructs so that their use is able to be properly validated by XML tools.

Simple Datatypes (<xs:simpleType>)
Attributes
  • name
  • hla:nameNotes
  • hla:size
  • hla:sizeNotes
  • hla:interpretation
  • hla:interpretationNotes
  • hla:endian
  • hla:endianNotes
  • hla:encoding
  • hla:encodingNotes
Content
(XML Schema Simple Content)
HLA simple datatypes may be represented using the XML Schema xs:simpleType.

Enumerated Datatypes (<xs:simpleType>)
Attributes
  • name
  • hla:nameNotes
  • hla:representation
  • hla:representationNotes
  • hla:semantics
  • hla:semanticsNotes
Content
(XML Schema Enumerated Content)
Enumerated types are datatypes that can take a finite set of discrete values. MORPH declares these using XML Schema enumerated types, which are derived from a simple type (usually xs:string) through restriction.

Array Datatypes (<xs:complexType>)
Attributes
  • name
  • hla:nameNotes
  • hla:dataType
  • hla:dataTypeNotes
  • hla:cardinality
  • hla:cardinalityNotes
  • hla:encoding
  • hla:encodingNotes
  • hla:semantics
  • hla:semanticsNotes
Content
(XML Schema Complex Content)
Arrays are sequences of elements of the same underlying datatype. Arrays (or sequences) are defined as indexed homogenous collections of datatypes. In XML, an array of characters is a string and is easily utilized. More complicated arrays make use of repeated groups of nested elements.

Record Datatypes (<xs:complexType>)
Attributes
  • name
  • hla:nameNotes
  • hla:encoding
  • hla:encodingNotes
  • hla:semantics
  • hla:semanticsNotes
Content
(XML Schema Simple Content)
Records consist of a variable number of fields that are of different types: simple, basic, variant, or other fixed records. In XML, these are represented using nested elements. The leaf node's data is always represented using attributes.

Variant Record Datatypes (<xs:complexType>)
Attributes
  • name
  • hla:nameNotes
  • hla:encoding
  • hla:encodingNotes
  • hla:semantics
  • hla:semanticsNotes
Content
(XML Schema Union Content)
Variant record types define discriminated unions of types. XML Schema provides a xs:union type which can be used for this purpose.