5.7.1 General
A client SHALL declare acceptable media types using the HTTP Accept header.
5.7.2 Schema version negotiation
The extensibility level defines the base schema and its capability for arbitrary extension. The extensibility level is one of “-S1” or “+S1”. The S1 indicates the base schema version: IEEE Std 2030.5-2018. “-S1” indicates the node does not accept arbitrary tags that are not defined in the base schema, and “+S1” indicates it accepts arbitrary tags. A node with “-S1” will likely fail on an EXI document using arbitrary types, elements, and attributes that are not defined in the schema used for encoding. Devices SHALL NOT send messages to nodes that declare “-S1” using arbitrary types, elements, and attributes.
The grammar used for EXI SHALL be generated as a non-strict grammar only, as having both strict and non-strict grammars would put a large burden on storage requirements for certain devices. The use of a non-strict grammar allows for extensions without schema modification. An invalid (i.e., not defined in the schema) part of an EXI document is allowed in a non-strict grammar and can carry arbitrary tags, attributes, and text encoded using the built-in grammar.
Due to strict memory constraints, some nodes may not be able to parse invalid parts of an EXI document encoded using the built-in grammar. To avoid such errors, a node may declare its inability to receive arbitrary extensions using the “-” (minus) prefix in the extensibility level. Alternatively, nodes that declare the “+” (plus) prefix in the extensibility level will be able to parse extended parts of an EXI document.
Note that the extensibility level does not indicate whether the node can process the data, but only whether it can parse the data.
The format of the extensibility level is “(-/+)Sn” where n is a character to describe base schema version (currently “1”). As extensions of IEEE 2030.5 schemas are intended to be backward compatible, a node
that declares schemaId “S[i]” is intended to be compatible with all versions between “S1” and “S[i]”. However, an “S1” implementation is not backward compatible with an “S0” (IEEE 2030.5-2013) implementation.
For example:
Accept: application/sep-exi; level=-S1
indicates that the client wishes to receive content encoded using EXI where the base schema of the client is IEEE 2030.5-2018 and that the client does not accept arbitrary tags not defined in the schema.
A client SHOULD use the extensibility level discovered during resource discovery to determine if a server accepts non-strict parts of an EXI document prior to initiating PUT/POST operations where the content contains extended attributes/elements. A server SHOULD use the extensibility level specified in the Accept header to determine if a client accepts non-strict parts of an EXI document prior to responding to GET operations where the content contains extended attributes/elements.