OSys-XER differs from (BASIC-)XER in the following ways:
OSys-XER uses an XSD list (a space-delimited list of strings) to represent a SEQUENCE OF X, where X is any of the following types: BOOLEAN, ENUMERATED, GeneralizedTime, INTEGER, OBJECT IDENTIFIER, OCTET STRING, REAL, RELATIVE-OID, or UTCTime. Similarly, a BIT STRING with named bits is encoded as an XSD list (consisting of the named bit identifiers).
For example, the ASN.1 specification “A ::= SEQUENCE OF INTEGER” with value “{ 1 2 3 }” would produce the following encoding in XER:
<A><INTEGER>1</INTEGER><INTEGER>2</INTEGER><INTEGER>3</INTEGER></A>
in OSys-XER, it would be the following:
<A>1 2 3</A>
The OSys-XER encoding for a SEQUENCE OF CHOICE wraps each repetition in an element. In XER, each occurrence of the CHOICE is an XML element and it is not further wrapped.
For example, given MyType ::= SEQUENCE OF CHOICE { a A, b B }
,
XER might produce a sequence of <a> and <b> elements, while OSys-XER will produce
a series of <CHOICE> elements, or, if the CHOICE type were named MyChoice
,
a series of <MyChoice> elements.
The values of the BOOLEAN data type are expressed as the lower case words “true” or “false” with no delimiters. In XER, the values are <true/> and <false/>.
Enumerated token values are expressed as the identifiers themselves instead of as empty XML elements (i.e. elements wrapped in ‘< />’). For example, a value of the ASN.1 type “Colors ::= ENUMERATED { red, blue, green }” equal to “red” would simply be “<color>red</color>” instead of “<color><red/></color>”.
The special REAL values <NOT-A-NUMBER/>, <PLUS-INFINITY/> and <MINUS-INFINITY/> are represented as NaN, INF and -INF, respectively.
GeneralizedTime and UTCTime values are transformed into the XSD representation for dateTime (YYYY-MMDDTHH: MM:SS[.SSSS][(Z|(+|-)HH:MM)]) when encoded to XML. When an XML document is decoded, the time format is transformed into the ASN.1 format.
When encoding/decoding a type as the root element of an XML document, OSys-XER will typically give the root element name a lowercase first letter. By contrast, XER uses the NonParameterizedTypeName, which will have an uppercase first letter, for the root element.