LeftHandSide : Terminal NonTerminal |
LeftHandSide : | |||
Terminal 1 NonTerminal 1 | EventCode 1 | ||
Terminal 2 NonTerminal 2 | EventCode 2 | ||
Terminal 3 NonTerminal 3 | EventCode 3 | ||
... | |||
Terminal n NonTerminal n | EventCode n |
Wildcard | Definition |
---|---|
SE (*) | The terminal symbol that matches a start element (SE) event with any qname. |
SE (uri : *) | The terminal symbol that matches a start element (SE) event with any local-name in namespace uri. |
AT (*) | The terminal symbol that matches an attribute (AT) event with any qname. |
AT (uri : *) | The terminal symbol that matches an attribute (AT) event with any local-name in namespace uri. |
Prefix | Namespace Name |
---|---|
exi | http://www.w3.org/2009/exi |
xsd | http://www.w3.org/2001/XMLSchema |
xsi | http://www.w3.org/2001/XMLSchema-instance |
EXI Event Type | Event Content (Content Items) | Grammar Notation (Terminal Symbols) | Information Item |
---|---|---|---|
Start Document | SD | B.1 Document Information Item | |
End Document | ED | ||
Start Element | qname | SE ( qname ) | B.2 Element Information Items |
SE ( * ) | |||
SE ( uri : * ) | |||
End Element | EE | ||
Attribute | qname, value | AT ( qname ) | B.3 Attribute Information Item |
AT ( * ) | |||
AT ( uri : * ) | |||
Characters | value | CH | B.6 Character Information item |
Namespace Declaration | uri , prefix , local-element-ns | NS | B.11 Namespace Information Item |
Comment | text | CM | B.7 Comment Information item |
Processing Instruction | name, text | PI | B.4 Processing Instruction Information Item |
DOCTYPE | name, public, system, text | DT | B.8 Document Type Declaration Information item |
Entity Reference | name | ER | B.5 Unexpanded Entity Reference Information item |
Self Contained | SC |
Content item | Used in | Datatype representation |
---|---|---|
name | PI, DT, ER | 7.1.10 String |
prefix | NS | 7.1.10 String |
local-element-ns | NS | 7.1.2 Boolean |
public | DT | 7.1.10 String |
qname | SE, AT | 7.1.7 QName |
system | DT | 7.1.10 String |
text | CM, PI, DT | 7.1.10 String |
uri | NS | 7.1.10 String |
value | CH, AT | According to the schema datatype (see 7. Representing Event Content) if any is in effect, otherwise 7.1.10 String |
[ EXI Cookie ] | Distinguishing Bits | Presence Bit | EXI Format | [EXI Options] | [Padding Bits] |
for EXI Options | Version |
' $ ' | ' E ' | ' X ' | ' I ' |
1 | 0 |
EXI Format Version Field | Description |
---|---|
1 0000 | Preview version 1 |
0 0000 | Final version 1 |
0 1110 | Final version 15 |
0 1111 0000 | Final version 16 |
0 1111 0001 | Final version 17 |
EXI Option | Description | Default Value |
---|---|---|
alignment | Alignment of event codes and content items | bit-packed |
compression | EXI compression is used to achieve better compactness | false |
strict | Strict interpretation of schemas is used to achieve better compactness | false |
fragment | Body is encoded as an EXI fragment instead of an EXI document | false |
preserve | Specifies whether the support for the preservation of comments, pis, etc. is each enabled | all false |
selfContained | Enables self-contained elements | false |
schemaId | Identify the schema information, if any, used to encode the body | no default value |
datatypeRepresentationMap | Specify alternate datatype representations for typed values in the EXI body | no default value |
blockSize | Specifies the block size used for EXI compression | 1,000,000 |
valueMaxLength | Specifies the maximum string length of value content items to be considered for addition to the string table. | unbounded |
valuePartitionCapacity | Specifies the total capacity of value partitions in a string table | unbounded |
[user defined meta-data] | User defined meta-data may be added | no default value |
<header xmlns="http://www.w3.org/2009/exi"> <strict/> </header>Note that this specification does not require EXI processors to read and process the schema prescribed for EXI options document (C XML Schema for EXI Options Document), in order to process EXI options documents. EXI processors MUST use the schema-informed grammars that stem from the schema in processing EXI options documents, beyond which there is no requirement as to the use of the schema, and implementations are free to use any methods to retrieve the instructions that observe the grammars for processing EXI options documents. Section 8.5 Schema-informed Grammars describes the system to derive schema-informed grammars from XML Schemas. Below is a brief description of each EXI option. [Definition:] The alignment option is used to control the alignment of event codes and content items. The value is one of bit-packed, byte-alignmentorpre-compression, of which bit-packed is the default value assumed when the "alignment" element is absent in the EXI Options document. The option values byte-alignment and pre-compression are effected when "byte" and "pre-compress" elements are present in the EXI Options document, respectively. When the value of compression option is set to true, alignment of the EXI Body is governed by the rules specified in 9. EXI Compression instead of the alignment option value. The "alignment" element MUST NOT appear in an EXI options document when the "compression" element is present. [Definition:] The alignment option value bit-packed indicates that the event codes and associated content are packed in bits without any padding in-between. [Definition:] The alignment option value byte-alignment indicates that the event codes and associated content are aligned on byte boundaries. While byte-alignment generally results in EXI streams of larger sizes compared with their bit-packed equivalents, byte-alignment may provide a help in some use cases that involve frequent copying of large arrays of scalar data directly out of the stream. It can also make it possible to work with data in-place and can make it easier to debug encoded data by allowing items on aligned boundaries to be easily located in the stream. [Definition:] The alignment option value pre-compression indicates that all steps involved in compression (see section 9. EXI Compression) are to be done with the exception of the final step of applying the DEFLATE algorithm. The primary use case of pre-compression is to avoid a duplicate compression step when compression capability is built into the transport protocol. In this case, pre-compression just prepares the stream for later compression. [Definition:] The compression option is a Boolean used to increase compactness using additional computational resources. The default value "false" is assumed when the "compression" element is absent in the EXI Options document whereas its presence denotes the value "true". When set to true, the event codes and associated content are compressed according to 9. EXI Compression regardless of the alignment option value. As mentioned above, the "compression" element MUST NOT appear in an EXI options document when the "alignment" element is present. [Definition:] The strict option is a Boolean used to increase compactness by using a strict interpretation of the schemas and omitting preservation of certain items, such as comments, processing instructions and namespace prefixes. The default value "false" is assumed when the "strict" element is absent in the EXI Options document whereas its presence denotes the value "true". When set to true, those productions that have NS, CM, PI, ER, and SC terminal symbols are omitted from the EXI grammars, and schema-informed element and type grammars are restricted to only permit items declared in the schemas. A note in section 8.5.4.4.2 Adding Productions when Strict is True describes some additional restrictions consequential of the use of this option. The "strict" element MUST NOT appear in an EXI options document when one of "dtd", "prefixes", "comments", "pis" or "selfContained" element is present in the same options document. [Definition:] The fragment option is a Boolean that indicates whether the EXI body is an EXI document or an EXI fragment. When set to true, the EXI body is an EXI fragment. Otherwise, the EXI body is an EXI document. The default value "false" is assumed when the "fragment" element is absent in the EXI Options document whereas its presence denotes the value "true". [Definition:] The preserve option is a set of Booleans that can be set independently to each enable or disable a share of the format's capacity determining whether or how certain information items can be preserved in the EXI stream. Section 6.3 Fidelity Options describes the set of information items affected by the preserve option. The presence of "dtd", "prefixes", "lexicalValues", "comments" and "pis" in the EXI Options document each turns on fidelity options Preserve.comments, Preserve.pis, Preserve.dtd, Preserve.prefixes and Preserve.lexicalValues whereas the absence denotes turning each off. The elements "dtd", "prefixes", "comments" and "pis" MUST NOT appear in an EXI options document when the "strict" element is present in the same options document. The element "lexicalValues", on the other hand, is permitted to occur in the presence of "strict" element. [Definition:] The selfContained option is a Boolean used to enable the use of self-contained elements in the EXI stream. Self-contained elements may be read independently from the rest of the EXI body, allowing them to be indexed for random access. The "selfContained" element MUST NOT appear in an EXI options document when one of "compression", "pre-compression" or "strict" elements are present in the same options document. The default value "false" is assumed when the "selfContained" element is absent from the EXI Options document whereas its presence denotes the value "true". [Definition:] The schemaId option may be used to identify the schema information used for processing the EXI body. When the "schemaId" element in the EXI options document contains the xsi:nil attribute with its value set to true, no schema information is used for processing the EXI body (i.e. a schema-less EXI stream). When the value of the "schemaId" element is empty, no user defined schema information is used for processing the EXI body; however, the built-in XML schema types are available for use in the EXI body. When the schemaId option is absent (i.e., undefined), no statement is made about the schema information used to encode the EXI body and this information MUST be communicated out of band. This specification does not dictate the syntax or semantics of other values specified in this field. An example schemaId scheme is the use of URI that is apt for globally identifying schema resources on the Web. The parties involved in the exchange are free to agree on the scheme of schemaId field that is appropriate for their use to uniquely identify the schema information. [Definition:] The datatypeRepresentationMap option specifies an alternate set of datatype representations for typed values in the EXI body as described in 7.4 Datatype Representation Map. When there are no "datatypeRepresentationMap" elements in the EXI Options document, no Datatype Representation Map is used for processing the EXI body. This option does not take effect when the value of the Preserve.lexicalValues fidelity option is true (see 6.3 Fidelity Options), or when the EXI stream is a schema-less EXI stream. [Definition:] The blockSize option specifies the block size used for EXI compression. When the "blockSize" element is absent in the EXI Options document, the default blocksize of 1,000,000 is used. The default blockSize is intentionally large but can be reduced for processing large documents on devices with limited memory. [Definition:] The valueMaxLength option specifies the maximum length of value content items to be considered for addition to the string table. The default value "unbounded" is assumed when the "valueMaxLength" element is absent in the EXI Options document. [Definition:] The valuePartitionCapacity option specifies the maximum number of value content items in the string table at any given time. The default value "unbounded" is assumed when the "valuePartitionCapacity" element is absent in the EXI Options document. Section 7.3.3 Partitions Optimized for Frequent use of String Literals specifies the behavior of the string table when this capacity is reached. [Definition:] The user defined meta-data conveys auxiliary information that applications may use to facilitate interpretation of the EXI stream. The user defined meta-data MUST NOT be interpreted in a way that alters or extends the EXI data format defined in this specification. User defined meta-data may be added to an EXI Options document just prior to the alignment option.
SC | NS | NS | ... | NS | AT (xsi:type) | AT (xsi:nil) | AT | AT | ... | AT |
Syntax | Event Code | ||
---|---|---|---|
DocContent | |||
SE ("A") DocEnd | 0 | ||
SE ("B") DocEnd | 1 | ||
SE ("C") DocEnd | 2 | ||
SE ("D") DocEnd | 3 | ||
SE (*) DocEnd | 4 | ||
DTDocContent | 5.0 | ||
CMDocContent | 5.1.0 | ||
PIDocContent | 5.1.1 |
Event | Part values | Event Code Encoding | # bits | ||
---|---|---|---|---|---|
SE ("A") | 0 | 000 | 3 | ||
SE ("B") | 1 | 001 | 3 | ||
SE ("C") | 2 | 010 | 3 | ||
SE ("D") | 3 | 011 | 3 | ||
SE (*) | 4 | 100 | 3 | ||
DT | 5 | 0 | 101 0 | 4 | |
CM | 5 | 1 | 0 | 101 1 0 | 5 |
PI | 5 | 1 | 1 | 101 1 1 | 5 |
# distinct values (m) | 6 | 2 | 2 | ||||
| 3 | 1 | 1 |
Event | Part values | Event Code Encoding | # bytes | ||
---|---|---|---|---|---|
SE ("A") | 0 | 00000000 | 1 | ||
SE ("B") | 1 | 00000001 | 1 | ||
SE ("C") | 2 | 00000010 | 1 | ||
SE ("D") | 3 | 00000011 | 1 | ||
SE (*) | 4 | 00000100 | 1 | ||
DT | 5 | 0 | 00000101 00000000 | 2 | |
CM | 5 | 1 | 0 | 00000101 00000001 00000000 | 3 |
PI | 5 | 1 | 1 | 00000101 00000001 00000001 | 3 |
# distinct values (m) | 6 | 2 | 2 | ||||
| 1 | 1 | 1 |
Fidelity option | Effect |
---|---|
Preserve.comments | CM events can be preserved |
Preserve.pis | PI events can be preserved |
Preserve.dtd | DT and ER events can be preserved |
Preserve.prefixes | NS events and namespace prefixes can be preserved |
Preserve.lexicalValues | Lexical form of element and attribute values can be preserved in value content items |
Built-in EXI Datatype Representation | EXI Datatype ID | XML Schema Datatypes | |
---|---|---|---|
Binary | exi:base64Binary | base64Binary | |
exi:hexBinary | hexBinary | ||
Boolean | exi:boolean | boolean | |
Date-Time | exi:dateTime | dateTime | |
exi:time | time | ||
exi:date | date | ||
exi:gYearMonth | gYearMonth | ||
exi:gYear | gYear | ||
exi:gMonthDay | gMonthDay | ||
exi:gDay | gDay | ||
exi:gMonth | gMonth | ||
Decimal | exi:decimal | decimal | |
Float | exi:double | float, double | |
Integer | exi:integer | integer | |
String | exi:string | string, anySimpleType and all types derived by union | |
n-bit Unsigned Integer | Not associated with any datatype directly, but used by Integer datatype representation for some bounded integers (see 7.1.5 Integer) | ||
Unsigned Integer | Not associated with any datatype directly, but used by Integer datatype representation for unsigned integers (see 7.1.5 Integer) | ||
List | All types derived by list, including NMTOKENS, IDREFS and ENTITIES | ||
QName | xsi:type attribute values when Preserve.lexicalValues option value is false |
EXI Datatype ID | Restricted Character Set |
---|---|
exi:base64Binary | { #x9, #xA, #xD, #x20, +, /, [0-9], =, [A-Z], [a-z] } |
exi:hexBinary | { #x9, #xA, #xD, #x20, [0-9], [A-F], [a-f] } |
exi:boolean | { #x9, #xA, #xD, #x20, 0, 1, a, e, f, l, r, s, t, u } |
exi:dateTime | { #x9, #xA, #xD, #x20, +, -, ., [0-9], :, T, Z } |
exi:time | |
exi:date | |
exi:gYearMonth | |
exi:gYear | |
exi:gMonthDay | |
exi:gDay | |
exi:gMonth | |
exi:decimal | { #x9, #xA, #xD, #x20, +, -, ., [0-9] } |
exi:double | { #x9, #xA, #xD, #x20, +, -, ., [0-9], E, F, I, N, a, e } |
exi:integer | { #x9, #xA, #xD, #x20, +, -, [0-9] } |
Component | Value | Type |
---|---|---|
Year | Offset from 2000 | Integer ( 7.1.5 Integer) |
MonthDay | Month * 32 + Day | 9-bit Unsigned Integer (7.1.9 n-bit Unsigned Integer) where day is a value in the range 1-31 and month is a value in the range 1-12. |
Time | ((Hour * 64) + Minutes) * 64 + seconds | 17-bit Unsigned Integer (7.1.9 n-bit Unsigned Integer) |
FractionalSecs | Fractional seconds | Unsigned Integer ( 7.1.6 Unsigned Integer) representing the fractional part of the seconds with digits in reverse order to preserve leading zeros |
TimeZone | TZHours * 64 + TZMinutes | 11-bit Unsigned Integer (7.1.9 n-bit Unsigned Integer) representing a signed integer offset by 896 ( = 14 * 64 ) |
presence | Boolean presence indicator | Boolean (7.1.2 Boolean) |
XML Schema Datatype | Included Components |
---|---|
gYearXS2 | Year, presence, [TimeZone] |
gYearMonthXS2 | Year, MonthDay, presence, [TimeZone] |
dateXS2 | |
dateTimeXS2 | Year, MonthDay, Time, presence, [FractionalSecs], presence, [TimeZone] |
gMonthXS2 | MonthDay, presence, [TimeZone] |
gMonthDayXS2 | |
gDayXS2 | |
timeXS2 | Time, presence, [FractionalSecs], presence, [TimeZone] |
<exi:datatypeRepresentationMap xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:decimal/> <exi:string/> </exi:datatypeRepresentationMap>It is the responsibility of an EXI processor to interface with a particular implementation of built-in EXI datatype representations or user-defined datatype representations properly. In the example above, an EXI processor may need to provide a string value of the data being processed that is typed as xsd:decimal in order to interface with an implementation of built-in String datatype representation. In such a case, some EXI processors may have started with a decimal value and such processors may well translate the value into a string before passing the data to the implementation of built-in String datatype representation while other EXI processors may already have a string value of the data so that it can pass the value directly to the implementation of built-in String datatype representation without any translation. As another example, the following "datatypeRepresentationMap" element indicates all values of the used-defined simple type geo:geometricSurface and the datatypes derived from it by restriction are represented using the user-defined datatype representation geo:geometricInterpolator: Example 7-3. datatypeRepresentationMap illustrating a user-defined type represented by a user-defined datatype representation
<exi:datatypeRepresentationMap xmlns:geo="http://example.com/Geometry"> <geo:geometricSurface/> <geo:geometricInterpolator/> </exi:datatypeRepresentationMap>Note: EXI only defines a way to indicate the use of user-defined datatype representations for representing values of specific datatypes. Datatype representations are referred to by their respective qnames in "datatypeRepresentationMap" elements. A datatype representation is omnipresent only if its qname is one of those that represent built-in EXI datatype representations. For datatype representations of other qnames, EXI does not provide nor suggest a method by which they are identified and shared between EXI Processors. This suggests that the use of user-defined (i.e. custom) datatype representations needs to be restrained by weighing alternatives and considering the consequences of each in pros and cons, in order to avoid unruly proliferation of documents that use such datatype representations. Those applications that ever find Datatype Representation Map useful should make sure that they exchange such documents only among the parties that are pre-known or discovered to be able to process the user-defined datatype representations that are in use. Otherwise, if it is not for certain if a receiver understands the particular user-defined datatype representations, the sender should never attempt to send documents that use user-defined datatype representations to that recipient.
Productions | Event Codes | ||
---|---|---|---|
LeftHandSide 1 : | |||
Terminal 1 NonTerminal 1 | 0 | ||
Terminal 2 NonTerminal 2 | 1 | ||
Terminal 3 NonTerminal 3 | 2.0 | ||
Terminal 4 NonTerminal 4 | 2.1 | ||
Terminal 5 NonTerminal 5 | 2.2.0 | ||
Terminal 6 NonTerminal 6 | 2.2.1 | ||
LeftHandSide 2 : | |||
Terminal 1 NonTerminal 1 | 0 | ||
Terminal 2 NonTerminal 2 | 1.0 | ||
Terminal 3 NonTerminal 3 | 1.1 |
ABigProduction 1 : | |||
Terminal 1 NonTerminal 1 | 0 | ||
Terminal 2 NonTerminal 2 | 1 | ||
LEFTHANDSIDE 1 (2.0) | 2.0 | ||
ABigProduction 2 : | |||
Terminal 1 NonTerminal 1 | 0 | ||
LEFTHANDSIDE 1 (1.1) | 1.1 | ||
Terminal 2 NonTerminal 2 | 1.2 |
LEFTHANDSIDE 1 (n.m) : | |||
TERMINAL 1 NONTERMINAL 1 | n.0 | ||
TERMINAL 2 NONTERMINAL 2 | n.1 | ||
TERMINAL 3 NONTERMINAL 3 | n. m+2 | ||
TERMINAL 4 NONTERMINAL 4 | n. m+3 | ||
TERMINAL 5 NONTERMINAL 5 | n. m+4.0 | ||
TERMINAL 6 NONTERMINAL 6 | n. m+4.1 |
ABigProduction 1 : | ||||
Terminal 1 NonTerminal 1 | 0 | |||
Terminal 2 NonTerminal 2 | 1 | |||
TERMINAL 1 NONTERMINAL 1 | 2.0 | |||
TERMINAL 2 NONTERMINAL 2 | 2.1 | |||
TERMINAL 3 NONTERMINAL 3 | 2.2 | |||
TERMINAL 4 NONTERMINAL 4 | 2.3 | |||
TERMINAL 5 NONTERMINAL 5 | 2.4.0 | |||
TERMINAL 6 NONTERMINAL 6 | 2.4.1 | |||
ABigProduction 2 : | ||||
Terminal 1 NonTerminal 1 | 0 | |||
TERMINAL 1 NONTERMINAL 1 | 1.0 | |||
TERMINAL 2 NONTERMINAL 2 | 1.1 | |||
Terminal 2 NonTerminal 2 | 1.2 | |||
TERMINAL 3 NONTERMINAL 3 | 1.3 | |||
TERMINAL 4 NONTERMINAL 4 | 1.4 | |||
TERMINAL 5 NONTERMINAL 5 | 1.5.0 | |||
TERMINAL 6 NONTERMINAL 6 | 1.5.1 |
ElementContent : | ||||
EE | 0 | |||
SE (*) ElementContent | 1.0 | |||
CH ElementContent | 1.1 | |||
ER ElementContent | 1.2 | |||
CM ElementContent | 1.3.0 | |||
PI ElementContent | 1.3.1 |
ElementContent : | |||
EE | 0 | ||
SE (*) ElementContent | 1.0 | ||
CH ElementContent | 1.1 | ||
ER ElementContent | 1.2 | ||
CM ElementContent | 1.3.0 | ||
PI ElementContent | 1.3.1 |
ElementContent : | ||||
EE | 0 | |||
SE (*) ElementContent | 1.0 | |||
CH ElementContent | 1.1 |
Syntax | Event Code | ||
---|---|---|---|
Document : | |||
SDDocContent | 0 | ||
DocContent : | |||
SE (*) DocEnd | 0 | ||
DTDocContent | 1.0 | ||
CMDocContent | 1.1.0 | ||
PIDocContent | 1.1.1 | ||
DocEnd : | |||
ED | 0 | ||
CMDocEnd | 1.0 | ||
PIDocEnd | 1.1 |
Semantics: | |
---|---|
All productions in the built-in document grammars of the form LeftHandSide : SE (*) RightHandSide are evaluated as follows:
|
Syntax | Event Code | ||
---|---|---|---|
Fragment : | |||
SDFragmentContent | 0 | ||
FragmentContent : | |||
SE (*) FragmentContent | 0 | ||
ED | 1 | ||
CMFragmentContent | 2.0 | ||
PIFragmentContent | 2.1 |
Semantics: | |
---|---|
All productions in the built-in fragment grammars of the form LeftHandSide : SE (*) RightHandSide are evaluated as follows:
All productions of the form LeftHandSide : SE (qname) RightHandSide that were previously added to the grammar upon the first occurrence of the element that has the qname qname are evaluated as follows when they are matched:
|
Syntax | Event Code | ||
---|---|---|---|
StartTagContent : | |||
EE | 0.0 | ||
AT (*) StartTagContent | 0.1 | ||
NSStartTagContent | 0.2 | ||
SCFragment | 0.3 | ||
ChildContentItems (0.4) | |||
ElementContent : | |||
EE | 0 | ||
ChildContentItems (1.0) | |||
ChildContentItems (n.m) : | |||
SE (*) ElementContent | n. m | ||
CHElementContent | n.(m+1) | ||
ERElementContent | n.(m+2) | ||
CMElementContent | n.(m+3).0 | ||
PIElementContent | n.(m+3).1 |
Note: |
---|
|
|
|
Semantics: | |
---|---|
All productions in the built-in element grammar of the form LeftHandSide: AT (*) RightHandSide are evaluated as follows:
The production of the form LeftHandSide : AT (xsi:type) RightHandSide that was previously added to the grammar upon the first occurrence of the xsi:type attribute is evaluated as follows when it is matched:
All productions of the form LeftHandSide : SC Fragment are evaluated as follows:
All productions in the built-in element grammar of the form LeftHandSide : SE (*) RightHandSide are evaluated as follows:
All productions of the form LeftHandSide : SE (qname) RightHandSide that were previously added to the grammar upon the first occurrence of the element that has the qname qname are evaluated as follows when they are matched:
All productions in the built-in element grammar of the form LeftHandSide : CH RightHandSide are evaluated as follows:
All productions in the built-in element grammar of the form LeftHandSide : EE are evaluated as follows:
|
Syntax | Event Code | ||||
---|---|---|---|---|---|
Document : | |||||
SDDocContent | 0 | ||||
DocContent : | |||||
SE (G0) DocEnd | 0 | ||||
SE (G1) DocEnd | 1 | ||||
⋮ | ⋮ | ||||
SE (Gn−1) DocEnd | n−1 | ||||
SE (*) DocEnd | n | ||||
DTDocContent | (n+1).0 | ||||
CMDocContent | (n+1).1.0 | ||||
PIDocContent | (n+1).1.1 | ||||
| |||||
| |||||
DocEnd : | |||||
ED | 0 | ||||
CMDocEnd | 1.0 | ||||
PIDocEnd | 1.1 |
Semantics: | |
---|---|
In a schema-informed grammar, all productions of the form LeftHandSide : SE (*) RightHandSide are evaluated as follows:
|
Syntax | Event Code | ||||
---|---|---|---|---|---|
Fragment : | |||||
SDFragmentContent | 0 | ||||
FragmentContent : | |||||
SE (F0) FragmentContent | 0 | ||||
SE (F1) FragmentContent | 1 | ||||
⋮ | ⋮ | ||||
SE (Fn−1) FragmentContent | n−1 | ||||
SE (*) FragmentContent | n | ||||
ED | n+1 | ||||
CMFragmentContent | (n+2).0 | ||||
PIFragmentContent | (n+2).1 | ||||
| |||||
|
Semantics: | |
---|---|
In a schema-informed grammar, all productions of the form LeftHandSide : SE (*) RightHandSide are evaluated as follows:
|
Syntax | Event Code | ||||
---|---|---|---|---|---|
ElementFragment 0 : | |||||
AT ( A 0 ) [schema-typed value] ElementFragment 0 | 0 | ||||
AT ( A 1 ) [schema-typed value] ElementFragment 0 | 1 | ||||
⋮ | ⋮ | ||||
AT ( A n−1 ) [schema-typed value] ElementFragment 0 | n−1 | ||||
AT ( * ) ElementFragment 0 | n | ||||
SE ( F0 ) ElementFragment 2 | n+1 | ||||
SE ( F1 ) ElementFragment 2 | n+2 | ||||
⋮ | ⋮ | ||||
SE ( Fm-1 ) ElementFragment 2 | n+m | ||||
SE ( * ) ElementFragment 2 | n+m+1 | ||||
EE | n+m+2 | ||||
CH [untyped value] ElementFragment 2 | n+m+3 | ||||
ElementFragment 1 : | |||||
SE ( F0 ) ElementFragment 2 | 0 | ||||
SE ( F1 ) ElementFragment 2 | 1 | ||||
⋮ | ⋮ | ||||
SE ( Fm-1 ) ElementFragment 2 | m-1 | ||||
SE ( * ) ElementFragment 2 | m | ||||
EE | m+1 | ||||
CH [untyped value] ElementFragment 2 | m+2 | ||||
ElementFragment 2 : | |||||
SE ( F0 ) ElementFragment 2 | 0 | ||||
SE ( F1 ) ElementFragment 2 | 1 | ||||
⋮ | ⋮ | ||||
SE ( Fm-1 ) ElementFragment 2 | m-1 | ||||
SE ( * ) ElementFragment 2 | m | ||||
EE | m+1 | ||||
CH [untyped value] ElementFragment 2 | m+2 | ||||
ElementFragmentTypeEmpty 0 : | |||||
AT ( A0 ) [schema-typed value] ElementFragmentTypeEmpty 0 | 0 | ||||
AT ( A1 ) [schema-typed value] ElementFragmentTypeEmpty 0 | 1 | ||||
⋮ | ⋮ | ||||
AT ( An−1 ) [schema-typed value] ElementFragmentTypeEmpty 0 | n−1 | ||||
AT ( * ) ElementFragmentTypeEmpty 0 | n | ||||
EE | n+1 | ||||
ElementFragmentTypeEmpty 1 : | |||||
EE | 0 | ||||
| |||||
|
Semantics: | |
---|---|
In a schema-informed grammar, all productions of the form LeftHandSide : SE (*) RightHandSide are evaluated as follows:
All productions in the schema-informed element fragment grammar of the form LeftHandSide: AT (*) RightHandSide are evaluated as follows:
Note: |
LeftHandSide : | ||
RightHandSide |
Grammar L ⊕ Grammar R |
Grammar Lk : | ||
EE |
Grammar Lk : | ||
Grammar R0 |
Syntax: | ||
---|---|---|
Element i , 0 : | ||
Type j , 0 | ||
Syntax: | ||
---|---|---|
Type i, 0 : | ||
CH [schema-typed value] Type i, 1 | ||
Type i, 1 : | ||
EE | ||
TypeEmpty i, 0 : | ||
EE | ||
Note: | |
---|---|
Productions of the form LeftHandSide : CH [schema-typed value] RightHandSide represent typed character data that can be represented using the EXI datatype representation associated with the simple type definition (see 7. Representing Event Content). Character data that can be represented using the EXI datatype representation associated with the simple type definition SHOULD be represented this way. Character data that is not represented using the EXI datatype representation associated with the simple type definition is represented by productions of the form LeftHandSide : CH [untyped value] RightHandSide described in section 8.5.4.4 Undeclared Productions. |
G n−1, 0 : | ||
EE |
G i, 0 : | ||
AT (*) G i, 0 |
G i, 0 : | |||||
AT(urix : *) G i, 0 | |||||
where urix is a member value of {namespace constraint}, provided that it is the empty string (i.e. "") that is used as urix when the member value is the special value absent. Each uri x is used to augment the uri partition of the String table. Section 7.3.1 String Table Partitions describes how these uri strings are put into String table for pre-population. | |||||
| |||||
Note: |
TypeEmpty i = G 0 ⊕ G 1 ⊕ … ⊕ G n−1 ⊕ Content i |
Content i, 0 : | ||
EE |
Content i : | ||
EE |
Content i, j : | ||
CH [untyped value] Content i, j |
Note: | |
---|---|
The value of each Characters event that has an [untyped value] is represented as a String (see 7.1.10 String). |
Type i = H 0 ⊕ H 1 ⊕ … ⊕ H n−1 ⊕ Content i |
Type ur-type, 0 : | ||
AT (*) Type ur-type, 0 | ||
SE(*) Type ur-type, 1 | ||
EE | ||
CH Type ur-type, 1 | ||
Type ur-type, 1 : | ||
SE(*) Type ur-type, 1 | ||
EE | ||
CH Type ur-type, 1 | ||
TypeEmpty ur-type, 0 : | ||
AT (*) TypeEmpty ur-type, 0 | ||
EE | ||
TypeEmpty ur-type, 1 : | ||
EE | ||
Semantics: | |
---|---|
In a schema-informed grammar, all productions of the form LeftHandSide: AT (*) RightHandSide are evaluated as follows:
Note: In a schema-informed grammar, all productions of the form LeftHandSide : SE (*) RightHandSide are evaluated as follows:
|
Attribute i, 0 : | ||
AT(qname) [schema-typed value] Attribute i, 1 | ||
Attribute i, 1 : | ||
EE |
Attribute i, 0 : | ||
EE |
Note: | |
---|---|
Productions of the form LeftHandSide : AT(qname) [schema-typed value] RightHandSide represent typed attributes that occur in schema-valid contexts with values that can be represented using the EXI datatype representation associated with the attribute's {type definition} (see 7. Representing Event Content). Attributes that occur in schema-valid contexts that can be represented using the EXI datatype representation associated with the attribute's {type definition}, SHOULD be represented this way. Attributes that are not represented this way, are represented using the alternate forms of AT events described in section 8.5.4.4 Undeclared Productions. |
G 0 , G 1 , …, G {min occurs}-1 |
G {min occurs} , G {min occurs}+1 , …, G {max occurs}-1 |
G i, 0 : | ||
EE where {min occurs} ≤ i < {max occurs} |
Particle i = G 0 ⊕ G 1 ⊕ … ⊕ G {max occurs}-1 |
G {min occurs}, k : | ||
EE |
G {min occurs}, k : | ||
G {min occurs}, 0 |
G {min occurs}, 0 : | ||
EE |
Particle i = G 0 ⊕ G 1 ⊕ … ⊕ G {min occurs} |
Syntax: | ||
---|---|---|
ParticleTerm i, 0 : | ||
SE(qname 0 ) ParticleTerm i, 1 | ||
SE(qname 1 ) ParticleTerm i, 1 | ||
⋮ | ||
SE(qname n−1 ) ParticleTerm i, 1 | ||
ParticleTerm i, 1 : | ||
EE | ||
Note: | ||
---|---|---|
In the productions above, qname x (where 0 ≤ x <n) represents a qname of which local-name and uri are {name} property and {target namespace} property of the element declaration E x , respectively. | ||
Semantics: | ||
---|---|---|
In a schema-informed grammar, all productions of the form LeftHandSide : SE(qname) RightHandSide are evaluated as follows:
|
ParticleTerm i, 1 : | ||
EE |
ParticleTerm i, 0 : | ||
SE(*) ParticleTerm i, 1 |
ParticleTerm i, 0 : | ||
SE(uri x : *) ParticleTerm i, 1 | ||
Semantics: | |
---|---|
In a schema-informed grammar, all productions of the form LeftHandSide : Terminal RightHandSide where Terminal is one of SE (*) or SE (uri x : *) are evaluated as follows:
|
ParticleTerm i, 0 : | ||
EE |
ParticleTerm i = Particle 0 ⊕ Particle 1 ⊕ … ⊕ Particle n−1 |
ParticleTerm i, 0 : | ||
EE |
ParticleTerm i, 0 : | ||
Particle 0, 0 | ||
Particle 1, 0 | ||
⋮ | ||
Particle n−1, 0 |
ParticleTerm i, 0 : | ||
EE |
Particle j , k : | ||
EE |
Particle j , k : | ||
ParticleTerm i, 0 |
ParticleTerm i, 0 : | ||
Particle 0, 0 | ||
Particle 1, 0 | ||
⋮ | ||
Particle n−1, 0 |
LeftHandSide : | ||
RightHandSide |
G i, j : | ||
G i, k where 0 ≤ j < n and 0 ≤ k < n |
G i, j : | ||
RHS(G i, k ) 0 | ||
RHS(G i, k ) 1 | ||
⋮ | ||
RHS(G i, k ) m-1 |
G i, j : | ||
G i, k where 0 ≤ j < n and 0 ≤ k < n |
G i, j : | ||
Terminal G i, k | ||
Terminal G i, l |
G i, j : | ||
Terminal G i, k ⊔ l |
G i, k ⊔ l : | ||
RHS(G i, k ) 0 | ||
RHS(G i, k ) 1 | ||
⋮ | ||
RHS(G i, k ) m-1 | ||
RHS(G i, l ) 0 | ||
RHS(G i, l ) 1 | ||
⋮ | ||
RHS(G i, l ) n−1 |
G i, j : | ||
Terminal G i, k | ||
Terminal G i, l |
G i, j : | ||
Terminal G i, k | ||
Terminal G i, k |
Productions | Event Code | |
---|---|---|
P 0 | 0 | |
P 1 | 1 | |
⋮ | ⋮ | |
P n−1 | n−1 |
Notation | Definition |
---|---|
AT (qname) [untyped value] | Terminal symbol that matches an attribute event with qname qname and an untyped value. |
AT (*) [untyped value] | Terminal symbol that matches an attribute event with any qname and an untyped value. |
CH [untyped value] | Terminal symbol that matches a characters event with an untyped value. |
Syntax | Event Code | ||
---|---|---|---|
Element i, j : | |||
EE | n.m | ||
where n.m represents the next available event code with length 2. | |||
Syntax | Event Code | ||
---|---|---|---|
Element i, 0 : | |||
AT(xsi:type) Element i, 0 | n.m | ||
AT(xsi:nil) Element i, 0 | n.(m+1) | ||
where n.m represents the next available event code with length 2. | |||
Note: | |
---|---|
When xsi:type and/or xsi:nil attributes appear in an element where schema-informed grammars are in effect, they MUST occur before any other attribute events of the same element, with xsi:type placed before xsi:nil when they both occur. | |
Semantics: | |
---|---|
All productions of the form LeftHandSide : AT (xsi:type) RightHandSide are evaluated as follows:
| |
In a schema-informed grammar, all productions of the form LeftHandSide : AT (xsi:nil) RightHandSide are evaluated as follows:
|
Element i, j : | ||
AT (qname 0 ) [schema-typed value] NonTerminal 0 | ||
AT (qname 1 ) [schema-typed value] NonTerminal 1 | ||
⋮ | ||
AT (qname x-1 ) [schema-typed value] NonTerminal x-1 |
Syntax | Event Code | ||
---|---|---|---|
Element i, j : | |||
AT (*) Element i, j | n.m | ||
AT (qname 0 ) [untyped value] NonTerminal 0 | n.(m+1).0 | ||
AT (qname 1 ) [untyped value] NonTerminal 1 | n.(m+1).1 | ||
⋮ | ⋮ | ||
AT (qname x-1 ) [untyped value] NonTerminal x-1 | n.(m+1).(x-1) | ||
AT (*) [untyped value] Element i, j | n.(m+1).(x) | ||
where n.m represents the next available event code with length 2. | |||
Note: | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||
| |||||||||||||||||
|
Semantics: | |
---|---|
In a schema-informed grammar,
all productions of the form LeftHandSide : AT (*) are evaluated as follows:
| |
Note: |
Syntax | Event Code | ||
---|---|---|---|
Element i, 0 : | |||
NSElement i, 0 | n.m | ||
where n.m represents the next available event code with length 2. | |||
Syntax | Event Code | ||
---|---|---|---|
Element i, 0 : | |||
SCFragment | n.m | ||
where n.m represents the next available event code with length 2. |
Semantics: | |
---|---|
All productions of the form LeftHandSide : SC Fragment are evaluated as follows:
|
Syntax | Event Code | ||
---|---|---|---|
Element i, j : | |||
SE (*) Element i, content2 | n.m | ||
CH [untyped value] Element i, content2 | n.(m+1) | ||
ERElement i, content2 | n.(m+2) | ||
CMElement i, content2 | n.(m+3).0 | ||
PIElement i, content2 | n.(m+3).1 | ||
where n.m represents the next available event code with length 2. | |||
Note: |
---|
|
Semantics: | |
---|---|
In a schema-informed grammar, all productions of the form LeftHandSide : SE (*) RightHandSide are evaluated as follows:
|
Syntax | Event Code | ||
---|---|---|---|
Element i, j : | |||
EE | n.m | ||
where n.m represents the next available event code with length 2. | |||
Syntax | Event Code | ||
---|---|---|---|
Element i, j : | |||
SE (*) Element i, j | n.m | ||
CH [untyped value] Element i, j | n.(m+1) | ||
ERElement i, j | n.(m+2) | ||
CMElement i, j | n.(m+3).0 | ||
PIElement i, j | n.(m+3).1 | ||
where n.m represents the next available event code with length 2. | |||
Semantics: | |
---|---|
In a schema-informed grammar, all productions of the form LeftHandSide : SE (*) RightHandSide are evaluated as follows:
|
Syntax | Event Code | ||
---|---|---|---|
Element i, 0 : | |||
AT(xsi:type) Element i, 0 | n.m | ||
where n.m represents the next available event code with length 2. | |||
Semantics: | |
---|---|
All productions of the form LeftHandSide : AT (xsi:type) RightHandSide are evaluated as follows: | |
|
Syntax | Event Code | ||
---|---|---|---|
Element i, 0 : | |||
AT(xsi:nil) Element i, 0 | n.m | ||
where n.m represents the next available event code with length 2. | |||
Semantics: | |
---|---|
In a schema-informed grammar, all productions of the form LeftHandSide : AT (xsi:nil) RightHandSide are evaluated as follows: | |
|
Note: | |
---|---|
| |
| |
| |
| |
| |
|
Property | EXI event types |
---|---|
[children] | CM* PI* DT? [SE, EE] |
[document element] | [SE, EE] |
[notations] | Computed based on text content item of DT to which each notation information set item maps. |
[unparsed entities] | Computed based on text content item of DT to which each unparsed entity information set item maps. |
[base URI] | The base URI of the EXI stream |
[character encoding scheme] | N/A |
[standalone] | Not available |
[version] | Not available |
[all declarations processed] | True if all declarations contained directly or indirectly in DT are processed, otherwise false, which is the processor quality as opposed to the information provided by the format. |
Property | EXI event types |
---|---|
[namespace name] | SE |
[local name] | SE |
[prefix] | SE |
[children] | [SE, EE]* PI* CM* CH* ER* |
[attributes] | AT* |
[namespace attributes] | NS* |
[in-scope namespaces] | The namespace information items computed using the [namespace attributes] properties of this information item and its ancestors |
[base URI] | The base URI of the element information item |
[parent] | Computed based on the last SE event encountered that did not get a matching EE event if any, or computed based on the SD event |
Property | EXI event types |
---|---|
[namespace name] | AT |
[local name] | AT |
[prefix] | AT |
[normalized value] | The value of AT |
[specified] | True if the item maps to AT, otherwise false |
[attribute type] | Computed based on AT and DT |
[references] | Computed based on [attribute type] and value of AT |
[owner element] | Computed based on the last SE event encountered that did not get a matching EE event |
Property | EXI event types |
---|---|
[target] | PI |
[content] | PI |
[base URI] | The base URI of the processing information item |
[notation] | Computed based on the availability of the internal DTD subset |
[parent] | Computed based on the last SE event encountered that did not get a matching EE event type |
Property | EXI event types |
---|---|
[name] | ER |
[system identifier] | Based on the availability of the internal DTD subset |
[public identifier] | Based on the availability of the internal DTD subset |
[declaration base URI] | The base URI of the unexpanded entity reference information item |
[parent] | Computed based on the last SE event encountered that did not get a matching EE event type |
Property | EXI event types |
---|---|
[character code] | Each character in CH |
[element content whitespace] | Computed based on [parent] and DT |
[parent] | Computed based on the last SE event encountered that did not get a matching EE event |
Property | EXI event types |
---|---|
[content] | text content item of CM |
[parent] | Computed based on the last SE event encountered that did not get a matching EE event, or the SD event |
Property | EXI event types |
---|---|
[system identifier] | DT |
[public identifier] | DT |
[children] | Computed based on text content item of DT |
[parent] | Computed based on the SD event |
Property | EXI event types |
---|---|
[name] | Computed based on text content item of DT |
[system identifier] | Computed based on text content item of DT |
[public identifier] | Computed based on text content item of DT |
[declaration base URI] | The base URI of the unparsed entity information item |
[notation name] | Computed based on text content item of DT |
[notation] | Computed based on text content item of DT |
Property | EXI event types |
---|---|
[name] | Computed based on text content item of DT |
[system identifier] | Computed based on text content item of DT |
[public identifier] | Computed based on text content item of DT |
[declaration base URI] | The base URI of the notation information item |
Property | EXI event types |
---|---|
[prefix] | NS |
[namespace name] | NS |
<xsd:schema targetNamespace="http://www.w3.org/2009/exi" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xsd:element name="header"> <xsd:complexType> <xsd:sequence> <xsd:element name="lesscommon" minOccurs="0"> <xsd:complexType> <xsd:sequence> <xsd:element name="uncommon" minOccurs="0"> <xsd:complexType> <xsd:sequence> <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="skip" /> <xsd:element name="alignment" minOccurs="0"> <xsd:complexType> <xsd:choice> <xsd:element name="byte"> <xsd:complexType /> </xsd:element> <xsd:element name="pre-compress"> <xsd:complexType /> </xsd:element> </xsd:choice> </xsd:complexType> </xsd:element> <xsd:element name="selfContained" minOccurs="0"> <xsd:complexType /> </xsd:element> <xsd:element name="valueMaxLength" minOccurs="0"> <xsd:simpleType> <xsd:restriction base="xsd:unsignedInt" /> </xsd:simpleType> </xsd:element> <xsd:element name="valuePartitionCapacity" minOccurs="0"> <xsd:simpleType> <xsd:restriction base="xsd:unsignedInt" /> </xsd:simpleType> </xsd:element> <xsd:element name="datatypeRepresentationMap" minOccurs="0" maxOccurs="unbounded"> <xsd:complexType> <xsd:sequence> <!-- schema datatype --> <xsd:any namespace="##other" processContents="skip" /> <!-- datatype representation --> <xsd:any processContents="skip" /> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="preserve" minOccurs="0"> <xsd:complexType> <xsd:sequence> <xsd:element name="dtd" minOccurs="0"> <xsd:complexType /> </xsd:element> <xsd:element name="prefixes" minOccurs="0"> <xsd:complexType /> </xsd:element> <xsd:element name="lexicalValues" minOccurs="0"> <xsd:complexType /> </xsd:element> <xsd:element name="comments" minOccurs="0"> <xsd:complexType /> </xsd:element> <xsd:element name="pis" minOccurs="0"> <xsd:complexType /> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="blockSize" minOccurs="0"> <xsd:simpleType> <xsd:restriction base="xsd:unsignedInt"> <xsd:minInclusive value="1" /> </xsd:restriction> </xsd:simpleType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="common" minOccurs="0"> <xsd:complexType> <xsd:sequence> <xsd:element name="compression" minOccurs="0"> <xsd:complexType /> </xsd:element> <xsd:element name="fragment" minOccurs="0"> <xsd:complexType /> </xsd:element> <xsd:element name="schemaId" minOccurs="0" nillable="true"> <xsd:simpleType> <xsd:restriction base="xsd:string" /> </xsd:simpleType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="strict" minOccurs="0"> <xsd:complexType /> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> <!-- Built-in EXI Datatype IDs for use in datatype representation maps --> <xsd:simpleType name="base64Binary"> <xsd:restriction base="xsd:base64Binary"/> </xsd:simpleType> <xsd:simpleType name="hexBinary" > <xsd:restriction base="xsd:hexBinary"/> </xsd:simpleType> <xsd:simpleType name="boolean" > <xsd:restriction base="xsd:boolean"/> </xsd:simpleType> <xsd:simpleType name="decimal" > <xsd:restriction base="xsd:decimal"/> </xsd:simpleType> <xsd:simpleType name="double" > <xsd:restriction base="xsd:double"/> </xsd:simpleType> <xsd:simpleType name="integer" > <xsd:restriction base="xsd:integer"/> </xsd:simpleType> <xsd:simpleType name="string" > <xsd:restriction base="xsd:string"/> </xsd:simpleType> <xsd:simpleType name="dateTime" > <xsd:restriction base="xsd:dateTime"/> </xsd:simpleType> <xsd:simpleType name="date" > <xsd:restriction base="xsd:date"/> </xsd:simpleType> <xsd:simpleType name="time" > <xsd:restriction base="xsd:time"/> </xsd:simpleType> <xsd:simpleType name="gYearMonth" > <xsd:restriction base="xsd:gYearMonth"/> </xsd:simpleType> <xsd:simpleType name="gMonthDay" > <xsd:restriction base="xsd:gMonthDay"/> </xsd:simpleType> <xsd:simpleType name="gYear" > <xsd:restriction base="xsd:gYear"/> </xsd:simpleType> <xsd:simpleType name="gMonth" > <xsd:restriction base="xsd:gMonth"/> </xsd:simpleType> <xsd:simpleType name="gDay" > <xsd:restriction base="xsd:gDay"/> </xsd:simpleType> <!-- Qnames reserved for future use in datatype representation maps --> <xsd:simpleType name="ieeeBinary32" > <xsd:restriction base="xsd:float"/> </xsd:simpleType> <xsd:simpleType name="ieeeBinary64" > <xsd:restriction base="xsd:double"/> </xsd:simpleType> </xsd:schema>Note: The qnames exi:ieeeBinary32 and exi:ieeeBinary64 defined above are reserved for future use in Datatype Representation Maps to identify the 32-bit and 64-bit Binary Interchange Formats defined by the IEEE 754-2008 standard [IEEE 754-2008].
Partition | Compact ID | String Value |
---|---|---|
URI | 0 | "" [empty string] |
URI | 1 | "http://www.w3.org/XML/1998/namespace" |
URI | 2 | "http://www.w3.org/2001/XMLSchema-instance" |
Partition | Compact ID | String Value |
---|---|---|
URI | 3 | "http://www.w3.org/2001/XMLSchema" |
"http://www.w3.
org/XML/1998/namespace"
namespace and XSI-PF
represents the partition for prefixes in the
"http://
www.w3.org/2001/XMLSchema-instan
ce"
namespace.
Partition | Compact ID | String Value |
---|---|---|
"" | 0 | "" [empty string] |
XML-PF | 0 | "xml" |
XSI-PF | 0 | "xsi" |
"http://www.w3.
org/XML/1998/namespace"
namespace, XSI‑NS
represents the partition for local-names in the
"http://
www.w3.org/2001/XMLSchema-instan
ce"
namespace, and XSD‑NS
represents the partition for local-names in the
"http://www.w3.org/2001/
XMLSchema"
namespace.
Partition | String Values |
---|---|
XML‑NS | "base", "id", "lang", "space" |
XSI‑NS | "nil", "type" |
Partition | String Values |
---|---|
XSD‑NS | "ENTITIES", "ENTITY", "ID", "IDREF", "IDREFS", "NCName", "NMTOKEN", "NMTOKENS", "NOTATION", "Name", "QName", "anySimpleType", "anyType", "anyURI", "base64Binary", "boolean", "byte", "date", "dateTime", "decimal", "double", "duration", "float", "gDay", "gMonth", "gMonthDay", "gYear", "gYearMonth", "hexBinary", "int", "integer", "language", "long", "negativeInteger", "nonNegativeInteger", "nonPositiveInteger", "normalizedString", "positiveInteger", "short", "string", "time", "token", "unsignedByte", "unsignedInt", "unsignedLong", "unsignedShort" |
Magic number(s): | |
---|---|
The first four octets may be hexadecimal 24 45 58 49 ("$EXI"). The first octet after these, or the first octet of the whole content if they are not present, has its high two bits set to values 1 and 0 in that order. |
File extension(s): | |
---|---|
.exi |
Macintosh file type code(s): | |
---|---|
APPL |
Consideration of alternatives : | |
---|---|
When transferring EXI streams over a protocol that can identify and negotiate the content coding of XML information independent of its media-type, the content-coding should be used to identify and negotiate how the XML information is encoded and the media-type should be used to negotiate and identify what type of information is transferred. | |
<xs:element name="product"> <xs:complexType> <xs:sequence maxOccurs="2"> <xs:element name="description" type="xs:string" minOccurs="0"/> <xs:element name="quantity" type="xs:integer" /> <xs:element name="price" type="xs:float" /> </xs:sequence> <xs:attribute name="sku" type="xs:string" use="required" /> <xs:attribute name="color" type="xs:string" use="optional" /> </xs:complexType> </xs:element> <xs:element name="order"> <xs:complexType> <xs:sequence> <xs:element ref="product" maxOccurs="unbounded" /> </xs:sequence> </xs:complexType> </xs:element>Section H.1 Proto-Grammar Examples guides you through the process of generating EXI proto-grammars from the schema components available in the example schema above. EXI grammars in the normalized form that correspond to the proto-grammars are shown in section H.2 Normalized Grammar Examples. Section H.3 Complete Grammar Examples shows the complete EXI grammars for elements <product> and <order>.
Term_description | ||
---|---|---|
Term_description 0 : | ||
SE("description") Term_description 1 | ||
Term_description 1 : | ||
EE | ||
Term_quantity | ||
---|---|---|
Term_quantity 0 : | ||
SE("quantity") Term_quantity 1 | ||
Term_quantity 1 : | ||
EE | ||
Term_price | ||
---|---|---|
Term_price 0 : | ||
SE("price") Term_price 1 | ||
Term_price 1 : | ||
EE | ||
Particle_description | ||
---|---|---|
Term_description 0 : | ||
SE("description") Term_description 1 | ||
EE | ||
Term_description 1 : | ||
EE | ||
Particle_quantity | ||
---|---|---|
Term_quantity 0 : | ||
SE("quantity") Term_quantity 1 | ||
Term_quantity 1 : | ||
EE | ||
Particle_price | ||
---|---|---|
Term_price 0 : | ||
SE("price") Term_price 1 | ||
Term_price 1 : | ||
EE | ||
Term_sequence = Particle_description ⊕ Particle_quantity ⊕ Particle_price |
Term_sequence | ||
---|---|---|
Term_description0 : | ||
SE("description") Term_description1 | ||
Term_quantity 0 | ||
Term_description 1 : | ||
Term_quantity 0 | ||
Term_quantity 0 : | ||
SE("quantity") Term_quantity 1 | ||
Term_quantity 1 : | ||
Term_price 0 | ||
Term_price 0 : | ||
SE("price") Term_price 1 | ||
Term_price 1 : | ||
EE | ||
Particle_sequence | ||
---|---|---|
Term_description0,0 : | ||
SE("description") Term_description0,1 | ||
Term_quantity0,0 | ||
Term_description0,1 : | ||
Term_quantity0,0 | ||
Term_quantity0,0 : | ||
SE("quantity") Term_quantity0,1 | ||
Term_quantity0,1 : | ||
Term_price0,0 | ||
Term_price0,0 : | ||
SE("price") Term_price0,1 | ||
Term_price0,1 : | ||
Term_description1,0 | ||
Term_description1,0 : | ||
SE("description") Term_description1,1 | ||
Term_quantity1,0 | ||
EE | ||
Term_description1,1 : | ||
Term_quantity1,0 | ||
Term_quantity1,0 : | ||
SE("quantity") Term_quantity1,1 | ||
Term_quantity1,1 : | ||
Term_price1,0 | ||
Term_price1,0 : | ||
SE("price") Term_price1,1 | ||
Term_price1,1 : | ||
EE | ||
Use_sku | ||
---|---|---|
Use_sku 0 : | ||
AT("sku") [schema-typed value] Use_sku 1 | ||
Use_sku 1 : | ||
EE | ||
Use_color | ||
---|---|---|
Use_color 0 : | ||
AT("color") [schema-typed value] Use_color 1 | ||
EE | ||
Use_color 1 : | ||
EE | ||
ProtoG_ProductElement = Use_color ⊕ Use_sku ⊕ Particle_sequence |
ProtoG_ProductElement | ||
---|---|---|
Use_color 0 : | ||
AT("color") [schema-typed value] Use_color 1 | ||
Use_sku 0 | ||
Use_color 1 : | ||
Use_sku 0 | ||
Use_sku 0 : | ||
AT("sku") [schema-typed value] Use_sku 1 | ||
Use_sku 1 : | ||
Term_description0,0 | ||
Term_description0,0 : | ||
SE("description") Term_description0,1 | ||
Term_quantity0,0 | ||
Term_description0,1 : | ||
Term_quantity0,0 | ||
Term_quantity0,0 : | ||
SE("quantity") Term_quantity0,1 | ||
Term_quantity0,1 : | ||
Term_price0,0 | ||
Term_price0,0 : | ||
SE("price") Term_price0,1 | ||
Term_price0,1 : | ||
Term_description1,0 | ||
Term_description1,0 : | ||
SE("description") Term_description1,1 | ||
Term_quantity1,0 | ||
EE | ||
Term_description1,1 : | ||
Term_quantity1,0 | ||
Term_quantity1,0 : | ||
SE("quantity") Term_quantity1,1 | ||
Term_quantity1,1 : | ||
Term_price1,0 | ||
Term_price1,0 : | ||
SE("price") Term_price1,1 | ||
Term_price1,1 : | ||
EE | ||
Term_product | ||
---|---|---|
Term_product 0 : | ||
SE("product") Term_product 1 | ||
Term_product 1 : | ||
EE | ||
Particle_product (before simplification) | ||
---|---|---|
Term_product 0,0 : | ||
SE("product") Term_product 0,1 | ||
Term_product 0,1 : | ||
Term_product 1,0 | ||
Term_product 1,0 : | ||
SE("product") Term_product 1,1 | ||
EE | ||
Term_product 1,1 : | ||
Term_product 1,0 | ||
Particle_product (after simplification) | ||
---|---|---|
Term_product 0,0 : | ||
SE("product") Term_product 1,0 | ||
Term_product 1,0 : | ||
SE("product") Term_product 1,0 | ||
EE | ||
ProtoG_OrderElement | ||
---|---|---|
Term_product 0,0 : | ||
SE("product") Term_product 1,0 | ||
Term_product 1,0 : | ||
SE("product") Term_product 1,0 | ||
EE | ||
NormG_ProductElement | |||
---|---|---|---|
Event Code | |||
Use_color 0 : | |||
AT("color") [schema-typed value] Use_color 1 | 0 | ||
AT("sku") [schema-typed value] Use_sku 1 | 1 | ||
Use_color 1 : | |||
AT("sku") [schema-typed value] Use_sku 1 | 0 | ||
Use_sku 1 : | |||
SE("description") Term_description0,1 | 0 | ||
SE("quantity") Term_quantity0,1 | 1 | ||
Term_description0,1 : | |||
SE("quantity") Term_quantity0,1 | 0 | ||
Term_quantity0,1 : | |||
SE("price") Term_price0,1 | 0 | ||
Term_price0,1 : | |||
SE("description") Term_description1,1 | 0 | ||
SE("quantity") Term_quantity1,1 | 1 | ||
EE | 2 | ||
Term_description1,1 : | |||
SE("quantity") Term_quantity1,1 | 0 | ||
Term_quantity1,1 : | |||
SE("price") Term_price1,1 | 0 | ||
Term_price1,1 : | |||
EE | 0 | ||
NormG_OrderElement | |||
---|---|---|---|
Event Code | |||
Term_product 0,0 : | |||
SE("product") Term_product 1,0 | 0 | ||
Term_product 1,0: | |||
SE("product") Term_product 1,0 | 0 | ||
EE | 1 | ||
Complete grammar for element <product> | |||
---|---|---|---|
Event Code | |||
Use_color 0 : | |||
AT("color") [schema-typed value] Use_color 1 | 0 | ||
AT("sku") [schema-typed value] Use_sku 1 | 1 | ||
EE | 2.0 | ||
AT(xsi:type) Use_color 0 | 2.1 | ||
AT(xsi:nil) Use_color 0 | 2.2 | ||
AT (*) Use_color 0 | 2.3 | ||
AT("color") [untyped value] Use_color1 | 2.4.0 | ||
AT("sku") [untyped value] Use_sku1 | 2.4.1 | ||
AT (*) [untyped value] Use_color 0 | 2.4.2 | ||
SE(*) Use_sku 1_copied | 2.5 | ||
CH [untyped value] Use_sku 1_copied | 2.6 | ||
Use_color 1 : | |||
AT("sku") [schema-typed value] Use_sku 1 | 0 | ||
EE | 1.0 | ||
AT (*) Use_color 1 | 1.1 | ||
AT("sku") [untyped value] Use_sku 1 | 1.2.0 | ||
AT (*) [untyped value] Use_color 1 | 1.2.1 | ||
SE(*) Use_sku 1_copied | 1.3 | ||
CH [untyped value] Use_sku 1_copied | 1.4 | ||
Use_sku 1 : | |||
SE("description") Term_description0,1 | 0 | ||
SE("quantity") Term_quantity0,1 | 1 | ||
EE | 2.0 | ||
AT (*) Use_sku 1 | 2.1 | ||
AT (*) [untyped value] Use_sku 1 | 2.2.0 | ||
SE(*) Use_sku 1_copied | 2.3 | ||
CH [untyped value] Use_sku 1_copied | 2.4 | ||
Use_sku 1_copied : | |||
SE("description") Term_description0,1 | 0 | ||
SE("quantity") Term_quantity0,1 | 1 | ||
EE | 2.0 | ||
SE(*) Use_sku 1_copied | 2.1 | ||
CH [untyped value] Use_sku 1_copied | 2.2 | ||
Term_description0,1 : | |||
SE("quantity") Term_quantity0,1 | 0 | ||
EE | 1 | ||
SE(*) Term_description0,1 | 2.0 | ||
CH [untyped value] Term_description0,1 | 2.1 | ||
Term_quantity0,1 : | |||
SE("price") Term_price0,1 | 0 | ||
EE | 1 | ||
SE(*) Term_quantity0,1 | 2.0 | ||
CH [untyped value] Term_quantity0,1 | 2.1 | ||
Term_price0,1 : | |||
SE("description") Term_description1,1 | 0 | ||
SE("quantity") Term_quantity1,1 | 1 | ||
EE | 2 | ||
SE(*) Term_price0,1 | 3.0 | ||
CH [untyped value] Term_price0,1 | 3.1 | ||
Term_description1,1 : | |||
SE("quantity") Term_quantity1,1 | 0 | ||
EE | 1 | ||
SE(*) Term_description1,1 | 2.0 | ||
CH [untyped value] Term_description1,1 | 2.1 | ||
Term_quantity1,1 : | |||
SE("price") Term_price1,1 | 0 | ||
EE | 1 | ||
SE(*) Term_quantity1,1 | 2.0 | ||
CH [untyped value] Term_quantity1,1 | 2.1 | ||
Term_price1,1 : | |||
EE | 0 | ||
SE(*) Term_price1,1 | 1.0 | ||
CH [untyped value] Term_price1,1 | 1.1 | ||
Complete grammar for element <order> | |||
---|---|---|---|
Event Code | |||
Term_product 0,0 : | |||
SE("product") Term_product 1,0 | 0 | ||
EE | 1.0 | ||
AT(xsi:type) Term_product 0,0 | 1.1 | ||
AT(xsi:nil) Term_product 0,0 | 1.2 | ||
AT (*) Term_product 0,0 | 1.3 | ||
AT (*) [untyped value] Term_product 0,0 | 1.4.0 | ||
SE(*) Term_product 0,0_copied | 1.5 | ||
CH [untyped value] Term_product 0,0_copied | 1.6 | ||
Term_product 0,0_copied : | |||
SE("product") Term_product 1,0 | 0 | ||
EE | 1.0 | ||
SE(*) Term_product 0,0_copied | 1.1 | ||
CH [untyped value] Term_product 0,0_copied | 1.2 | ||
Term_product 1,0 : | |||
SE("product") Term_product 1,0 | 0 | ||
EE | 1 | ||
SE(*) Term_product 1,0 | 2.0 | ||
CH [untyped value] Term_product 1,0 | 2.1 | ||
"http://www.w3.
org/XML/1998/namespace"
, "http:
//www.w3.org/2001/XMLSchema-ins
tance"
and "http://www.w3.org/2
001/XMLSchema"
, the local-names of such schema components are also pre-populated into the string table, partitioned by their namespace URI, then sorted together with the string values listed for the respective namespace URI shown in appendix D.3 Initial Entries in Local-Name Partitions.
●The provision that was set out to permit xsi:type and xsi:nil attributes to be represented using AT(*) terminal in schema-informed grammars was removed for improved implementation simplicity, based on observation derived from implementation experiences.
(see 8.5.3 Schema-informed Element Fragment Grammar, 8.5.4.1.3.2 Complex Type Grammars, 8.5.4.1.3.3 Complex Ur-Type Grammar and 8.5.4.4.1 Adding Productions when Strict is False)
●
Clarified how a production of the form LeftHandSide : AT (xsi:type) RightHandSide that has already been added to the built-in grammar is evaluated.
(see 8.4.3 Built-in Element Grammar)
●
Clarified that the special encoding provision described for the Integer datatype representation applies only when the associated schema datatype is derived from xsd:integer.
(see 7.1.5 Integer)
●
Clarified that only those attributes explicitly declared in schemas are considered for inclusion in the construction of schema-informed element fragment grammar.
(see 8.5.3 Schema-informed Element Fragment Grammar)
●
Enumerated restrictions that are implicated by the use of strict option.
(see 8.5.4.4.2 Adding Productions when Strict is True)
●
Clarified the criteria used to determine which values of xsi:nil attributes are included in the structure channel (as opposed to value channels) when EXI compression is used.
(see 9.2.1 Structure Channel)
●
Clarified the preamble text of 8.5 Schema-informed Grammars by adding a mention that the section describes only the process for deriving schema-informed grammars from XML Schemas.
●
Clarified that the number of values used to dichotomize the compressed stream representation only includes values in value channels but not those occasional values of xsi:type and xsi:nil in the structure channel.
(see 9.3 Compressed Streams)
●
Clarified that a channel of which all the events have zero-byte representations has a zero-byte representation and is not explicitly represented in a compressed stream.
(see 9.3 Compressed Streams)
●
The definition of blockSize element was clarified to indicate the element can have only values that are greater than or equal to 1.
(see C XML Schema for EXI Options Document)
●
Described the numeric ranges that must be supported by implementations.
(see 10.2 EXI Processor Conformance)
●
Clarified that regular expressions that contain category escapes, category complement escapes or multi-character escapes other than \s (whitespace) do not have corresponding restricted character sets.
(see E Deriving
Set of Characters
from XML Schema Regular Expressions)
●
Fixed an error in ElementFragment grammar to make sure the grammar when strict option value set to false, after undeclared productions are added, do not end up making AT terminals available following the first occurrence of SE or CH events.
(see 8.5.3 Schema-informed Element Fragment Grammar)
●
Fixed errors in Table 7-1 by removing unnecessary associations that were found to have been causing an interoperability problem.
●
Clarified appendix D.1 Initial Entries in Uri Partition by having it explicitly mentioned that some additional namespace URIs are added to the uri partition the process of which had been defined elsewhere in section 7.3.1 String Table Partitions.
●
Relaxed the format constraint that had required xsi:type attribute to occur before all other attributes. It is now legitimate that other attributes occur before xsi:type so long as that xsi:type would not have caused grammar switch if it appeared as the first attribute.
(See 6. Encoding EXI Streams and 8.4.3 Built-in Element Grammar)
●
Clarified that the derivation methods "extension" or "restriction" are indicated (but not "list" or "union") when this specification mentions one type is derived from another or refers to the notion of type hierarchy.
(See 1.2 Notational Conventions and Terminology)