draft-ietf-cellar-ebml-17.txt   rfc8794.txt 
cellar S. Lhomme Internet Engineering Task Force (IETF) S. Lhomme
Internet-Draft Request for Comments: 8794
Intended status: Standards Track D. Rice Category: Standards Track D. Rice
Expires: 30 July 2020 ISSN: 2070-1721
M. Bunkus M. Bunkus
27 January 2020 July 2020
Extensible Binary Meta Language Extensible Binary Meta Language
draft-ietf-cellar-ebml-17
Abstract Abstract
This document defines the Extensible Binary Meta Language (EBML) This document defines the Extensible Binary Meta Language (EBML)
format as a binary container format designed for audio/video storage. format as a binary container format designed for audio/video storage.
EBML is designed as a binary equivalent to XML and uses a storage- EBML is designed as a binary equivalent to XML and uses a storage-
efficient approach to build nested Elements with identifiers, efficient approach to build nested Elements with identifiers,
lengths, and values. Similar to how an XML Schema defines the lengths, and values. Similar to how an XML Schema defines the
structure and semantics of an XML Document, this document defines how structure and semantics of an XML Document, this document defines how
EBML Schemas are created to convey the semantics of an EBML Document. EBML Schemas are created to convey the semantics of an EBML Document.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This is an Internet Standards Track document.
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months This document is a product of the Internet Engineering Task Force
and may be updated, replaced, or obsoleted by other documents at any (IETF). It represents the consensus of the IETF community. It has
time. It is inappropriate to use Internet-Drafts as reference received public review and has been approved for publication by the
material or to cite them other than as "work in progress." Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in Section 2 of RFC 7841.
This Internet-Draft will expire on 30 July 2020. Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
https://www.rfc-editor.org/info/rfc8794.
Copyright Notice Copyright Notice
Copyright (c) 2020 IETF Trust and the persons identified as the Copyright (c) 2020 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents (https://trustee.ietf.org/ Provisions Relating to IETF Documents
license-info) in effect on the date of publication of this document. (https://trustee.ietf.org/license-info) in effect on the date of
Please review these documents carefully, as they describe your rights publication of this document. Please review these documents
and restrictions with respect to this document. Code Components carefully, as they describe your rights and restrictions with respect
extracted from this document must include Simplified BSD License text to this document. Code Components extracted from this document must
as described in Section 4.e of the Trust Legal Provisions and are include Simplified BSD License text as described in Section 4.e of
provided without warranty as described in the Simplified BSD License. the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction
2. Notation and Conventions . . . . . . . . . . . . . . . . . . 4 2. Notation and Conventions
3. Structure . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3. Structure
4. Variable Size Integer . . . . . . . . . . . . . . . . . . . . 7 4. Variable-Size Integer
4.1. VINT_WIDTH . . . . . . . . . . . . . . . . . . . . . . . 7 4.1. VINT_WIDTH
4.2. VINT_MARKER . . . . . . . . . . . . . . . . . . . . . . . 7 4.2. VINT_MARKER
4.3. VINT_DATA . . . . . . . . . . . . . . . . . . . . . . . . 7 4.3. VINT_DATA
4.4. VINT Examples . . . . . . . . . . . . . . . . . . . . . . 8 4.4. VINT Examples
5. Element ID . . . . . . . . . . . . . . . . . . . . . . . . . 9 5. Element ID
6. Element Data Size . . . . . . . . . . . . . . . . . . . . . . 11 6. Element Data Size
6.1. Data Size Format . . . . . . . . . . . . . . . . . . . . 11 6.1. Data Size Format
6.2. Unknown Data Size . . . . . . . . . . . . . . . . . . . . 12 6.2. Unknown Data Size
6.3. Data Size Values . . . . . . . . . . . . . . . . . . . . 14 6.3. Data Size Values
7. EBML Element Types . . . . . . . . . . . . . . . . . . . . . 15 7. EBML Element Types
7.1. Signed Integer Element . . . . . . . . . . . . . . . . . 15 7.1. Signed Integer Element
7.2. Unsigned Integer Element . . . . . . . . . . . . . . . . 16 7.2. Unsigned Integer Element
7.3. Float Element . . . . . . . . . . . . . . . . . . . . . . 16 7.3. Float Element
7.4. String Element . . . . . . . . . . . . . . . . . . . . . 16 7.4. String Element
7.5. UTF-8 Element . . . . . . . . . . . . . . . . . . . . . . 16 7.5. UTF-8 Element
7.6. Date Element . . . . . . . . . . . . . . . . . . . . . . 17 7.6. Date Element
7.7. Master Element . . . . . . . . . . . . . . . . . . . . . 17 7.7. Master Element
7.8. Binary Element . . . . . . . . . . . . . . . . . . . . . 17 7.8. Binary Element
8. EBML Document . . . . . . . . . . . . . . . . . . . . . . . . 18 8. EBML Document
8.1. EBML Header . . . . . . . . . . . . . . . . . . . . . . . 18 8.1. EBML Header
8.2. EBML Body . . . . . . . . . . . . . . . . . . . . . . . . 18 8.2. EBML Body
9. EBML Stream . . . . . . . . . . . . . . . . . . . . . . . . . 19 9. EBML Stream
10. EBML Versioning . . . . . . . . . . . . . . . . . . . . . . . 19 10. EBML Versioning
10.1. EBML Header Version . . . . . . . . . . . . . . . . . . 19 10.1. EBML Header Version
10.2. EBML Document Version . . . . . . . . . . . . . . . . . 19 10.2. EBML Document Version
11. Elements semantic . . . . . . . . . . . . . . . . . . . . . . 19 11. Elements semantics
11.1. EBML Schema . . . . . . . . . . . . . . . . . . . . . . 19 11.1. EBML Schema
11.1.1. EBML Schema Example . . . . . . . . . . . . . . . . 20 11.1.1. EBML Schema Example
11.1.2. <EBMLSchema> Element . . . . . . . . . . . . . . . . 21 11.1.2. "<EBMLSchema>" Element
11.1.3. <EBMLSchema> Attributes . . . . . . . . . . . . . . 21 11.1.3. "<EBMLSchema>" Namespace
11.1.4. <element> Element . . . . . . . . . . . . . . . . . 22 11.1.4. "<EBMLSchema>" Attributes
11.1.5. <element> Attributes . . . . . . . . . . . . . . . . 22 11.1.5. "<element>" Element
11.1.6. <documentation> Element . . . . . . . . . . . . . . 30 11.1.6. "<element>" Attributes
11.1.7. <documentation> Attributes . . . . . . . . . . . . . 30 11.1.7. "<documentation>" Element
11.1.8. <implementation_note> Element . . . . . . . . . . . 31 11.1.8. "<documentation>" Attributes
11.1.9. <implementation_note> Attributes . . . . . . . . . . 32 11.1.9. "<implementation_note>" Element
11.1.10. <restriction> Element . . . . . . . . . . . . . . . 33 11.1.10. "<implementation_note>" Attributes
11.1.11. <enum> Element . . . . . . . . . . . . . . . . . . . 33 11.1.11. "<restriction>" Element
11.1.12. <enum> Attributes . . . . . . . . . . . . . . . . . 34 11.1.12. "<enum>" Element
11.1.13. <extension> Element . . . . . . . . . . . . . . . . 34 11.1.13. "<enum>" Attributes
11.1.14. <extension> Attributes . . . . . . . . . . . . . . . 34 11.1.14. "<extension>" Element
11.1.15. XML Schema for EBML Schema . . . . . . . . . . . . . 35 11.1.15. "<extension>" Attributes
11.1.16. Identically Recurring Elements . . . . . . . . . . . 38 11.1.16. XML Schema for EBML Schema
11.1.17. Textual expression of floats . . . . . . . . . . . . 39 11.1.17. Identically Recurring Elements
11.1.18. Note on the use of default attributes to define 11.1.18. Textual expression of floats
Mandatory EBML Elements . . . . . . . . . . . . . . . 40 11.1.19. Note on the use of default attributes to define
11.2. EBML Header Elements . . . . . . . . . . . . . . . . . . 41 Mandatory EBML Elements
11.2.1. EBML Element . . . . . . . . . . . . . . . . . . . . 41 11.2. EBML Header Elements
11.2.2. EBMLVersion Element . . . . . . . . . . . . . . . . 41 11.2.1. EBML Element
11.2.3. EBMLReadVersion Element . . . . . . . . . . . . . . 41 11.2.2. EBMLVersion Element
11.2.4. EBMLMaxIDLength Element . . . . . . . . . . . . . . 42 11.2.3. EBMLReadVersion Element
11.2.5. EBMLMaxSizeLength Element . . . . . . . . . . . . . 42 11.2.4. EBMLMaxIDLength Element
11.2.6. DocType Element . . . . . . . . . . . . . . . . . . 43 11.2.5. EBMLMaxSizeLength Element
11.2.7. DocTypeVersion Element . . . . . . . . . . . . . . . 43 11.2.6. DocType Element
11.2.8. DocTypeReadVersion Element . . . . . . . . . . . . . 44 11.2.7. DocTypeVersion Element
11.2.9. DocTypeExtension Element . . . . . . . . . . . . . . 44 11.2.8. DocTypeReadVersion Element
11.2.10. DocTypeExtensionName Element . . . . . . . . . . . . 45 11.2.9. DocTypeExtension Element
11.2.11. DocTypeExtensionVersion Element . . . . . . . . . . 45 11.2.10. DocTypeExtensionName Element
11.3. Global Elements . . . . . . . . . . . . . . . . . . . . 46 11.2.11. DocTypeExtensionVersion Element
11.3.1. CRC-32 Element . . . . . . . . . . . . . . . . . . . 46 11.3. Global Elements
11.3.2. Void Element . . . . . . . . . . . . . . . . . . . . 47 11.3.1. CRC-32 Element
12. Considerations for Reading EBML Data . . . . . . . . . . . . 47 11.3.2. Void Element
13. Terminating Elements . . . . . . . . . . . . . . . . . . . . 48 12. Considerations for Reading EBML Data
14. Guidelines for Updating Elements . . . . . . . . . . . . . . 49 13. Terminating Elements
14.1. Reducing a Element Data in Size . . . . . . . . . . . . 49 14. Guidelines for Updating Elements
14.1.1. Adding a Void Element . . . . . . . . . . . . . . . 49 14.1. Reducing Element Data in Size
14.1.2. Extending the Element Data Size . . . . . . . . . . 49 14.1.1. Adding a Void Element
14.1.3. Terminating Element Data . . . . . . . . . . . . . . 50 14.1.2. Extending the Element Data Size
14.1.3. Terminating Element Data
14.2. Considerations when Updating Elements with Cyclic 14.2. Considerations when Updating Elements with Cyclic
Redundancy Check (CRC) . . . . . . . . . . . . . . . . . 51 Redundancy Check (CRC)
15. Backward and Forward Compatibility . . . . . . . . . . . . . 51 15. Backward and Forward Compatibility
15.1. Backward Compatibility . . . . . . . . . . . . . . . . . 51 15.1. Backward Compatibility
15.2. Forward Compatibility . . . . . . . . . . . . . . . . . 52 15.2. Forward Compatibility
16. Security Considerations . . . . . . . . . . . . . . . . . . . 52 16. Security Considerations
17. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 53 17. IANA Considerations
17.1. EBML Element ID Registry . . . . . . . . . . . . . . . . 54 17.1. EBML Element IDs Registry
17.2. EBML DocType Registry . . . . . . . . . . . . . . . . . 57 17.2. EBML DocTypes Registry
18. Normative References . . . . . . . . . . . . . . . . . . . . 57 18. Normative References
19. Informative References . . . . . . . . . . . . . . . . . . . 59 19. Informative References
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 59 Authors' Addresses
1. Introduction 1. Introduction
EBML, short for Extensible Binary Meta Language, specifies a binary EBML, short for Extensible Binary Meta Language, specifies a binary
and octet (byte) aligned format inspired by the principle of XML (a format aligned with octets (bytes) and inspired by the principle of
framework for structuring data). XML (a framework for structuring data).
The goal of this document is to define a generic, binary, space- The goal of this document is to define a generic, binary, space-
efficient format that can be used to define more complex formats efficient format that can be used to define more complex formats
using an EBML Schema. EBML is used by the multimedia container, using an EBML Schema. EBML is used by the multimedia container,
Matroska [Matroska]. The applicability of EBML for other use cases Matroska [Matroska]. The applicability of EBML for other use cases
is beyond the scope of this document. is beyond the scope of this document.
The definition of the EBML format recognizes the idea behind HTML and The definition of the EBML format recognizes the idea behind HTML and
XML as a good one: separate structure and semantics allowing the same XML as a good one: separate structure and semantics allowing the same
structural layer to be used with multiple, possibly widely differing structural layer to be used with multiple, possibly widely differing,
semantic layers. Except for the EBML Header and a few Global semantic layers. Except for the EBML Header and a few Global
Elements this specification does not define particular EBML format Elements, this specification does not define particular EBML format
semantics; however this specification is intended to define how other semantics; however, this specification is intended to define how
EBML-based formats can be defined, such as the audio-video container other EBML-based formats can be defined, such as the audio/video
formats Matroska and WebM [WebM]. container formats Matroska and WebM [WebM].
EBML uses a simple approach of building Elements upon three pieces of EBML uses a simple approach of building Elements upon three pieces of
data (tag, length, and value) as this approach is well known, easy to data (tag, length, and value), as this approach is well known, easy
parse, and allows selective data parsing. The EBML structure to parse, and allows selective data parsing. The EBML structure
additionally allows for hierarchical arrangement to support complex additionally allows for hierarchical arrangement to support complex
structural formats in an efficient manner. structural formats in an efficient manner.
A typical EBML file has the following structure: A typical EBML file has the following structure:
EBML Header (master) EBML Header (master)
+ DocType (string) + DocType (string)
+ DocTypeVersion (unsigned integer) + DocTypeVersion (unsigned integer)
EBML Body Root (master) EBML Body Root (master)
+ ElementA (utf-8) + ElementA (utf-8)
+ Parent (master) + Parent (master)
+ ElementB (integer) + ElementB (integer)
+ Parent (master) + Parent (master)
+ ElementB (integer) + ElementB (integer)
2. Notation and Conventions 2. Notation and Conventions
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in BCP "OPTIONAL" in this document are to be interpreted as described in
14 [RFC2119] [RFC8174] when, and only when, they appear in all BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here. capitals, as shown here.
This document defines specific terms in order to define the format This document defines specific terms in order to define the format
and application of "EBML". Specific terms are defined below: and application of "EBML". Specific terms are defined below:
"EBML": Extensible Binary Meta Language "EBML": Extensible Binary Meta Language
"EBML Document Type": A name provided by an "EBML Schema" to "EBML Document Type": A name provided by an "EBML Schema" to
designate a particular implementation of "EBML" for a data format designate a particular implementation of "EBML" for a data format
(e.g.: matroska and webm). (e.g., Matroska and WebM).
"EBML Schema": A standardized definition for the structure of an "EBML Schema": A standardized definition for the structure of an
"EBML Document Type". "EBML Document Type".
"EBML Document": A datastream comprised of only two components, an "EBML Document": A datastream comprised of only two components, an
"EBML Header" and an "EBML Body". "EBML Header" and an "EBML Body".
"EBML Reader": A data parser that interprets the semantics of an "EBML Reader": A data parser that interprets the semantics of an
"EBML Document" and creates a way for programs to use "EBML". "EBML Document" and creates a way for programs to use "EBML".
"EBML Stream": A file that consists of one or more "EBML Documents" "EBML Stream": A file that consists of one or more "EBML Documents"
that are concatenated together. that are concatenated together.
"EBML Header": A declaration that provides processing instructions "EBML Header": A declaration that provides processing instructions
and identification of the "EBML Body". The "EBML Header" is and identification of the "EBML Body". The "EBML Header" is
analogous to an XML Declaration [W3C.REC-xml-20081126] (see section analogous to an XML Declaration [XML] (see Section 2.8 on "Prolog
2.8 on Prolog and Document Type Declaration). and Document Type Declaration").
"EBML Body": All data of an "EBML Document" following the "EBML "EBML Body": All data of an "EBML Document" following the "EBML
Header". Header".
"Variable Size Integer": A compact variable-length binary value which "Variable-Size Integer": A compact variable-length binary value that
defines its own length. defines its own length.
"VINT": Also known as "Variable Size Integer". "VINT": Also known as "Variable-Size Integer".
"EBML Element": A foundation block of data that contains three parts: "EBML Element": A foundation block of data that contains three
an "Element ID", an "Element Data Size", and "Element Data". parts: an "Element ID", an "Element Data Size", and "Element
Data".
"Element ID": The "Element ID" is a binary value, encoded as a "Element ID": A binary value, encoded as a "Variable-Size Integer",
"Variable Size Integer", used to uniquely identify a defined "EBML used to uniquely identify a defined "EBML Element" within a
Element" within a specific "EBML Schema". specific "EBML Schema".
"Element Data Size": An expression, encoded as a "Variable Size "Element Data Size": An expression, encoded as a "Variable-Size
Integer", of the length in octets of "Element Data". Integer", of the length in octets of "Element Data".
"VINTMAX": The maximum possible value that can be stored as "Element "VINTMAX": The maximum possible value that can be stored as "Element
Data Size". Data Size".
"Unknown-Sized Element": An "Element" with an unknown "Element Data "Unknown-Sized Element": An "Element" with an unknown "Element Data
Size". Size".
"Element Data": The value(s) of the "EBML Element" which is "Element Data": The value(s) of the "EBML Element", which is
identified by its "Element ID" and "Element Data Size". The form of identified by its "Element ID" and "Element Data Size". The form
the "Element Data" is defined by this document and the corresponding of the "Element Data" is defined by this document and the
"EBML Schema" of the Element's "EBML Document Type". corresponding "EBML Schema" of the Element's "EBML Document Type".
"Root Level": The starting level in the hierarchy of an "EBML "Root Level": The starting level in the hierarchy of an "EBML
Document". Document".
"Root Element": A mandatory, non-repeating "EBML Element" which "Root Element": A mandatory, nonrepeating "EBML Element" that occurs
occurs at the top level of the path hierarchy within an "EBML Body" at the top level of the path hierarchy within an "EBML Body" and
and contains all other "EBML Elements" of the "EBML Body", excepting contains all other "EBML Elements" of the "EBML Body", excepting
optional "Void Elements". optional "Void Elements".
"Top-Level Element": An "EBML Element" defined to only occur as a "Top-Level Element": An "EBML Element" defined to only occur as a
"Child Element" of the "Root Element". "Child Element" of the "Root Element".
"Master Element": The "Master Element" contains zero, one, or many "Master Element": The "Master Element" contains zero, one, or many
other "EBML Elements". other "EBML Elements".
"Child Element": A "Child Element" is a relative term to describe the "Child Element": A "Child Element" is a relative term to describe
"EBML Elements" immediately contained within a "Master Element". the "EBML Elements" immediately contained within a "Master
Element".
"Parent Element": A relative term to describe the "Master Element" "Parent Element": A relative term to describe the "Master Element"
which contains a specified element. For any specified "EBML Element" that contains a specified element. For any specified "EBML
that is not at "Root Level", the "Parent Element" refers to the Element" that is not at "Root Level", the "Parent Element" refers
"Master Element" in which that "EBML Element" is directly contained. to the "Master Element" in which that "EBML Element" is directly
contained.
"Descendant Element": A relative term to describe any "EBML Elements" "Descendant Element": A relative term to describe any "EBML
contained within a "Master Element", including any of the "Child Elements" contained within a "Master Element", including any of
Elements" of its "Child Elements", and so on. the "Child Elements" of its "Child Elements", and so on.
"Void Element": A "Void Element" is an "Element" used to overwrite "Void Element": An "Element" used to overwrite data or reserve space
data or reserve space within a "Master Element" for later use. within a "Master Element" for later use.
"Element Name": The human-readable name of the "EBML Element". "Element Name": The human-readable name of the "EBML Element".
"Element Path": The hierarchy of "Parent Element" where the "EBML "Element Path": The hierarchy of "Parent Element" where the "EBML
Element" is expected to be found in the "EBML Body". Element" is expected to be found in the "EBML Body".
"Empty Element": An "EBML Element" that has an "Element Data Size" "Empty Element": An "EBML Element" that has an "Element Data Size"
with all "VINT_DATA" bits set to zero, which indicates that the with all "VINT_DATA" bits set to zero, which indicates that the
"Element Data" of the "Element" is zero octets in length. "Element Data" of the "Element" is zero octets in length.
3. Structure 3. Structure
EBML uses a system of Elements to compose an EBML Document. EBML EBML uses a system of Elements to compose an EBML Document. EBML
Elements incorporate three parts: an Element ID, an Element Data Elements incorporate three parts: an Element ID, an Element Data
Size, and Element Data. The Element Data, which is described by the Size, and Element Data. The Element Data, which is described by the
Element ID, includes either binary data, one or more other EBML Element ID, includes either binary data, one or more other EBML
Elements, or both. Elements, or both.
4. Variable Size Integer 4. Variable-Size Integer
The Element ID and Element Data Size are both encoded as a Variable The Element ID and Element Data Size are both encoded as a Variable-
Size Integer. The Variable Size Integer is composed of a VINT_WIDTH, Size Integer. The Variable-Size Integer is composed of a VINT_WIDTH,
VINT_MARKER, and VINT_DATA, in that order. Variable Size Integers VINT_MARKER, and VINT_DATA, in that order. Variable-Size Integers
MUST left-pad the VINT_DATA value with zero bits so that the whole MUST left-pad the VINT_DATA value with zero bits so that the whole
Variable Size Integer is octet-aligned. Variable Size Integer will Variable-Size Integer is octet aligned. The Variable-Size Integer
be referred to as VINT for shorthand. will be referred to as VINT for shorthand.
4.1. VINT_WIDTH 4.1. VINT_WIDTH
Each Variable Size Integer starts with a VINT_WIDTH followed by a Each Variable-Size Integer starts with a VINT_WIDTH followed by a
VINT_MARKER. VINT_WIDTH is a sequence of zero or more bits of value VINT_MARKER. VINT_WIDTH is a sequence of zero or more bits of value
"0", and is terminated by the VINT_MARKER, which is a single bit of "0" and is terminated by the VINT_MARKER, which is a single bit of
value "1". The total length in bits of both VINT_WIDTH and value "1". The total length in bits of both VINT_WIDTH and
VINT_MARKER is the total length in octets in of the Variable Size VINT_MARKER is the total length in octets in of the Variable-Size
Integer. Integer.
The single bit "1" starts a Variable Size Integer with a length of The single bit "1" starts a Variable-Size Integer with a length of
one octet. The sequence of bits "01" starts a Variable Size Integer one octet. The sequence of bits "01" starts a Variable-Size Integer
with a length of two octets. "001" starts a Variable Size Integer with a length of two octets. "001" starts a Variable-Size Integer
with a length of three octets, and so on, with each additional 0-bit with a length of three octets, and so on, with each additional "0"
adding one octet to the length of the Variable Size Integer. bit adding one octet to the length of the Variable-Size Integer.
4.2. VINT_MARKER 4.2. VINT_MARKER
The VINT_MARKER serves as a separator between the VINT_WIDTH and The VINT_MARKER serves as a separator between the VINT_WIDTH and
VINT_DATA. Each Variable Size Integer MUST contain exactly one VINT_DATA. Each Variable-Size Integer MUST contain exactly one
VINT_MARKER. The VINT_MARKER is one bit in length and contain a bit VINT_MARKER. The VINT_MARKER is one bit in length and contain a bit
with a value of one. The first bit with a value of one within the with a value of one. The first bit with a value of one within the
Variable Size Integer is the VINT_MARKER. Variable-Size Integer is the VINT_MARKER.
4.3. VINT_DATA 4.3. VINT_DATA
The VINT_DATA portion of the Variable Size Integer includes all data The VINT_DATA portion of the Variable-Size Integer includes all data
that follows (but not including) the VINT_MARKER until end of the following (but not including) the VINT_MARKER until end of the
Variable Size Integer whose length is derived from the VINT_WIDTH. Variable-Size Integer whose length is derived from the VINT_WIDTH.
The bits required for the VINT_WIDTH and the VINT_MARKER use one out The bits required for the VINT_WIDTH and the VINT_MARKER use one out
of every eight bits of the total length of the Variable Size Integer. of every eight bits of the total length of the Variable-Size Integer.
Thus a Variable Size Integer of 1 octet length supplies 7 bits for Thus, a Variable-Size Integer of 1-octet length supplies 7 bits for
VINT_DATA, a 2 octet length supplies 14 bits for VINT_DATA, and a 3 VINT_DATA, a 2-octet length supplies 14 bits for VINT_DATA, and a
octet length supplies 21 bits for VINT_DATA. If the number of bits 3-octet length supplies 21 bits for VINT_DATA. If the number of bits
required for VINT_DATA are less than the bit size of VINT_DATA, then required for VINT_DATA is less than the bit size of VINT_DATA, then
VINT_DATA MUST be zero-padded to the left to a size that fits. The VINT_DATA MUST be zero-padded to the left to a size that fits. The
VINT_DATA value MUST be expressed as a big-endian unsigned integer. VINT_DATA value MUST be expressed as a big-endian unsigned integer.
4.4. VINT Examples 4.4. VINT Examples
Table 1 shows examples of Variable Size Integers with lengths from 1 Table 1 shows examples of Variable-Size Integers with lengths from 1
to 5 octets. The Usable Bits column refers to the number of bits to 5 octets. The "Usable Bits" column refers to the number of bits
that can be used in the VINT_DATA. The Representation column depicts that can be used in the VINT_DATA. The "Representation" column
a binary expression of Variable Size Integers where VINT_WIDTH is depicts a binary expression of Variable-Size Integers where
depicted by "0", the VINT_MARKER as "1", and the VINT_DATA as "x". VINT_WIDTH is depicted by "0", the VINT_MARKER as "1", and the
VINT_DATA as "x".
+--------------+-------------+-------------------------------+ +==============+=============+===============================+
| Octet Length | Usable Bits | Representation | | Octet Length | Usable Bits | Representation |
+==============+=============+===============================+ +==============+=============+===============================+
| 1 | 7 | 1xxx xxxx | | 1 | 7 | 1xxx xxxx |
+--------------+-------------+-------------------------------+ +--------------+-------------+-------------------------------+
| 2 | 14 | 01xx xxxx xxxx xxxx | | 2 | 14 | 01xx xxxx xxxx xxxx |
+--------------+-------------+-------------------------------+ +--------------+-------------+-------------------------------+
| 3 | 21 | 001x xxxx xxxx xxxx xxxx xxxx | | 3 | 21 | 001x xxxx xxxx xxxx xxxx xxxx |
+--------------+-------------+-------------------------------+ +--------------+-------------+-------------------------------+
| 4 | 28 | 0001 xxxx xxxx xxxx xxxx xxxx | | 4 | 28 | 0001 xxxx xxxx xxxx xxxx xxxx |
| | | xxxx xxxx | | | | xxxx xxxx |
+--------------+-------------+-------------------------------+ +--------------+-------------+-------------------------------+
| 5 | 35 | 0000 1xxx xxxx xxxx xxxx xxxx | | 5 | 35 | 0000 1xxx xxxx xxxx xxxx xxxx |
| | | xxxx xxxx xxxx xxxx | | | | xxxx xxxx xxxx xxxx |
+--------------+-------------+-------------------------------+ +--------------+-------------+-------------------------------+
Table 1: VINT examples depicting usable bits Table 1: VINT examples depicting usable bits
A Variable Size Integer may be rendered at octet lengths larger than A Variable-Size Integer may be rendered at octet lengths larger than
needed to store the data in order to facilitate overwriting it at a needed to store the data in order to facilitate overwriting it at a
later date, e.g. when its final size isn't known in advance. In later date -- e.g., when its final size isn't known in advance. In
Table 2 an integer "2" (with a corresponding binary value of 0b10) is Table 2, an integer "2" (with a corresponding binary value of 0b10)
shown encoded as different Variable Size Integers with lengths from is shown encoded as different Variable-Size Integers with lengths
one octet to four octets. All four encoded examples have identical from one octet to four octets. All four encoded examples have
semantic meaning though the VINT_WIDTH and the padding of the identical semantic meaning, though the VINT_WIDTH and the padding of
VINT_DATA vary. the VINT_DATA vary.
+---------+--------------+---------------------+--------------------+ +=========+==============+=====================+====================+
| Integer | Octet | As Represented in | As Represented in | | Integer | Octet | As Represented in | As Represented in |
| | Length | VINT (binary) | VINT (hexadecimal) | | | Length | VINT (binary) | VINT (hexadecimal) |
+=========+==============+=====================+====================+ +=========+==============+=====================+====================+
| 2 | 1 | 1000 0010 | 0x82 | | 2 | 1 | 1000 0010 | 0x82 |
+---------+--------------+---------------------+--------------------+ +---------+--------------+---------------------+--------------------+
| 2 | 2 | 0100 0000 0000 0010 | 0x4002 | | 2 | 2 | 0100 0000 0000 0010 | 0x4002 |
+---------+--------------+---------------------+--------------------+ +---------+--------------+---------------------+--------------------+
| 2 | 3 | 0010 0000 0000 0000 | 0x200002 | | 2 | 3 | 0010 0000 0000 0000 | 0x200002 |
| | | 0000 0010 | | | | | 0000 0010 | |
+---------+--------------+---------------------+--------------------+ +---------+--------------+---------------------+--------------------+
| 2 | 4 | 0001 0000 0000 0000 | 0x10000002 | | 2 | 4 | 0001 0000 0000 0000 | 0x10000002 |
| | | 0000 0000 0000 0010 | | | | | 0000 0000 0000 0010 | |
+---------+--------------+---------------------+--------------------+ +---------+--------------+---------------------+--------------------+
Table 2: VINT examples depicting the same integer value rendered Table 2: VINT examples depicting the same integer value rendered
at different VINT lengths at different VINT lengths
5. Element ID 5. Element ID
An Element ID is a Variable Size Integer. By default, Element IDs An Element ID is a Variable-Size Integer. By default, Element IDs
are from one octet to four octets in length, although Element IDs of are from one octet to four octets in length, although Element IDs of
greater lengths MAY be used if the EBMLMaxIDLength Element of the greater lengths MAY be used if the EBMLMaxIDLength Element of the
EBML Header is set to a value greater than four (see Section 11.2.4). EBML Header is set to a value greater than four (see Section 11.2.4).
The bits of the VINT_DATA component of the Element ID MUST NOT be all The bits of the VINT_DATA component of the Element ID MUST NOT be all
"0" values or all "1" values. The VINT_DATA component of the Element "0" values or all "1" values. The VINT_DATA component of the Element
ID MUST be encoded at the shortest valid length. For example, an ID MUST be encoded at the shortest valid length. For example, an
Element ID with binary encoding of "1011 1111" is valid, whereas an Element ID with binary encoding of "1011 1111" is valid, whereas an
Element ID with binary encoding of "0100 0000 0011 1111" stores a Element ID with binary encoding of "0100 0000 0011 1111" stores a
semantically equal VINT_DATA but is invalid because a shorter VINT semantically equal VINT_DATA but is invalid, because a shorter VINT
encoding is possible. Additionally, an Element ID with binary encoding is possible. Additionally, an Element ID with binary
encoding of "1111 1111" is invalid since the VINT_DATA section is set encoding of "1111 1111" is invalid, since the VINT_DATA section is
to all one values, whereas an Element ID with binary encoding of set to all one values, whereas an Element ID with binary encoding of
"0100 0000 0111 1111" stores a semantically equal VINT_DATA and is "0100 0000 0111 1111" stores a semantically equal VINT_DATA and is
the shortest possible VINT encoding. the shortest-possible VINT encoding.
Table 3 details these specific examples further: Table 3 details these specific examples further:
+------------+-------------+----------------+--------------------+ +============+=============+================+====================+
| VINT_WIDTH | VINT_MARKER | VINT_DATA | Element ID Status | | VINT_WIDTH | VINT_MARKER | VINT_DATA | Element ID Status |
+============+=============+================+====================+ +============+=============+================+====================+
| | 1 | 0000000 | Invalid: VINT_DATA | | | 1 | 0000000 | Invalid: VINT_DATA |
| | | | MUST NOT be set to | | | | | MUST NOT be set to |
| | | | all 0 | | | | | all 0 |
+------------+-------------+----------------+--------------------+ +------------+-------------+----------------+--------------------+
| 0 | 1 | 00000000000000 | Invalid: VINT_DATA | | 0 | 1 | 00000000000000 | Invalid: VINT_DATA |
| | | | MUST NOT be set to | | | | | MUST NOT be set to |
| | | | all 0 | | | | | all 0 |
+------------+-------------+----------------+--------------------+ +------------+-------------+----------------+--------------------+
skipping to change at page 11, line 5 skipping to change at line 444
| | | | all 1 | | | | | all 1 |
+------------+-------------+----------------+--------------------+ +------------+-------------+----------------+--------------------+
| 0 | 1 | 00000001111111 | Valid | | 0 | 1 | 00000001111111 | Valid |
+------------+-------------+----------------+--------------------+ +------------+-------------+----------------+--------------------+
Table 3: Examples of valid and invalid Element IDs Table 3: Examples of valid and invalid Element IDs
The range and count of possible Element IDs are determined by their The range and count of possible Element IDs are determined by their
octet length. Examples of this are provided in Table 4. octet length. Examples of this are provided in Table 4.
+-------------------------+----------------+-----------------+ +=========================+================+=================+
| Element ID Octet Length | Range of Valid | Number of Valid | | Element ID Octet Length | Range of Valid | Number of Valid |
| | Element IDs | Element IDs | | | Element IDs | Element IDs |
+=========================+================+=================+ +=========================+================+=================+
| 1 | 0x81 - 0xFE | 126 | | 1 | 0x81 - 0xFE | 126 |
+-------------------------+----------------+-----------------+ +-------------------------+----------------+-----------------+
| 2 | 0x407F - | 16,256 | | 2 | 0x407F - | 16,256 |
| | 0x7FFE | | | | 0x7FFE | |
+-------------------------+----------------+-----------------+ +-------------------------+----------------+-----------------+
| 3 | 0x203FFF - | 2,080,768 | | 3 | 0x203FFF - | 2,080,768 |
| | 0x3FFFFE | | | | 0x3FFFFE | |
skipping to change at page 11, line 29 skipping to change at line 468
+-------------------------+----------------+-----------------+ +-------------------------+----------------+-----------------+
Table 4: Examples of count and range for Element IDs at Table 4: Examples of count and range for Element IDs at
various octet lengths various octet lengths
6. Element Data Size 6. Element Data Size
6.1. Data Size Format 6.1. Data Size Format
The Element Data Size expresses the length in octets of Element Data. The Element Data Size expresses the length in octets of Element Data.
The Element Data Size itself is encoded as a Variable Size Integer. The Element Data Size itself is encoded as a Variable-Size Integer.
By default, Element Data Sizes can be encoded in lengths from one By default, Element Data Sizes can be encoded in lengths from one
octet to eight octets, although Element Data Sizes of greater lengths octet to eight octets, although Element Data Sizes of greater lengths
MAY be used if the octet length of the longest Element Data Size of MAY be used if the octet length of the longest Element Data Size of
the EBML Document is declared in the EBMLMaxSizeLength Element of the the EBML Document is declared in the EBMLMaxSizeLength Element of the
EBML Header (see Section 11.2.5). Unlike the VINT_DATA of the EBML Header (see Section 11.2.5). Unlike the VINT_DATA of the
Element ID, the VINT_DATA component of the Element Data Size is not Element ID, the VINT_DATA component of the Element Data Size is not
mandated to be encoded at the shortest valid length. For example, an mandated to be encoded at the shortest valid length. For example, an
Element Data Size with binary encoding of 1011 1111 or a binary Element Data Size with binary encoding of 1011 1111 or a binary
encoding of 0100 0000 0011 1111 are both valid Element Data Sizes and encoding of 0100 0000 0011 1111 are both valid Element Data Sizes and
both store a semantically equal value (both 0b00000000111111 and both store a semantically equal value (both 0b00000000111111 and
0b0111111, the VINT_DATA sections of the examples, represent the 0b0111111, the VINT_DATA sections of the examples, represent the
integer 63). integer 63).
Although an Element ID with all VINT_DATA bits set to zero is Although an Element ID with all VINT_DATA bits set to zero is
invalid, an Element Data Size with all VINT_DATA bits set to zero is invalid, an Element Data Size with all VINT_DATA bits set to zero is
allowed for EBML Element Types which do not mandate a non-zero length allowed for EBML Element Types that do not mandate a nonzero length
(see Section 7). An Element Data Size with all VINT_DATA bits set to (see Section 7). An Element Data Size with all VINT_DATA bits set to
zero indicates that the Element Data is zero octets in length. Such zero indicates that the Element Data is zero octets in length. Such
an EBML Element is referred to as an Empty Element. If an Empty an EBML Element is referred to as an Empty Element. If an Empty
Element has a default value declared then the EBML Reader MUST Element has a default value declared, then the EBML Reader MUST
interpret the value of the Empty Element as the default value. If an interpret the value of the Empty Element as the default value. If an
Empty Element has no default value declared then the EBML Reader MUST Empty Element has no default value declared, then the EBML Reader
use the value of the Empty Element for the corresponding EBML Element MUST use the value of the Empty Element for the corresponding EBML
Type of the Element ID, 0 for numbers and an empty string for Element Type of the Element ID, 0 for numbers and an empty string for
strings. strings.
6.2. Unknown Data Size 6.2. Unknown Data Size
An Element Data Size with all VINT_DATA bits set to one is reserved An Element Data Size with all VINT_DATA bits set to one is reserved
as an indicator that the size of the EBML Element is unknown. The as an indicator that the size of the EBML Element is unknown. The
only reserved value for the VINT_DATA of Element Data Size is all only reserved value for the VINT_DATA of Element Data Size is all
bits set to one. An EBML Element with an unknown Element Data Size bits set to one. An EBML Element with an unknown Element Data Size
is referred to as an Unknown-Sized Element. Only a Master Element is is referred to as an Unknown-Sized Element. Only a Master Element is
allowed to be of unknown size, and it can only be so if the allowed to be of unknown size, and it can only be so if the
unknownsizeallowed attribute of its EBML Schema is set to true (see "unknownsizeallowed" attribute of its EBML Schema is set to true (see
Section 11.1.5.10). Section 11.1.6.10).
The use of Unknown-Sized Elements allows for an EBML Element to be The use of Unknown-Sized Elements allows an EBML Element to be
written and read before the size of the EBML Element is known. written and read before the size of the EBML Element is known.
Unknown-Sized Elements MUST only be used if the Element Data Size is Unknown-Sized Elements MUST only be used if the Element Data Size is
not known before the Element Data is written, such as in some cases not known before the Element Data is written, such as in some cases
of data streaming. The end of an Unknown-Sized Element is determined of datastreaming. The end of an Unknown-Sized Element is determined
by whichever comes first: by whichever comes first:
* Any EBML Element that is a valid Parent Element of the Unknown- * Any EBML Element that is a valid Parent Element of the Unknown-
Sized Element according to the EBML Schema, Global Elements Sized Element according to the EBML Schema, Global Elements
excluded. excluded.
* Any valid EBML Element according to the EBML Schema, Global * Any valid EBML Element according to the EBML Schema, Global
Elements excluded, that is not a Descendant Element of the Elements excluded, that is not a Descendant Element of the
Unknown-Sized Element but share a common direct parent, such as a Unknown-Sized Element but shares a common direct parent, such as a
Top-Level Element. Top-Level Element.
* Any EBML Element that is a valid Root Element according to the * Any EBML Element that is a valid Root Element according to the
EBML Schema, Global Elements excluded. EBML Schema, Global Elements excluded.
* The end of the Parent Element with a known size has been reached. * The end of the Parent Element with a known size has been reached.
* The end of the EBML Document, either when reaching the end of the * The end of the EBML Document, either when reaching the end of the
file or because a new EBML Header started. file or because a new EBML Header started.
Consider an Unknown-Sized Element which EBML path is Consider an Unknown-Sized Element whose EBML path is
"\root\level1\level2\elt". When reading a new Element ID, assuming "\root\level1\level2\elt". When reading a new Element ID, assuming
the EBML Path of that new Element is valid, here are some possible the EBML Path of that new Element is valid, here are some possible
and impossible ways that this new Element is ending "elt": and impossible ways that this new Element is ending "elt":
+------------------------------------+---------------------------+ +==================================+============================+
| EBML Path of new element | Status | | EBML Path of new element | Status |
+====================================+===========================+ +==================================+============================+
| "\root\level1\level2" | Ends the Unknown-Sized | | \root\level1\level2 | Ends the Unknown-Sized |
| | Element; as it is a new | | | Element, as it is a new |
| | Parent Element | | | Parent Element |
+------------------------------------+---------------------------+ +----------------------------------+----------------------------+
| "\root\level1" | Ends the Unknown-Sized | | \root\level1 | Ends the Unknown-Sized |
| | Element; as it is a new | | | Element, as it is a new |
| | Parent Element | | | Parent Element |
+------------------------------------+---------------------------+ +----------------------------------+----------------------------+
| "\root" | Ends the Unknown-Sized | | \root | Ends the Unknown-Sized |
| | Element; as it is a new | | | Element, as it is a new |
| | Root Element | | | Root Element |
+------------------------------------+---------------------------+ +----------------------------------+----------------------------+
| "\root2" | Ends the Unknown-Sized | | \root2 | Ends the Unknown-Sized |
| | Element; as it is a new | | | Element, as it is a new |
| | Root Element | | | Root Element |
+------------------------------------+---------------------------+ +----------------------------------+----------------------------+
| "\root\level1\level2\other" | Ends the Unknown-Sized | | \root\level1\level2\other | Ends the Unknown-Sized |
| | Element; as they share | | | Element, as they share the |
| | the same parent | | | same parent |
+------------------------------------+---------------------------+ +----------------------------------+----------------------------+
| "\root\level1\level2\elt" | Ends the Unknown-Sized | | \root\level1\level2\elt | Ends the Unknown-Sized |
| | Element; as they share | | | Element, as they share the |
| | the same parent | | | same parent |
+------------------------------------+---------------------------+ +----------------------------------+----------------------------+
| "\root\level1\level2\elt\inside" | Doesn't end the Unknown- | | \root\level1\level2\elt\inside | Doesn't end the Unknown- |
| | Sized Element; it's a | | | Sized Element; it's a |
| | child of "elt" | | | child of "elt" |
+------------------------------------+---------------------------+ +----------------------------------+----------------------------+
| "\root\level1\level2\elt\<global>" | Global Element is valid; | | \root\level1\level2\elt\<global> | Global Element is valid; |
| | it's a child of "elt" | | | it's a child of "elt" |
+------------------------------------+---------------------------+ +----------------------------------+----------------------------+
| "\root\level1\level2\<global>" | Global Element cannot be | | \root\level1\level2\<global> | Global Element cannot be |
| | interpreted with this | | | interpreted with this |
| | path; while parsing "elt" | | | path; while parsing "elt", |
| | a Global Element can only | | | a Global Element can only |
| | be a child of "elt" | | | be a child of "elt" |
+------------------------------------+---------------------------+ +----------------------------------+----------------------------+
Table 5: Examples of determining the end of an Unknown-Sized Table 5: Examples of determining the end of an Unknown-Sized
Element Element
6.3. Data Size Values 6.3. Data Size Values
For Element Data Sizes encoded at octet lengths from one to eight, For Element Data Sizes encoded at octet lengths from one to eight,
Table 6 depicts the range of possible values that can be encoded as Table 6 depicts the range of possible values that can be encoded as
an Element Data Size. An Element Data Size with an octet length of 8 an Element Data Size. An Element Data Size with an octet length of 8
is able to express a size of 2^56-2 or 72,057,594,037,927,934 octets is able to express a size of 2^(56)-2 or 72,057,594,037,927,934
(or about 72 petabytes). The maximum possible value that can be octets (or about 72 petabytes). The maximum possible value that can
stored as Element Data Size is referred to as VINTMAX. be stored as Element Data Size is referred to as VINTMAX.
+--------------+----------------------+ +==============+======================+
| Octet Length | Possible Value Range | | Octet Length | Possible Value Range |
+==============+======================+ +==============+======================+
| 1 | 0 to 2^7 - 2 | | 1 | 0 to 2^(7) - 2 |
+--------------+----------------------+ +--------------+----------------------+
| 2 | 0 to 2^14 - 2 | | 2 | 0 to 2^(14) - 2 |
+--------------+----------------------+ +--------------+----------------------+
| 3 | 0 to 2^21 - 2 | | 3 | 0 to 2^(21) - 2 |
+--------------+----------------------+ +--------------+----------------------+
| 4 | 0 to 2^28 - 2 | | 4 | 0 to 2^(28) - 2 |
+--------------+----------------------+ +--------------+----------------------+
| 5 | 0 to 2^35 - 2 | | 5 | 0 to 2^(35) - 2 |
+--------------+----------------------+ +--------------+----------------------+
| 6 | 0 to 2^42 - 2 | | 6 | 0 to 2^(42) - 2 |
+--------------+----------------------+ +--------------+----------------------+
| 7 | 0 to 2^49 - 2 | | 7 | 0 to 2^(49) - 2 |
+--------------+----------------------+ +--------------+----------------------+
| 8 | 0 to 2^56 - 2 | | 8 | 0 to 2^(56) - 2 |
+--------------+----------------------+ +--------------+----------------------+
Table 6: Possible range of values Table 6: Possible range of values
that can be stored in VINTs by that can be stored in VINTs, by
octet length. octet length
If the length of Element Data equals 2^(n*7)-1 then the octet length If the length of Element Data equals 2^(n*7)-1, then the octet length
of the Element Data Size MUST be at least n+1. This rule prevents an of the Element Data Size MUST be at least n+1. This rule prevents an
Element Data Size from being expressed as the unknown size value. Element Data Size from being expressed as the unknown-size value.
Table 7 clarifies this rule by showing a valid and invalid expression Table 7 clarifies this rule by showing a valid and invalid expression
of an Element Data Size with a VINT_DATA of 127 (which is equal to of an Element Data Size with a VINT_DATA of 127 (which is equal to
2^(1*7)-1) and 16,383 (which is equal to 2^((2*7)-1).) 2^(1*7)-1) and 16,383 (which is equal to 2^(2*7)-1).
+------------+-------------+-----------------------+--------------+
+============+=============+=======================+==============+
| VINT_WIDTH | VINT_MARKER | VINT_DATA | Element Data | | VINT_WIDTH | VINT_MARKER | VINT_DATA | Element Data |
| | | | Size Status | | | | | Size Status |
+============+=============+=======================+==============+ +============+=============+=======================+==============+
| | 1 | 1111111 | Reserved | | | 1 | 1111111 | Reserved |
| | | | (meaning | | | | | (meaning |
| | | | Unknown) | | | | | Unknown) |
+------------+-------------+-----------------------+--------------+ +------------+-------------+-----------------------+--------------+
| 0 | 1 | 00000001111111 | Valid | | 0 | 1 | 00000001111111 | Valid |
| | | | (meaning 127 | | | | | (meaning 127 |
| | | | octets) | | | | | octets) |
skipping to change at page 15, line 30 skipping to change at line 645
| 0 | 1 | 11111111111111 | Reserved | | 0 | 1 | 11111111111111 | Reserved |
| | | | (meaning | | | | | (meaning |
| | | | Unknown) | | | | | Unknown) |
+------------+-------------+-----------------------+--------------+ +------------+-------------+-----------------------+--------------+
| 00 | 1 | 000000011111111111111 | Valid | | 00 | 1 | 000000011111111111111 | Valid |
| | | | (16,383 | | | | | (16,383 |
| | | | octets) | | | | | octets) |
+------------+-------------+-----------------------+--------------+ +------------+-------------+-----------------------+--------------+
Table 7: Demonstration of VINT_DATA reservation for VINTs of Table 7: Demonstration of VINT_DATA reservation for VINTs of
unknown size. unknown size
7. EBML Element Types 7. EBML Element Types
EBML Elements are defined by an EBML Schema (see Section 11.1) which EBML Elements are defined by an EBML Schema (see Section 11.1), which
MUST declare one of the following EBML Element Types for each EBML MUST declare one of the following EBML Element Types for each EBML
Element. An EBML Element Type defines a concept of storing data Element. An EBML Element Type defines a concept of storing data
within an EBML Element that describes such characteristics as length, within an EBML Element that describes such characteristics as length,
endianness, and definition. endianness, and definition.
EBML Elements which are defined as a Signed Integer Element, Unsigned EBML Elements that are defined as a Signed Integer Element, Unsigned
Integer Element, Float Element, or Date Element use big endian Integer Element, Float Element, or Date Element use big-endian
storage. storage.
7.1. Signed Integer Element 7.1. Signed Integer Element
A Signed Integer Element MUST declare a length from zero to eight A Signed Integer Element MUST declare a length from zero to eight
octets. If the EBML Element is not defined to have a default value, octets. If the EBML Element is not defined to have a default value,
then a Signed Integer Element with a zero-octet length represents an then a Signed Integer Element with a zero-octet length represents an
integer value of zero. integer value of zero.
A Signed Integer Element stores an integer (meaning that it can be A Signed Integer Element stores an integer (meaning that it can be
written without a fractional component) which could be negative, written without a fractional component) that could be negative,
positive, or zero. Signed Integers are stored with two's complement positive, or zero. Signed Integers are stored with two's complement
notation with the leftmost bit being the sign bit. Because EBML notation with the leftmost bit being the sign bit. Because EBML
limits Signed Integers to 8 octets in length a Signed Integer Element limits Signed Integers to 8 octets in length, a Signed Integer
stores a number from -9,223,372,036,854,775,808 to Element stores a number from -9,223,372,036,854,775,808 to
+9,223,372,036,854,775,807. +9,223,372,036,854,775,807.
7.2. Unsigned Integer Element 7.2. Unsigned Integer Element
An Unsigned Integer Element MUST declare a length from zero to eight An Unsigned Integer Element MUST declare a length from zero to eight
octets. If the EBML Element is not defined to have a default value, octets. If the EBML Element is not defined to have a default value,
then an Unsigned Integer Element with a zero-octet length represents then an Unsigned Integer Element with a zero-octet length represents
an integer value of zero. an integer value of zero.
An Unsigned Integer Element stores an integer (meaning that it can be An Unsigned Integer Element stores an integer (meaning that it can be
written without a fractional component) which could be positive or written without a fractional component) that could be positive or
zero. Because EBML limits Unsigned Integers to 8 octets in length an zero. Because EBML limits Unsigned Integers to 8 octets in length,
Unsigned Integer Element stores a number from 0 to an Unsigned Integer Element stores a number from 0 to
18,446,744,073,709,551,615. 18,446,744,073,709,551,615.
7.3. Float Element 7.3. Float Element
A Float Element MUST declare a length of either zero octet (0 bit), A Float Element MUST declare a length of either zero octets (0 bit),
four octets (32 bit) or eight octets (64 bit). If the EBML Element four octets (32 bit), or eight octets (64 bit). If the EBML Element
is not defined to have a default value, then a Float Element with a is not defined to have a default value, then a Float Element with a
zero-octet length represents a numerical value of zero. zero-octet length represents a numerical value of zero.
A Float Element stores a floating-point number in the 32-bit and A Float Element stores a floating-point number in the 32-bit and
64-bit binary interchange format as defined in [IEEE.754.1985]. 64-bit binary interchange format, as defined in [IEEE.754].
7.4. String Element 7.4. String Element
A String Element MUST declare a length in octets from zero to A String Element MUST declare a length in octets from zero to
VINTMAX. If the EBML Element is not defined to have a default value, VINTMAX. If the EBML Element is not defined to have a default value,
then a String Element with a zero-octet length represents an empty then a String Element with a zero-octet length represents an empty
string. string.
A String Element MUST either be empty (zero-length) or contain A String Element MUST either be empty (zero-length) or contain
printable ASCII characters [RFC0020] in the range of 0x20 to 0x7E, printable ASCII characters [RFC0020] in the range of 0x20 to 0x7E,
skipping to change at page 17, line 32 skipping to change at line 741
7.7. Master Element 7.7. Master Element
A Master Element MUST declare a length in octets from zero to VINTMAX A Master Element MUST declare a length in octets from zero to VINTMAX
or be of unknown length. See Section 6 for rules that apply to or be of unknown length. See Section 6 for rules that apply to
elements of unknown length. elements of unknown length.
The Master Element contains zero or more other elements. EBML The Master Element contains zero or more other elements. EBML
Elements contained within a Master Element MUST have the Elements contained within a Master Element MUST have the
EBMLParentPath of their Element Path equal to the EBMLFullPath of the EBMLParentPath of their Element Path equal to the EBMLFullPath of the
Master Element Element Path (see Section 11.1.5.2). Element Data Master Element Element Path (see Section 11.1.6.2). Element Data
stored within Master Elements SHOULD only consist of EBML Elements stored within Master Elements SHOULD only consist of EBML Elements
and SHOULD NOT contain any data that is not part of an EBML Element. and SHOULD NOT contain any data that is not part of an EBML Element.
The EBML Schema identifies what Element IDs are valid within the The EBML Schema identifies what Element IDs are valid within the
Master Elements for that version of the EBML Document Type. Any data Master Elements for that version of the EBML Document Type. Any data
contained within a Master Element that is not part of a Child Element contained within a Master Element that is not part of a Child Element
MUST be ignored. MUST be ignored.
7.8. Binary Element 7.8. Binary Element
A Binary Element MUST declare a length in octets from zero to A Binary Element MUST declare a length in octets from zero to
skipping to change at page 18, line 22 skipping to change at line 774
8.1. EBML Header 8.1. EBML Header
The EBML Header is a declaration that provides processing The EBML Header is a declaration that provides processing
instructions and identification of the EBML Body. The EBML Header of instructions and identification of the EBML Body. The EBML Header of
an EBML Document is analogous to the XML Declaration of an XML an EBML Document is analogous to the XML Declaration of an XML
Document. Document.
The EBML Header documents the EBML Schema (also known as the EBML The EBML Header documents the EBML Schema (also known as the EBML
DocType) that is used to semantically interpret the structure and DocType) that is used to semantically interpret the structure and
meaning of the EBML Document. Additionally the EBML Header documents meaning of the EBML Document. Additionally, the EBML Header
the versions of both EBML and the EBML Schema that were used to write documents the versions of both EBML and the EBML Schema that were
the EBML Document and the versions required to read the EBML used to write the EBML Document and the versions required to read the
Document. EBML Document.
The EBML Header MUST contain a single Master Element with an Element The EBML Header MUST contain a single Master Element with an Element
Name of EBML and Element ID of 0x1A45DFA3 (see Section 11.2.1) and Name of "EBML" and Element ID of "0x1A45DFA3" (see Section 11.2.1);
any number of additional EBML Elements within it. The EBML Header of the Master Element may have any number of additional EBML Elements
an EBML Document that uses an EBMLVersion of 1 MUST only contain EBML within it. The EBML Header of an EBML Document that uses an
Elements that are defined as part of this document. EBMLVersion of 1 MUST only contain EBML Elements that are defined as
part of this document.
Elements within an EBML Header can be at most 4 octets long, except Elements within an EBML Header can be at most 4 octets long, except
for the EBML Element with Element Name EBML and Element ID for the EBML Element with Element Name "EBML" and Element ID
"0x1A45DFA3" (see Section 11.2.1), which can be up to 8 octets long. "0x1A45DFA3" (see Section 11.2.1); this Element can be up to 8 octets
long.
8.2. EBML Body 8.2. EBML Body
All data of an EBML Document following the EBML Header is the EBML All data of an EBML Document following the EBML Header is the EBML
Body. The end of the EBML Body, as well as the end of the EBML Body. The end of the EBML Body, as well as the end of the EBML
Document that contains the EBML Body, is reached at whichever comes Document that contains the EBML Body, is reached at whichever comes
first: the beginning of a new EBML Header at the Root Level or the first: the beginning of a new EBML Header at the Root Level or the
end of the file. This document defines precisely which EBML Elements end of the file. This document defines precisely which EBML Elements
are to be used within the EBML Header, but does not name or define are to be used within the EBML Header but does not name or define
which EBML Elements are to be used within the EBML Body. The which EBML Elements are to be used within the EBML Body. The
definition of which EBML Elements are to be used within the EBML Body definition of which EBML Elements are to be used within the EBML Body
is defined by an EBML Schema. is defined by an EBML Schema.
Within the EBML Body, the maximum octet length allowed for any Within the EBML Body, the maximum octet length allowed for any
Element ID is set by the EBMLMaxIDLength Element of the EBML Header Element ID is set by the EBMLMaxIDLength Element of the EBML Header,
and the maximum octet length allowed for any Element Data Size is set and the maximum octet length allowed for any Element Data Size is set
by the EBMLMaxSizeLength Element of the EBML Header. by the EBMLMaxSizeLength Element of the EBML Header.
9. EBML Stream 9. EBML Stream
An EBML Stream is a file that consists of one or more EBML Documents An EBML Stream is a file that consists of one or more EBML Documents
that are concatenated together. An occurrence of a EBML Header at that are concatenated together. An occurrence of an EBML Header at
the Root Level marks the beginning of an EBML Document. the Root Level marks the beginning of an EBML Document.
10. EBML Versioning 10. EBML Versioning
An EBML Document handles 2 different versions: the version of the An EBML Document handles 2 different versions: the version of the
EBML Header and the version of the EBML Body. Both versions are EBML Header and the version of the EBML Body. Both versions are
meant to be backward compatible. meant to be backward compatible.
10.1. EBML Header Version 10.1. EBML Header Version
skipping to change at page 19, line 32 skipping to change at line 835
EBMLReadVersion. EBMLReadVersion.
10.2. EBML Document Version 10.2. EBML Document Version
The version of the EBML Body is found in EBMLDocTypeVersion. A The version of the EBML Body is found in EBMLDocTypeVersion. A
parser for the particular DocType format can read the EBML Document parser for the particular DocType format can read the EBML Document
if it can read either the EBMLDocTypeVersion version of that format if it can read either the EBMLDocTypeVersion version of that format
or a version equal or higher than the one found in or a version equal or higher than the one found in
EBMLDocTypeReadVersion. EBMLDocTypeReadVersion.
11. Elements semantic 11. Elements semantics
11.1. EBML Schema 11.1. EBML Schema
An EBML Schema is a well-formed XML Document [W3C.REC-xml-20081126] An EBML Schema is a well-formed XML Document [XML] that defines the
that defines the properties, arrangement, and usage of EBML Elements properties, arrangement, and usage of EBML Elements that compose a
that compose a specific EBML Document Type. The relationship of an specific EBML Document Type. The relationship of an EBML Schema to
EBML Schema to an EBML Document is analogous to the relationship of an EBML Document is analogous to the relationship of an XML Schema
an XML Schema [W3C.REC-xmlschema-0-20041028] to an XML Document [XML-SCHEMA] to an XML Document [XML]. An EBML Schema MUST be
[W3C.REC-xml-20081126]. An EBML Schema MUST be clearly associated clearly associated with one or more EBML Document Types. An EBML
with one or more EBML Document Types. An EBML Document Type is Document Type is identified by a string stored within the EBML Header
identified by a string stored within the EBML Header in the DocType in the DocType Element -- for example, Matroska or WebM (see
Element; for example matroska or webm (see Section 11.2.6). The Section 11.2.6). The DocType value for an EBML Document Type MUST be
DocType value for an EBML Document Type MUST be unique, persistent unique, persistent, and described in the IANA registry (see
and described in the IANA Registry (see Section 17.2). Section 17.2).
An EBML Schema MUST declare exactly one EBML Element at Root Level An EBML Schema MUST declare exactly one EBML Element at Root Level
(referred to as the Root Element) that occurs exactly once within an (referred to as the Root Element) that occurs exactly once within an
EBML Document. The Void Element MAY also occur at Root Level but is EBML Document. The Void Element MAY also occur at Root Level but is
not a Root Element (see Section 11.3.2). not a Root Element (see Section 11.3.2).
The EBML Schema MUST document all Elements of the EBML Body. The The EBML Schema MUST document all Elements of the EBML Body. The
EBML Schema does not document Global Elements that are defined by EBML Schema does not document Global Elements that are defined by
this document (namely the Void Element and the CRC-32 Element). this document (namely, the Void Element and the CRC-32 Element).
The EBML Schema MUST NOT use the Element ID "0x1A45DFA3" which is The EBML Schema MUST NOT use the Element ID "0x1A45DFA3", which is
reserved for the EBML Header for resynchronization purpose. reserved for the EBML Header for the purpose of resynchronization.
An EBML Schema MAY constrain the use of EBML Header Elements (see An EBML Schema MAY constrain the use of EBML Header Elements (see
Section 11.2) by adding or constraining that Element's "range" Section 11.2) by adding or constraining that Element's "range"
attribute. For example, an EBML Schema MAY constrain the attribute. For example, an EBML Schema MAY constrain the
EBMLMaxSizeLength to a maximum value of "8" or MAY constrain the EBMLMaxSizeLength to a maximum value of "8" or MAY constrain the
EBMLVersion to only support a value of "1". If an EBML Schema adopts EBMLVersion to only support a value of "1". If an EBML Schema adopts
the EBML Header Element as-is, then it is not required to document the EBML Header Element as is, then it is not required to document
that Element within the EBML Schema. If an EBML Schema constrains that Element within the EBML Schema. If an EBML Schema constrains
the range of an EBML Header Element, then that Element MUST be the range of an EBML Header Element, then that Element MUST be
documented within an "<element>" node of the EBML Schema. This documented within an "<element>" node of the EBML Schema. This
document provides an example of an EBML Schema, see Section 11.1.1. document provides an example of an EBML Schema; see Section 11.1.1.
11.1.1. EBML Schema Example 11.1.1. EBML Schema Example
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<EBMLSchema xmlns="https://ietf.org/cellar/ebml" <EBMLSchema xmlns="urn:ietf:rfc:8794"
docType="files-in-ebml-demo" version="1"> docType="files-in-ebml-demo" version="1">
<!-- constraints to the range of two EBML Header Elements --> <!-- constraints to the range of two EBML Header Elements -->
<element name="EBMLReadVersion" path="\EBML\EBMLReadVersion" <element name="EBMLReadVersion" path="\EBML\EBMLReadVersion"
id="0x42F7" minOccurs="1" maxOccurs="1" range="1" default="1" id="0x42F7" minOccurs="1" maxOccurs="1" range="1" default="1"
type="uinteger"/> type="uinteger"/>
<element name="EBMLMaxSizeLength" <element name="EBMLMaxSizeLength"
path="\EBML\EBMLMaxSizeLength" id="0x42F3" minOccurs="1" path="\EBML\EBMLMaxSizeLength" id="0x42F3" minOccurs="1"
maxOccurs="1" range="8" default="8" type="uinteger"/> maxOccurs="1" range="8" default="8" type="uinteger"/>
<!-- Root Element--> <!-- Root Element-->
<element name="Files" path="\Files" id="0x1946696C" <element name="Files" path="\Files" id="0x1946696C"
type="master"> type="master">
<documentation lang="en" purpose="definition">Container of data and <documentation lang="en"
purpose="definition">Container of data and
attributes representing one or many files.</documentation> attributes representing one or many files.</documentation>
</element> </element>
<element name="File" path="\Files\File" id="0x6146" <element name="File" path="\Files\File" id="0x6146"
type="master" minOccurs="1"> type="master" minOccurs="1">
<documentation lang="en" purpose="definition"> <documentation lang="en" purpose="definition">
An attached file. An attached file.
</documentation> </documentation>
</element> </element>
<element name="FileName" path="\Files\File\FileName" <element name="FileName" path="\Files\File\FileName"
id="0x614E" type="utf-8" id="0x614E" type="utf-8"
skipping to change at page 21, line 28 skipping to change at line 928
</documentation> </documentation>
</element> </element>
<element name="Data" path="\Files\File\Data" id="0x4664" <element name="Data" path="\Files\File\Data" id="0x4664"
type="binary" minOccurs="1"> type="binary" minOccurs="1">
<documentation lang="en" purpose="definition"> <documentation lang="en" purpose="definition">
The data of the file. The data of the file.
</documentation> </documentation>
</element> </element>
</EBMLSchema> </EBMLSchema>
11.1.2. <EBMLSchema> Element 11.1.2. "<EBMLSchema>" Element
Within an EBML Schema, the XPath [W3C.REC-xpath-19991116] of Within an EBML Schema, the XPath [XPath] of the "<EBMLSchema>"
"<EBMLSchema>" element is "/EBMLSchema". element is "/EBMLSchema".
As an XML Document, the EBML Schema MUST use "<EBMLSchema>" as the When used as an XML Document, the EBML Schema MUST use "<EBMLSchema>"
top level element. The "<EBMLSchema>" element can contain as the top-level element. The "<EBMLSchema>" element can contain
"<element>" sub-elements. "<element>" subelements.
11.1.3. <EBMLSchema> Attributes 11.1.3. "<EBMLSchema>" Namespace
Within an EBML Schema the "<EBMLSchema>" element uses the following The namespace URI for elements of the EBML Schema is a URN as defined
attributes: by [RFC8141] that uses the namespace identifier 'ietf' defined by
[RFC2648] and extended by [RFC3688]. This URN is
"urn:ietf:rfc:8794".
11.1.3.1. docType 11.1.4. "<EBMLSchema>" Attributes
Within an EBML Schema, the XPath of "@docType" attribute is Within an EBML Schema, the "<EBMLSchema>" element uses the following
attributes to define an EBML Element:
11.1.4.1. docType
Within an EBML Schema, the XPath of the "@docType" attribute is
"/EBMLSchema/@docType". "/EBMLSchema/@docType".
The docType lists the official name of the EBML Document Type that is The docType lists the official name of the EBML Document Type that is
defined by the EBML Schema; for example, "<EBMLSchema defined by the EBML Schema; for example, "<EBMLSchema
docType="matroska">". docType="matroska">".
The docType attribute is REQUIRED within the "<EBMLSchema>" Element. The "docType" attribute is REQUIRED within the "<EBMLSchema>"
Element.
11.1.3.2. version 11.1.4.2. version
Within an EBML Schema, the XPath of "@version" attribute is Within an EBML Schema, the XPath of the "@version" attribute is
"/EBMLSchema/@version". "/EBMLSchema/@version".
The version lists a non-negative integer that specifies the version The version lists a nonnegative integer that specifies the version of
of the docType documented by the EBML Schema. Unlike XML Schemas, an the docType documented by the EBML Schema. Unlike XML Schemas, an
EBML Schema documents all versions of a docType's definition rather EBML Schema documents all versions of a docType's definition rather
than using separate EBML Schemas for each version of a docType. EBML than using separate EBML Schemas for each version of a docType. EBML
Elements may be introduced and deprecated by using the minver and Elements may be introduced and deprecated by using the "minver" and
maxver attributes of "<element>". "maxver" attributes of "<element>".
The version attribute is REQUIRED within the "<EBMLSchema>" Element. The "version" attribute is REQUIRED within the "<EBMLSchema>"
Element.
11.1.3.3. ebml 11.1.4.3. ebml
Within an EBML Schema, the XPath of "@ebml" attribute is Within an EBML Schema, the XPath of the "@ebml" attribute is
"/EBMLSchema/@ebml". "/EBMLSchema/@ebml".
The ebml attribute is a positive integer that specifies the version The "ebml" attribute is a positive integer that specifies the version
of the EBML Header (see Section 11.2.2) used by the EBML Schema. If of the EBML Header (see Section 11.2.2) used by the EBML Schema. If
the attribute is omitted, the EBML Header version is 1. the attribute is omitted, the EBML Header version is 1.
11.1.4. <element> Element 11.1.5. "<element>" Element
Within an EBML Schema, the XPath of "<element>" element is Within an EBML Schema, the XPath of the "<element>" element is
"/EBMLSchema/element". "/EBMLSchema/element".
Each "<element>" defines one EBML Element through the use of several Each "<element>" defines one EBML Element through the use of several
attributes that are defined in Section 11.1.5. EBML Schemas MAY attributes that are defined in Section 11.1.6. EBML Schemas MAY
contain additional attributes to extend the semantics but MUST NOT contain additional attributes to extend the semantics but MUST NOT
conflict with the definitions of the "<element>" attributes defined conflict with the definitions of the "<element>" attributes defined
within this document. within this document.
The "<element>" nodes contain a description of the meaning and use of The "<element>" nodes contain a description of the meaning and use of
the EBML Element stored within one or more "<documentation>" sub- the EBML Element stored within one or more "<documentation>"
elements, followed by optional "<implementation_note>" sub-elements, subelements, followed by optional "<implementation_note>"
followed by zero or one "<restriction>" sub-element, followed by subelements, followed by zero or one "<restriction>" subelement,
optional "<extension>" sub-elements. All "<element>" nodes MUST be followed by optional "<extension>" subelements. All "<element>"
sub-elements of the "<EBMLSchema>". nodes MUST be subelements of the "<EBMLSchema>".
11.1.5. <element> Attributes 11.1.6. "<element>" Attributes
Within an EBML Schema the "<element>" uses the following attributes Within an EBML Schema, the "<element>" uses the following attributes
to define an EBML Element: to define an EBML Element:
11.1.5.1. name 11.1.6.1. name
Within an EBML Schema, the XPath of "@name" attribute is Within an EBML Schema, the XPath of the "@name" attribute is
"/EBMLSchema/element/@name". "/EBMLSchema/element/@name".
The name provides the human-readable name of the EBML Element. The The name provides the human-readable name of the EBML Element. The
value of the name MUST be in the form of characters "A" to "Z", "a" value of the name MUST be in the form of characters "A" to "Z", "a"
to "z", "0" to "9", "-" and ".". The first character of the name to "z", "0" to "9", "-", and ".". The first character of the name
MUST be in the form of an "A" to "Z", "a" to "z", "0" to "9" MUST be in the form of an "A" to "Z", "a" to "z", or "0" to "9"
character. character.
The name attribute is REQUIRED. The "name" attribute is REQUIRED.
11.1.5.2. path 11.1.6.2. path
Within an EBML Schema, the XPath of "@path" attribute is Within an EBML Schema, the XPath of the "@path" attribute is
"/EBMLSchema/element/@path". "/EBMLSchema/element/@path".
The path defines the allowed storage locations of the EBML Element The path defines the allowed storage locations of the EBML Element
within an EBML Document. This path MUST be defined with the full within an EBML Document. This path MUST be defined with the full
hierarchy of EBML Elements separated with a "\". The top EBML hierarchy of EBML Elements separated with a "\". The top EBML
Element in the path hierarchy being the first in the value. The Element in the path hierarchy is the first in the value. The syntax
syntax of the path attribute is defined using this Augmented Backus- of the "path" attribute is defined using this Augmented Backus-Naur
Naur Form (ABNF) [RFC5234] with the case sensitive update [RFC7405] Form (ABNF) [RFC5234] with the case-sensitive update [RFC7405]
notation: notation:
The path attribute is REQUIRED. The "path" attribute is REQUIRED.
EBMLFullPath = EBMLParentPath EBMLElement EBMLFullPath = EBMLParentPath EBMLElement
EBMLParentPath = PathDelimiter [EBMLParents] EBMLParentPath = PathDelimiter [EBMLParents]
EBMLParents = 0*IntermediatePathAtom EBMLLastParent EBMLParents = 0*IntermediatePathAtom EBMLLastParent
IntermediatePathAtom = EBMLPathAtom / GlobalPlaceholder IntermediatePathAtom = EBMLPathAtom / GlobalPlaceholder
EBMLLastParent = EBMLPathAtom / GlobalPlaceholder EBMLLastParent = EBMLPathAtom / GlobalPlaceholder
EBMLPathAtom = [IsRecursive] EBMLAtomName PathDelimiter EBMLPathAtom = [IsRecursive] EBMLAtomName PathDelimiter
EBMLElement = [IsRecursive] EBMLAtomName EBMLElement = [IsRecursive] EBMLAtomName
PathDelimiter = "\" PathDelimiter = "\"
IsRecursive = "+" IsRecursive = "+"
EBMLAtomName = ALPHA / DIGIT 0*EBMLNameChar EBMLAtomName = ALPHA / DIGIT 0*EBMLNameChar
EBMLNameChar = ALPHA / DIGIT / "-" / "." EBMLNameChar = ALPHA / DIGIT / "-" / "."
GlobalPlaceholder = "(" GlobalParentOccurence "\)" GlobalPlaceholder = "(" GlobalParentOccurrence "\)"
GlobalParentOccurence = [PathMinOccurrence] "-" [PathMaxOccurrence] GlobalParentOccurrence = [PathMinOccurrence] "-" [PathMaxOccurrence]
PathMinOccurrence = 1*DIGIT ; no upper limit PathMinOccurrence = 1*DIGIT ; no upper limit
PathMaxOccurrence = 1*DIGIT ; no upper limit PathMaxOccurrence = 1*DIGIT ; no upper limit
The "*", "(" and ")" symbols are interpreted as defined in [RFC5234].
The "*", "(", and ")" symbols are interpreted as defined in
[RFC5234].
The EBMLAtomName of the EBMLElement part MUST be equal to the "@name" The EBMLAtomName of the EBMLElement part MUST be equal to the "@name"
attribute of the EBML Schema. If the EBMLElement part contains an attribute of the EBML Schema. If the EBMLElement part contains an
IsRecursive part, the EBML Element can occur within itself IsRecursive part, the EBML Element can occur within itself
recursively (see Section 11.1.5.11). recursively (see Section 11.1.6.11).
The starting PathDelimiter of EBMLParentPath corresponds to the root The starting PathDelimiter of EBMLParentPath corresponds to the root
of the EBML Document. of the EBML Document.
The "@path" value MUST be unique within the EBML Schema. The "@id" The "@path" value MUST be unique within the EBML Schema. The "@id"
value corresponding to this "@path" MUST NOT be defined for use value corresponding to this "@path" MUST NOT be defined for use
within another EBML Element with the same EBMLParentPath as this within another EBML Element with the same EBMLParentPath as this
"@path". "@path".
A path with a GlobalPlaceholder as the EBMLLastParent defines a A path with a GlobalPlaceholder as the EBMLLastParent defines a
Global Element; see Section 11.3. If the element has no Global Element; see Section 11.3. If the element has no
EBMLLastParent part or the EBMLLastParent part is not a EBMLLastParent part, or the EBMLLastParent part is not a
GlobalPlaceholder then the Element is not a Global Element. GlobalPlaceholder, then the Element is not a Global Element.
The GlobalParentOccurence part is interpreted as the amount of valid The GlobalParentOccurrence part is interpreted as the number of valid
EBMLPathAtom parts that can replace the GlobalPlaceholder in the EBMLPathAtom parts that can replace the GlobalPlaceholder in the
path. PathMinOccurrence represents the minimum amount of path. PathMinOccurrence represents the minimum number of
EBMLPathAtom required to replace the GlobalPlaceholder. EBMLPathAtoms required to replace the GlobalPlaceholder.
PathMaxOccurrence represents the maximum amount of EBMLPathAtom PathMaxOccurrence represents the maximum number of EBMLPathAtoms
possible to replace the GlobalPlaceholder. possible to replace the GlobalPlaceholder.
If PathMinOccurrence is not present then that GlobalParentOccurence If PathMinOccurrence is not present, then that GlobalParentOccurrence
has a PathMinOccurrence value of 0. If PathMaxOccurrence is not has a PathMinOccurrence value of 0. If PathMaxOccurrence is not
present then there is no upper bound for the permitted amount of present, then there is no upper bound for the permitted number of
EBMLPathAtom possible to replace the GlobalPlaceholder. EBMLPathAtoms possible to replace the GlobalPlaceholder.
PathMaxOccurrence MUST NOT have the value 0 as it would mean no PathMaxOccurrence MUST NOT have the value 0, as it would mean no
EBMLPathAtom can replace the GlobalPlaceholder and the EBMLFullPath EBMLPathAtom can replace the GlobalPlaceholder, and the EBMLFullPath
would be the same without that GlobalPlaceholder part. would be the same without that GlobalPlaceholder part.
PathMaxOccurrence MUST be bigger or equal to PathMinOccurrence. PathMaxOccurrence MUST be bigger than, or equal to,
PathMinOccurrence.
For example in "\a\(0-1\)global", the Element path "\a\x\global" For example, in "\a\(0-1\)global", the Element path "\a\x\global"
corresponds to an EBMLPathAtom occurence of 1. The Element corresponds to an EBMLPathAtom occurrence of 1. The Element
"\a\x\y\global" corresponds to an EBMLPathAtom occurence of 2, etc. "\a\x\y\global" corresponds to an EBMLPathAtom occurrence of 2, etc.
In those case "\a\x" or "\a\x\y" MUST be valid pathes to be able to In those cases, "\a\x" or "\a\x\y" MUST be valid paths to be able to
contain the element "global". contain the element "global".
Consider another EBML Path "\a\(1-\)global". There has to be at Consider another EBML Path, "\a\(1-\)global". There has to be at
least one EBMLPathAtom between the "\a\" part and "global". So the least one EBMLPathAtom between the "\a\" part and "global". So the
"global" EBML Element cannot be found inside the "\a" EBML Element as "global" EBML Element cannot be found inside the "\a" EBML Element,
it means the resulting path "\a\global" has no EBMLPathAtom between as it means the resulting path "\a\global" has no EBMLPathAtom
the "\a\" and "global". But the "global" EBML Element can be found between the "\a\" and "global". However, the "global" EBML Element
inside the "\a\b" EBML Element as the resulting path "\a\b\global" can be found inside the "\a\b" EBML Element, because the resulting
has one EBMLPathAtom between the "\a\" and "global". Or it can be path, "\a\b\global", has one EBMLPathAtom between the "\a\" and
found inside the "\a\b\c" EBML Element (two EBMLPathAtom), or inside "global". Alternatively, it can be found inside the "\a\b\c" EBML
the "\a\b\c\d" EBML Element (three EBMLPathAtom), etc. Element (two EBMLPathAtom), or inside the "\a\b\c\d" EBML Element
(three EBMLPathAtom), etc.
Consider another EBML Path "\a\(0-1\)global". There has to be at Consider another EBML Path, "\a\(0-1\)global". There has to be at
most one EBMLPathAtom between the "\a\" part and "global". So the most one EBMLPathAtom between the "\a\" part and "global". So the
"global" EBML Element can be found inside the "\a" EBML Element (0 "global" EBML Element can be found inside either the "\a" EBML
EBMLPathAtom replacing GlobalPlaceholder) or inside the "\a\b" EBML Element (0 EBMLPathAtom replacing GlobalPlaceholder) or the "\a\b"
Element (one replacement EBMLPathAtom). But it cannot be found EBML Element (one replacement EBMLPathAtom). But it cannot be found
inside the "\a\b\c" EBML Element as the resulting path inside the "\a\b\c" EBML Element, because the resulting path,
"\a\b\c\global" has two EBMLPathAtom between "\a\" and "global". "\a\b\c\global", has two EBMLPathAtom between "\a\" and "global".
11.1.5.3. id 11.1.6.3. id
Within an EBML Schema, the XPath of "@id" attribute is "/EBMLSchema/ Within an EBML Schema, the XPath of the "@id" attribute is
element/@id". "/EBMLSchema/element/@id".
The Element ID encoded as a Variable Size Integer expressed in The Element ID is encoded as a Variable-Size Integer. It is read and
hexadecimal notation prefixed by a 0x that is read and stored in big- stored in big-endian order. In the EBML Schema, it is expressed in
endian order. To reduce the risk of false positives while parsing hexadecimal notation prefixed by a 0x. To reduce the risk of false
EBML Streams, the Element IDs of the Root Element and Top-Level positives while parsing EBML Streams, the Element IDs of the Root
Elements SHOULD be at least 4 octets in length. Element IDs defined Element and Top-Level Elements SHOULD be at least 4 octets in length.
for use at Root Level or directly under the Root Level MAY use Element IDs defined for use at Root Level or directly under the Root
shorter octet lengths to facilitate padding and optimize edits to Level MAY use shorter octet lengths to facilitate padding and
EBML Documents; for instance, the Void Element uses an Element ID optimize edits to EBML Documents; for instance, the Void Element uses
with a one octet length to allow its usage in more writing and an Element ID with a length of one octet to allow its usage in more
editing scenarios. writing and editing scenarios.
The Element ID of any Element found within an EBML Document MUST only The Element ID of any Element found within an EBML Document MUST only
match a single "@path" value of its corresponding EBML Schema, but a match a single "@path" value of its corresponding EBML Schema, but a
separate instance of that Element ID value defined by the EBML Schema separate instance of that Element ID value defined by the EBML Schema
MAY occur within a different "@path". If more than one Element is MAY occur within a different "@path". If more than one Element is
defined to use the same "@id" value, then the "@path" values of those defined to use the same "@id" value, then the "@path" values of those
Elements MUST NOT share the same EBMLParentPath. Elements MUST NOT Elements MUST NOT share the same EBMLParentPath. Elements MUST NOT
be defined to use the same "@id" value if one of their common Parent be defined to use the same "@id" value if one of their common Parent
Elements could be an Unknown-Size Element. Elements could be an Unknown-Sized Element.
The id attribute is REQUIRED. The "id" attribute is REQUIRED.
11.1.5.4. minOccurs 11.1.6.4. minOccurs
Within an EBML Schema, the XPath of "@minOccurs" attribute is Within an EBML Schema, the XPath of the "@minOccurs" attribute is
"/EBMLSchema/element/@minOccurs". "/EBMLSchema/element/@minOccurs".
The minOccurs is a non-negative integer expressing the minimum "minOccurs" is a nonnegative integer expressing the minimum permitted
permitted number of occurrences of this EBML Element within its number of occurrences of this EBML Element within its Parent Element.
Parent Element.
Each instance of the Parent Element MUST contain at least this many Each instance of the Parent Element MUST contain at least this many
instances of this EBML Element. If the EBML Element has an empty instances of this EBML Element. If the EBML Element has an empty
EBMLParentPath then minOccurs refers to constraints on the occurrence EBMLParentPath, then "minOccurs" refers to constraints on the
of the EBML Element within the EBML Document. EBML Elements with occurrence of the EBML Element within the EBML Document. EBML
minOccurs set to "1" that also have a default value (see Elements with "minOccurs" set to "1" that also have a default value
Section 11.1.5.8) declared are not REQUIRED to be stored but are (see Section 11.1.6.8) declared are not REQUIRED to be stored but are
REQUIRED to be interpreted, see Section 11.1.18. REQUIRED to be interpreted; see Section 11.1.19.
An EBML Element defined with a minOccurs value greater than zero is An EBML Element defined with a "minOccurs" value greater than zero is
called a Mandatory EBML Element. called a Mandatory EBML Element.
The minOccurs attribute is OPTIONAL. If the minOccurs attribute is The "minOccurs" attribute is OPTIONAL. If the "minOccurs" attribute
not present then that EBML Element has a minOccurs value of 0. is not present, then that EBML Element has a "minOccurs" value of 0.
The semantic meaning of minOccurs within an EBML Schema is analogous The semantic meaning of "minOccurs" within an EBML Schema is
to the meaning of minOccurs within an XML Schema. analogous to the meaning of "minOccurs" within an XML Schema.
11.1.5.5. maxOccurs 11.1.6.5. maxOccurs
Within an EBML Schema, the XPath of "@maxOccurs" attribute is Within an EBML Schema, the XPath of the "@maxOccurs" attribute is
"/EBMLSchema/element/@maxOccurs". "/EBMLSchema/element/@maxOccurs".
The maxOccurs is a non-negative integer expressing the maximum "maxOccurs" is a nonnegative integer expressing the maximum permitted
permitted number of occurrences of this EBML Element within its number of occurrences of this EBML Element within its Parent Element.
Parent Element.
Each instance of the Parent Element MUST contain at most this many Each instance of the Parent Element MUST contain at most this many
instances of this EBML Element, including the unwritten mandatory instances of this EBML Element, including the unwritten mandatory
element with a default value, see Section 11.1.18. If the EBML element with a default value; see Section 11.1.19. If the EBML
Element has an empty EBMLParentPath then maxOccurs refers to Element has an empty EBMLParentPath, then "maxOccurs" refers to
constraints on the occurrence of the EBML Element within the EBML constraints on the occurrence of the EBML Element within the EBML
Document. Document.
The maxOccurs attribute is OPTIONAL. If the maxOccurs attribute is The "maxOccurs" attribute is OPTIONAL. If the "maxOccurs" attribute
not present then there is no upper bound for the permitted number of is not present, then there is no upper bound for the permitted number
occurrences of this EBML Element within its Parent Element or within of occurrences of this EBML Element within its Parent Element or
the EBML Document depending on whether the EBMLParentPath of the EBML within the EBML Document, depending on whether or not the
Element is empty or not. EBMLParentPath of the EBML Element is empty.
The semantic meaning of maxOccurs within an EBML Schema is analogous The semantic meaning of "maxOccurs" within an EBML Schema is
to the meaning of maxOccurs within an XML Schema, when it is not analogous to the meaning of "maxOccurs" within an XML Schema; when it
present it's similar to xml:maxOccurs="unbounded" in an XML Schema. is not present, it's similar to xml:maxOccurs="unbounded" in an XML
Schema.
11.1.5.6. range 11.1.6.6. range
Within an EBML Schema, the XPath of "@range" attribute is Within an EBML Schema, the XPath of the "@range" attribute is
"/EBMLSchema/element/@range". "/EBMLSchema/element/@range".
A numerical range for EBML Elements which are of numerical types A numerical range for EBML Elements that are of numerical types
(Unsigned Integer, Signed Integer, Float, and Date). If specified (Unsigned Integer, Signed Integer, Float, and Date). If specified,
the value of the EBML Element MUST be within the defined range. See the value of the EBML Element MUST be within the defined range. See
Section 11.1.5.6.1 for rules applied to expression of range values. Section 11.1.6.6.1 for rules applied to expression of range values.
The range attribute is OPTIONAL. If the range attribute is not The "range" attribute is OPTIONAL. If the "range" attribute is not
present then any value legal for the type attribute is valid. present, then any value legal for the "type" attribute is valid.
11.1.5.6.1. Expression of range 11.1.6.6.1. Expression of range
The range attribute MUST only be used with EBML Elements that are The "range" attribute MUST only be used with EBML Elements that are
either signed integer, unsigned integer, float, or date. The either signed integer, unsigned integer, float, or date. The
expression defines the upper, lower, exact or excluded value of the expression defines the upper, lower, exact, or excluded value of the
EBML Element and optionally an upper boundary value combined with a EBML Element and optionally an upper boundary value combined with a
lower boundary. The range expression may contain whitespace (using lower boundary. The range expression may contain whitespace (using
the ASCII 0x20 character) for readability but whitespace within a the ASCII 0x20 character) for readability, but whitespace within a
range expression MUST NOT convey meaning. range expression MUST NOT convey meaning.
To set a fixed value for the range, the value is used as the To set a fixed value for the range, the value is used as the
attribute value. For example "1234" means the EBML element always attribute value. For example, "1234" means the EBML element always
has the value 1234. The value can be prefixed with "not" to indicate has the value 1234. The value can be prefixed with "not" to indicate
that the fixed value MUST NOT be used for that Element. For example that the fixed value MUST NOT be used for that Element. For example,
"not 1234" means the Element can use all values of its type except "not 1234" means the Element can use all values of its type except
1234. 1234.
For an exclusive lower boundary the ">" sign is used and the ">=" The ">" sign is used for an exclusive lower boundary, and the ">="
sign is used for an inclusive lower boundary. For example ">3" sign is used for an inclusive lower boundary. For example, ">3"
meaning the Element value MUST be greater than 3 or ">=0x1p+0" means the Element value MUST be greater than 3, and ">=0x1p+0" means
meaning the Element value MUST be greater than or equal to the the Element value MUST be greater than or equal to the floating value
floating value 1.0, see Section 11.1.17. 1.0; see Section 11.1.18.
For an exclusive upper boundary the "<" sign is used and the "<=" The "<" sign is used for an exclusive upper boundary, and the "<="
sign is used for an inclusive upper boundary. For example "<-2" sign is used for an inclusive upper boundary. For example, "<-2"
meaning the Element value MUST be less than -2 or "<=10" meaning the means the Element value MUST be less than -2, and "<=10" means the
Element value MUST be less than or equal to the 10. Element value MUST be less than or equal to 10.
The lower and upper bounds can be combined into an expression to form The lower and upper bounds can be combined into an expression to form
a closed boundary. The lower boundary coming first followed by the a closed boundary. The lower boundary comes first, followed by the
upper boundary, separated by a comma. For example ">3,<= 20" means upper boundary, separated by a comma. For example, ">3,<= 20" means
the Element value MUST be greater than 3 and less than or equal to the Element value MUST be greater than 3 and less than or equal to
20. 20.
A special form of lower and upper bounds using the "-" separator is A special form of lower and upper bounds using the "-" separator is
possible, meaning the Element value MUST be greater than or to the possible, meaning the Element value MUST be greater than, or equal
first value and MUST be less than or equal to the second value. For to, the first value and MUST be less than or equal to the second
example "1-10" is equivalent to ">=1,<=10". If the upper boundary is value. For example, "1-10" is equivalent to ">=1,<=10". If the
negative, only the latter form MUST be used. upper boundary is negative, the "range" attribute MUST only use the
latter form.
11.1.5.7. length 11.1.6.7. length
Within an EBML Schema, the XPath of "@length" attribute is Within an EBML Schema, the XPath of the "@length" attribute is
"/EBMLSchema/element/@length". "/EBMLSchema/element/@length".
A value to express the valid length of the Element Data as written The "length" attribute is a value to express the valid length of the
measured in octets. The length provides a constraint in addition to Element Data as written, measured in octets. The length provides a
the Length value of the definition of the corresponding EBML Element constraint in addition to the Length value of the definition of the
Type. This length MUST be expressed as either a non-negative integer corresponding EBML Element Type. This length MUST be expressed as
or a range (see Section 11.1.5.6.1) that consists of only non- either a nonnegative integer or a range (see Section 11.1.6.6.1) that
negative integers and valid operators. consists of only nonnegative integers and valid operators.
The length attribute is OPTIONAL. If the length attribute is not The "length" attribute is OPTIONAL. If the "length" attribute is not
present for that EBML Element then that EBML Element is only limited present for that EBML Element, then that EBML Element is only limited
in length by the definition of the associated EBML Element Type. in length by the definition of the associated EBML Element Type.
11.1.5.8. default 11.1.6.8. default
Within an EBML Schema, the XPath of "@default" attribute is Within an EBML Schema, the XPath of the "@default" attribute is
"/EBMLSchema/element/@default". "/EBMLSchema/element/@default".
If an Element is mandatory (has a minOccurs value greater than zero) If an Element is mandatory (has a "minOccurs" value greater than
but not written within its Parent Element or stored as an Empty zero) but not written within its Parent Element or stored as an Empty
Element, then the EBML Reader of the EBML Document MUST semantically Element, then the EBML Reader of the EBML Document MUST semantically
interpret the EBML Element as present with this specified default interpret the EBML Element as present with this specified default
value for the EBML Element. An unwritten mandatory Element with a value for the EBML Element. An unwritten mandatory Element with a
declared default value is semantically equivalent to that Element if declared default value is semantically equivalent to that Element if
written with the default value stored as the Element Data. EBML written with the default value stored as the Element Data. EBML
Elements that are Master Elements MUST NOT declare a default value. Elements that are Master Elements MUST NOT declare a default value.
EBML Elements with a minOccurs value greater than 1 MUST NOT declare EBML Elements with a "minOccurs" value greater than 1 MUST NOT
a default value. declare a default value.
The default attribute is OPTIONAL. The default attribute is OPTIONAL.
11.1.5.9. type 11.1.6.9. type
Within an EBML Schema, the XPath of "@type" attribute is Within an EBML Schema, the XPath of the "@type" attribute is
"/EBMLSchema/element/@type". "/EBMLSchema/element/@type".
The type MUST be set to one of the following values: "integer" The type MUST be set to one of the following values: "integer"
(signed integer), "uinteger" (unsigned integer), "float", "string", (signed integer), "uinteger" (unsigned integer), "float", "string",
"date", "utf-8", "master", or "binary". The content of each type is "date", "utf-8", "master", or "binary". The content of each type is
defined within Section 7. defined in Section 7.
The type attribute is REQUIRED. The "type" attribute is REQUIRED.
11.1.5.10. unknownsizeallowed 11.1.6.10. unknownsizeallowed
Within an EBML Schema, the XPath of "@unknownsizeallowed" attribute Within an EBML Schema, the XPath of the "@unknownsizeallowed"
is "/EBMLSchema/element/@unknownsizeallowed". attribute is "/EBMLSchema/element/@unknownsizeallowed".
A boolean to express if an EBML Element is permitted to be Unknown- This attribute is a boolean to express whether an EBML Element is
Sized Element (having all VINT_DATA bits of Element Data Size set to permitted to be an Unknown-Sized Element (having all VINT_DATA bits
1). EBML Elements that are not Master Elements MUST NOT set of Element Data Size set to 1). EBML Elements that are not Master
unknownsizeallowed to true. An EBML Element that is defined with an Elements MUST NOT set "unknownsizeallowed" to true. An EBML Element
unknownsizeallowed attribute set to 1 MUST also have the that is defined with an "unknownsizeallowed" attribute set to 1 MUST
unknownsizeallowed attribute of its Parent Element set to 1. also have the "unknownsizeallowed" attribute of its Parent Element
set to 1.
An EBML Element with the unknownsizeallowed attribute set to 1 MUST An EBML Element with the "unknownsizeallowed" attribute set to 1 MUST
NOT have its recursive attribute set to 1. NOT have its "recursive" attribute set to 1.
The unknownsizeallowed attribute is OPTIONAL. If the The "unknownsizeallowed" attribute is OPTIONAL. If the
unknownsizeallowed attribute is not used then that EBML Element is "unknownsizeallowed" attribute is not used, then that EBML Element is
not allowed to use an unknown Element Data Size. not allowed to use an unknown Element Data Size.
11.1.5.11. recursive 11.1.6.11. recursive
Within an EBML Schema, the XPath of "@recursive" attribute is Within an EBML Schema, the XPath of the "@recursive" attribute is
"/EBMLSchema/element/@recursive". "/EBMLSchema/element/@recursive".
A boolean to express if an EBML Element is permitted to be stored This attribute is a boolean to express whether an EBML Element is
recursively. In this case the EBML Element MAY be stored within permitted to be stored recursively. If it is allowed, the EBML
another EBML Element that has the same Element ID. Which itself can Element MAY be stored within another EBML Element that has the same
be stored in an EBML Element that has the same Element ID, and so on. Element ID, which itself can be stored in an EBML Element that has
EBML Elements that are not Master Elements MUST NOT set recursive to the same Element ID, and so on. EBML Elements that are not Master
true. Elements MUST NOT set recursive to true.
If the EBMLElement part of the "@path" contains an IsRecursive part If the EBMLElement part of the "@path" contains an IsRecursive part,
then the recursive value MUST be true and false otherwise. then the "recursive" value MUST be true; otherwise, it MUST be false.
An EBML Element with the recursive attribute set to 1 MUST NOT have An EBML Element with the "recursive" attribute set to 1 MUST NOT have
its unknownsizeallowed attribute set to 1. its "unknownsizeallowed" attribute set to 1.
The recursive attribute is OPTIONAL. If the recursive attribute is The "recursive" attribute is OPTIONAL. If the "recursive" attribute
not present then the EBML Element MUST NOT be used recursively. is not present, then the EBML Element MUST NOT be used recursively.
11.1.5.12. recurring 11.1.6.12. recurring
Within an EBML Schema, the XPath of "@recurring" attribute is Within an EBML Schema, the XPath of the "@recurring" attribute is
"/EBMLSchema/element/@recurring". "/EBMLSchema/element/@recurring".
A boolean to express if an EBML Element is defined as an Identically This attribute is a boolean to express whether or not an EBML Element
Recurring Element or not; see Section 11.1.16. is defined as an Identically Recurring Element; see Section 11.1.17.
The recurring attribute is OPTIONAL. If the recurring attribute is The "recurring" attribute is OPTIONAL. If the "recurring" attribute
not present then the EBML Element is not an Identically Recurring is not present, then the EBML Element is not an Identically Recurring
Element. Element.
11.1.5.13. minver 11.1.6.13. minver
Within an EBML Schema, the XPath of "@minver" attribute is Within an EBML Schema, the XPath of the "@minver" attribute is
"/EBMLSchema/element/@minver". "/EBMLSchema/element/@minver".
The minver (minimum version) attribute stores a non-negative integer The "minver" (minimum version) attribute stores a nonnegative integer
that represents the first version of the docType to support the EBML that represents the first version of the docType to support the EBML
Element. Element.
The minver attribute is OPTIONAL. If the minver attribute is not The "minver" attribute is OPTIONAL. If the "minver" attribute is not
present, then the EBML Element has a minimum version of "1". present, then the EBML Element has a minimum version of "1".
11.1.5.14. maxver 11.1.6.14. maxver
Within an EBML Schema, the XPath of "@maxver" attribute is Within an EBML Schema, the XPath of the "@maxver" attribute is
"/EBMLSchema/element/@maxver". "/EBMLSchema/element/@maxver".
The maxver (maximum version) attribute stores a non-negative integer The "maxver" (maximum version) attribute stores a nonnegative integer
that represents the last or most recent version of the docType to that represents the last or most recent version of the docType to
support the element. maxver MUST be greater than or equal to minver. support the element. "maxver" MUST be greater than or equal to
"minver".
The maxver attribute is OPTIONAL. If the maxver attribute is not The "maxver" attribute is OPTIONAL. If the "maxver" attribute is not
present then the EBML Element has a maximum version equal to the present, then the EBML Element has a maximum version equal to the
value stored in the version attribute of "<EBMLSchema>". value stored in the "version" attribute of "<EBMLSchema>".
11.1.6. <documentation> Element 11.1.7. "<documentation>" Element
Within an EBML Schema, the XPath of "<documentation>" attribute is Within an EBML Schema, the XPaths of the "<documentation>" elements
"/EBMLSchema/element/documentation". are "/EBMLSchema/element/documentation" and
"/EBMLSchema/element/restriction/enum/documentation".
The "<documentation>" element provides additional information about The "<documentation>" element provides additional information about
the EBML Element. Within the "<documentation>" element the following EBML Elements or enumeration values. Within the "<documentation>"
XHTML [W3C.SPSD-xhtml-basic-20180327] elements MAY be used: "<a>", element, the following XHTML [XHTML] elements MAY be used: "<a>",
"<br>", "<strong>". "<br>", and "<strong>".
11.1.7. <documentation> Attributes 11.1.8. "<documentation>" Attributes
11.1.7.1. lang 11.1.8.1. lang
Within an EBML Schema, the XPath of "@lang" attribute is Within an EBML Schema, the XPath of the "@lang" attribute is
"/EBMLSchema/element/documentation/@lang". "/EBMLSchema/element/documentation/@lang".
A lang attribute which is set to the [RFC5646] value of the language The "lang" attribute is set to the value from [RFC5646] of the
of the element's documentation. language of the element's documentation.
The lang attribute is OPTIONAL. The "lang" attribute is OPTIONAL.
11.1.7.2. purpose 11.1.8.2. purpose
Within an EBML Schema, the XPath of "@purpose" attribute is Within an EBML Schema, the XPath of the "@purpose" attribute is
"/EBMLSchema/element/documentation/@purpose". "/EBMLSchema/element/documentation/@purpose".
A purpose attribute distinguishes the meaning of the documentation. A "purpose" attribute distinguishes the meaning of the documentation.
Values for the "<documentation>" sub-element's purpose attribute MUST Values for the "<documentation>" subelement's "purpose" attribute
include one of the values listed in Table 8. MUST include one of the values listed in Table 8.
+------------+-------------------------------------------------+ +============+=================================================+
| value of | definition | | value of | definition |
| purpose | | | "purpose" | |
| attribute | | | attribute | |
+============+=================================================+ +============+=================================================+
| definition | A 'definition' is recommended for every defined | | definition | A "definition" is recommended for every defined |
| | EBML Element. This documentation explains the | | | EBML Element. This documentation explains the |
| | semantic meaning of the EBML Element. | | | semantic meaning of the EBML Element. |
+------------+-------------------------------------------------+ +------------+-------------------------------------------------+
| rationale | An explanation about the reason or catalyst for | | rationale | An explanation about the reason or catalyst for |
| | the definition of the Element. | | | the definition of the Element. |
+------------+-------------------------------------------------+ +------------+-------------------------------------------------+
| usage | Recommended practices or guideline for both | | usage | Recommended practices or guidelines for both |
| notes | reading, writing, or interpreting the Element. | | notes | reading, writing, or interpreting the Element. |
+------------+-------------------------------------------------+ +------------+-------------------------------------------------+
| references | Informational references to support the | | references | Informational references to support the |
| | contextualization and understanding of the | | | contextualization and understanding of the |
| | value of the Element. | | | value of the Element. |
+------------+-------------------------------------------------+ +------------+-------------------------------------------------+
Table 8: Definitions of the permitted values for the purpose Table 8: Definitions of the permitted values for the
attribute of the documentation Element. "purpose" attribute of the documentation Element
The purpose attribute is REQUIRED. The "purpose" attribute is REQUIRED.
11.1.8. <implementation_note> Element 11.1.9. "<implementation_note>" Element
Within an EBML Schema, the XPath of "<implementation_note>" attribute Within an EBML Schema, the XPath of the "<implementation_note>"
is "/EBMLSchema/element/implementation_note". element is "/EBMLSchema/element/implementation_note".
In some cases within an EBML Document Type, the attributes of the In some cases within an EBML Document Type, the attributes of the
"<element>" element are not sufficient to clearly communicate how the "<element>" element are not sufficient to clearly communicate how the
defined EBML Element is intended to be implemented. For instance, defined EBML Element is intended to be implemented. For instance,
one EBML Element might only be mandatory if another EBML Element is one EBML Element might only be mandatory if another EBML Element is
present, or as another example, the default value of an EBML Element present. As another example, the default value of an EBML Element
might derive from a related Element's content. In these cases where might be derived from a related Element's content. In these cases
the Element's definition is conditional or advanced implementation where the Element's definition is conditional or advanced
notes are needed, one or many "<implementation_note>" elements can be implementation notes are needed, one or many "<implementation_note>"
used to store that information. The "<implementation_note>" refer to elements can be used to store that information. The
a specific attribute of the parent "<element>" as expressed by the "<implementation_note>" refers to a specific attribute of the parent
"note_attribute" attribute Section 11.1.9.1. "<element>" as expressed by the "note_attribute" attribute (see
Section 11.1.10.1).
11.1.9. <implementation_note> Attributes 11.1.10. "<implementation_note>" Attributes
11.1.9.1. note_attribute 11.1.10.1. note_attribute
Within an EBML Schema, the XPath of "@note_attribute" attribute is Within an EBML Schema, the XPath of the "@note_attribute" attribute
"/EBMLSchema/element/implementation_note/@note_attribute". is "/EBMLSchema/element/implementation_note/@note_attribute".
The note_attribute attribute references which of the "<element>"'s The "note_attribute" attribute references which of the attributes of
attributes that the implementation_note is in regards to. The the "<element>" the "<implementation_note>" relates to. The
note_attribute attribute MUST be set to one of the following values "note_attribute" attribute MUST be set to one of the following values
(corresponding to that attribute of the parent "<element>"): (corresponding to that attribute of the parent "<element>"):
"minOccurs", "maxOccurs", "range", "length", "default", "minver", or "minOccurs", "maxOccurs", "range", "length", "default", "minver", or
"maxver". The "<implementation_note>" SHALL supersede the parent "maxver". The "<implementation_note>" SHALL supersede the parent
"<element>"'s attribute that is named in the "note_attribute" "<element>"'s attribute that is named in the "note_attribute"
attribute. An "<element>" SHALL NOT have more than one attribute. An "<element>" SHALL NOT have more than one
"<implementation_note>" of the same "note_attribute". "<implementation_note>" of the same "note_attribute".
The note_attribute attribute is REQUIRED. The "note_attribute" attribute is REQUIRED.
11.1.9.2. <implementation_note> Example 11.1.10.2. "<implementation_note>" Example
The following fragment of an EBML Schema demonstrates how an The following fragment of an EBML Schema demonstrates how an
"<implementation_note>" is used. In this case an EBML Schema "<implementation_note>" is used. In this case, an EBML Schema
documents a list of items that are described with an optional cost. documents a list of items that are described with an optional cost.
The Currency Element uses an "<implementation_note>" to say that the The Currency Element uses an "<implementation_note>" to say that the
Currency Element is REQUIRED if the Cost Element is set, otherwise Currency Element is REQUIRED if the Cost Element is set, otherwise
not. not.
<element name="Items" path="\Items" id="0x4025" type="master" <element name="Items" path="\Items" id="0x4025" type="master"
minOccurs="1" maxOccurs="1"> minOccurs="1" maxOccurs="1">
<documentation lang="en" purpose="definition"> <documentation lang="en" purpose="definition">
A set of items. A set of items.
</documentation> </documentation>
skipping to change at page 33, line 34 skipping to change at line 1509
type="string" maxOccurs="1"> type="string" maxOccurs="1">
<documentation lang="en" purpose="definition"> <documentation lang="en" purpose="definition">
The currency of the item's cost. The currency of the item's cost.
</documentation> </documentation>
<implementation_note note_attribute="minOccurs"> <implementation_note note_attribute="minOccurs">
Currency MUST be set (minOccurs=1) if the associated Item stores Currency MUST be set (minOccurs=1) if the associated Item stores
a Cost, else Currency MAY be unset (minOccurs=0). a Cost, else Currency MAY be unset (minOccurs=0).
</implementation_note> </implementation_note>
</element> </element>
11.1.10. <restriction> Element 11.1.11. "<restriction>" Element
Within an EBML Schema, the XPath of "<restriction>" attribute is Within an EBML Schema, the XPath of the "<restriction>" element is
"/EBMLSchema/element/restriction". "/EBMLSchema/element/restriction".
The "<restriction>" element provides information about restrictions The "<restriction>" element provides information about restrictions
to the allowable values for the EBML Element which are listed in to the allowable values for the EBML Element, which are listed in
"<enum>" elements. "<enum>" elements.
11.1.11. <enum> Element 11.1.12. "<enum>" Element
Within an EBML Schema, the XPath of "<enum>" attribute is Within an EBML Schema, the XPath of the "<enum>" element is
"/EBMLSchema/element/restriction/enum". "/EBMLSchema/element/restriction/enum".
The "<enum>" element stores a list of values allowed for storage in The "<enum>" element stores a list of values allowed for storage in
the EBML Element. The values MUST match the type of the EBML Element the EBML Element. The values MUST match the type of the EBML Element
(for example "<enum value="Yes">" cannot be a valid value for a EBML (for example, "<enum value="Yes">" cannot be a valid value for an
Element that is defined as an unsigned integer). An "<enum>" element EBML Element that is defined as an unsigned integer). An "<enum>"
MAY also store "<documentation>" elements to further describe the element MAY also store "<documentation>" elements to further describe
"<enum>". the "<enum>".
11.1.12. <enum> Attributes 11.1.13. "<enum>" Attributes
11.1.12.1. label 11.1.13.1. label
Within an EBML Schema, the XPath of "@label" attribute is Within an EBML Schema, the XPath of the "@label" attribute is
"/EBMLSchema/element/restriction/enum/@label". "/EBMLSchema/element/restriction/enum/@label".
The label provides a concise expression for human consumption that The label provides a concise expression for human consumption that
describes what the value of the "<enum>" represents. describes what the value of "<enum>" represents.
The label attribute is OPTIONAL. The "label" attribute is OPTIONAL.
11.1.12.2. value 11.1.13.2. value
Within an EBML Schema, the XPath of "@value" attribute is Within an EBML Schema, the XPath of the "@value" attribute is
"/EBMLSchema/element/restriction/enum/@value". "/EBMLSchema/element/restriction/enum/@value".
The value represents data that MAY be stored within the EBML Element. The value represents data that MAY be stored within the EBML Element.
The value attribute is REQUIRED. The "value" attribute is REQUIRED.
11.1.13. <extension> Element 11.1.14. "<extension>" Element
Within an EBML Schema, the XPath of "<extension>" attribute is Within an EBML Schema, the XPath of the "<extension>" element is
"/EBMLSchema/element/extension". "/EBMLSchema/element/extension".
The "<extension>" element provides an unconstrained element to The "<extension>" element provides an unconstrained element to
contain information about the associated EBML "<element>" which is contain information about the associated EBML "<element>", which is
undefined by this document but MAY be defined by the associated EBML undefined by this document but MAY be defined by the associated EBML
Document Type. The "<extension>" element MUST contain a "type" Document Type. The "<extension>" element MUST contain a "type"
attribute and also MAY contain any other attribute or sub-element as attribute and also MAY contain any other attribute or subelement as
long as the EBML Schema remains as a well-formed XML Document. All long as the EBML Schema remains as a well-formed XML Document. All
"<extension>" elements MUST be sub-elements of the "<element>". "<extension>" elements MUST be subelements of the "<element>".
11.1.14. <extension> Attributes 11.1.15. "<extension>" Attributes
11.1.14.1. type 11.1.15.1. type
Within an EBML Schema, the XPath of "@type" attribute is Within an EBML Schema, the XPath of the "@type" attribute is
"/EBMLSchema/element/extension/@type". "/EBMLSchema/element/extension/@type".
The type attribute should reference a name or identifier of the The "type" attribute should reference a name or identifier of the
project or authority associated with the contents of the project or authority associated with the contents of the
"<extension>" element. "<extension>" element.
The type attribute is REQUIRED. The "type" attribute is REQUIRED.
11.1.15. XML Schema for EBML Schema 11.1.16. XML Schema for EBML Schema
This following provides an XML Schema [W3C.REC-xmlschema-0-20041028] The following provides an XML Schema [XML-SCHEMA] for facilitating
for facilitating verification of an EBML Schema to the definition verification of an EBML Schema described in Section 11.1.
described in Section 8.1.
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns="https://ietf.org/cellar/ebml" <xs:schema xmlns="urn:ietf:rfc:8794"
targetNamespace="https://ietf.org/cellar/ebml" targetNamespace="urn:ietf:rfc:8794"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xhtml="http://www.w3.org/1999/xhtml"
elementFormDefault="qualified" version="01"> elementFormDefault="qualified" version="01">
<!-- for HTML in comments --> <!-- for HTML in comments -->
<xs:import namespace="http://www.w3.org/1999/xhtml" <xs:import namespace="http://www.w3.org/1999/xhtml"
schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd"/> schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd"/>
<xs:element name="EBMLSchema" type="EBMLSchemaType"/> <xs:element name="EBMLSchema" type="EBMLSchemaType"/>
skipping to change at page 38, line 45 skipping to change at line 1759
<xs:enumeration value="minver"/> <xs:enumeration value="minver"/>
<xs:enumeration value="maxver"/> <xs:enumeration value="maxver"/>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:attribute> </xs:attribute>
</xs:extension> </xs:extension>
</xs:simpleContent> </xs:simpleContent>
</xs:complexType> </xs:complexType>
</xs:schema> </xs:schema>
11.1.16. Identically Recurring Elements 11.1.17. Identically Recurring Elements
An Identically Recurring Element is an EBML Element that MAY occur An Identically Recurring Element is an EBML Element that MAY occur
within its Parent Element more than once but that each recurrence within its Parent Element more than once, but each recurrence of it
within that Parent Element MUST be identical both in storage and within that Parent Element MUST be identical both in storage and
semantics. Identically Recurring Elements are permitted to be stored semantics. Identically Recurring Elements are permitted to be stored
multiple times within the same Parent Element in order to increase multiple times within the same Parent Element in order to increase
data resilience and optimize the use of EBML in transmission. For data resilience and optimize the use of EBML in transmission. For
instance a pertinent Top-Level Element could be periodically resent instance, a pertinent Top-Level Element could be periodically resent
within a data stream so that an EBML Reader which starts reading the within a datastream so that an EBML Reader that starts reading the
stream from the middle could better interpret the contents. stream from the middle could better interpret the contents.
Identically Recurring Elements SHOULD include a CRC-32 Element as a Identically Recurring Elements SHOULD include a CRC-32 Element as a
Child Element; this is especially recommended when EBML is used for Child Element; this is especially recommended when EBML is used for
long-term storage or transmission. If a Parent Element contains more long-term storage or transmission. If a Parent Element contains more
than one copy of an Identically Recurring Element which includes a than one copy of an Identically Recurring Element that includes a
CRC-32 Element as a Child Element then the first instance of the CRC-32 Element as a Child Element, then the first instance of the
Identically Recurring Element with a valid CRC-32 value should be Identically Recurring Element with a valid CRC-32 value should be
used for interpretation. If a Parent Element contains more than one used for interpretation. If a Parent Element contains more than one
copy of an Identically Recurring Element which does not contain a copy of an Identically Recurring Element that does not contain a
CRC-32 Element or if CRC-32 Elements are present but none are valid CRC-32 Element, or if CRC-32 Elements are present but none are valid,
then the first instance of the Identically Recurring Element should then the first instance of the Identically Recurring Element should
be used for interpretation. be used for interpretation.
11.1.17. Textual expression of floats 11.1.18. Textual expression of floats
When a float value is represented textually in an EBML Schema, such When a float value is represented textually in an EBML Schema, such
as within a default or range value, the float values MUST be as within a default or range value, the float values MUST be
expressed as Hexadecimal Floating-Point Constants as defined in the expressed as Hexadecimal Floating-Point Constants as defined in the
C11 standard [ISO.9899.2011] (see section 6.4.4.2 on Floating C11 standard [ISO9899] (see Section 6.4.4.2 on Floating Constants).
Constants). Table 9 provides examples of expressions of float Table 9 provides examples of expressions of float ranges.
ranges.
+-------------------+-----------------------------------------+ +===================+=========================================+
| as decimal | as Hexadecimal Floating-Point Constants | | as decimal | as Hexadecimal Floating-Point Constants |
+===================+=========================================+ +===================+=========================================+
| 0.0 | "0x0p+1" | | 0.0 | 0x0p+1 |
+-------------------+-----------------------------------------+ +-------------------+-----------------------------------------+
| 0.0-1.0 | "0x0p+1-0x1p+0" | | 0.0-1.0 | 0x0p+1-0x1p+0 |
+-------------------+-----------------------------------------+ +-------------------+-----------------------------------------+
| 1.0-256.0 | "0x1p+0-0x1p+8" | | 1.0-256.0 | 0x1p+0-0x1p+8 |
+-------------------+-----------------------------------------+ +-------------------+-----------------------------------------+
| 0.857421875 | "0x1.b7p-1" | | 0.857421875 | 0x1.b7p-1 |
+-------------------+-----------------------------------------+ +-------------------+-----------------------------------------+
| -1.0--0.857421875 | "-0x1p+0--0x1.b7p-1" | | -1.0--0.857421875 | -0x1p+0--0x1.b7p-1 |
+-------------------+-----------------------------------------+ +-------------------+-----------------------------------------+
Table 9: Example of floating point values and ranges as Table 9: Example of Floating-Point values and ranges as
decimal and as Hexadecimal Floating-Point Constants. decimal and Hexadecimal Floating-Point Constants
Within an expression of a float range, as in an integer range, the - Within an expression of a float range, as in an integer range, the -
(hyphen) character is the separator between the minimal and maximum (hyphen) character is the separator between the minimum and maximum
value permitted by the range. Hexadecimal Floating-Point Constants values permitted by the range. Hexadecimal Floating-Point Constants
also use a - (hyphen) when indicating a negative binary power. also use a - (hyphen) when indicating a negative binary power.
Within a float range, when a - (hyphen) is immediately preceded by a Within a float range, when a - (hyphen) is immediately preceded by a
letter p, then the - (hyphen) is a part of the Hexadecimal Floating- letter p, then the - (hyphen) is a part of the Hexadecimal Floating-
Point Constant which notes negative binary power. Within a float Point Constant that notes negative binary power. Within a float
range, when a - (hyphen) is not immediately preceded by a letter p, range, when a - (hyphen) is not immediately preceded by a letter p,
then the - (hyphen) represents the separator between the minimal and then the - (hyphen) represents the separator between the minimum and
maximum value permitted by the range. maximum values permitted by the range.
11.1.18. Note on the use of default attributes to define Mandatory EBML 11.1.19. Note on the use of default attributes to define Mandatory EBML
Elements Elements
If a Mandatory EBML Element has a default value declared by an EBML If a Mandatory EBML Element has a default value declared by an EBML
Schema and the value of the EBML Element is equal to the declared Schema and the value of the EBML Element is equal to the declared
default value then that EBML Element is not required to be present default value, then that EBML Element is not required to be present
within the EBML Document if its Parent Element is present. In this within the EBML Document if its Parent Element is present. In this
case, the default value of the Mandatory EBML Element MUST be read by case, the default value of the Mandatory EBML Element MUST be read by
the EBML Reader although the EBML Element is not present within its the EBML Reader, although the EBML Element is not present within its
Parent Element. Parent Element.
If a Mandatory EBML Element has no default value declared by an EBML If a Mandatory EBML Element has no default value declared by an EBML
Schema and its Parent Element is present then the EBML Element MUST Schema and its Parent Element is present, then the EBML Element MUST
be present as well. If a Mandatory EBML Element has a default value be present, as well. If a Mandatory EBML Element has a default value
declared by an EBML Schema and its Parent Element is present and the declared by an EBML Schema, and its Parent Element is present, and
value of the EBML Element is NOT equal to the declared default value the value of the EBML Element is NOT equal to the declared default
then the EBML Element MUST be present. value, then the EBML Element MUST be present.
Table 10 clarifies if a Mandatory EBML Element MUST be written, Table 10 clarifies whether a Mandatory EBML Element MUST be written,
according to if the default value is declared, if the value of the according to whether the default value is declared, the value of the
EBML Element is equal to the declared default value, and if the EBML Element is equal to the declared default value, and/or the
Parent Element is used. Parent Element is used.
+-----------------+-------------+---------------+------------------+ +=================+=============+===============+==================+
| Is the default | Is the | Is the Parent | Then is storing | | Is the default | Is the | Is the Parent | Then is storing |
| value declared? | value equal | Element | the EBML Element | | value declared? | value equal | Element | the EBML Element |
| | to default? | present? | REQUIRED? | | | to default? | present? | REQUIRED? |
+=================+=============+===============+==================+ +=================+=============+===============+==================+
| Yes | Yes | Yes | No | | Yes | Yes | Yes | No |
+-----------------+-------------+---------------+------------------+ +-----------------+-------------+---------------+------------------+
| Yes | Yes | No | No | | Yes | Yes | No | No |
+-----------------+-------------+---------------+------------------+ +-----------------+-------------+---------------+------------------+
| Yes | No | Yes | Yes | | Yes | No | Yes | Yes |
+-----------------+-------------+---------------+------------------+ +-----------------+-------------+---------------+------------------+
| Yes | No | No | No | | Yes | No | No | No |
+-----------------+-------------+---------------+------------------+ +-----------------+-------------+---------------+------------------+
| No | n/a | Yes | Yes | | No | n/a | Yes | Yes |
+-----------------+-------------+---------------+------------------+ +-----------------+-------------+---------------+------------------+
| No | n/a | No | No | | No | n/a | No | No |
+-----------------+-------------+---------------+------------------+ +-----------------+-------------+---------------+------------------+
Table 10: Demonstration of the conditional requirements of VINT Table 10: Demonstration of the conditional requirements of VINT
Storage. Storage
11.2. EBML Header Elements 11.2. EBML Header Elements
This document contains definitions of all EBML Elements of the EBML This document contains definitions of all EBML Elements of the EBML
Header. Header.
11.2.1. EBML Element 11.2.1. EBML Element
name: EBML name: EBML
path: "\EBML" path: "\EBML"
id: 0x1A45DFA3 id: 0x1A45DFA3
minOccurs: 1 minOccurs: 1
maxOccurs: 1 maxOccurs: 1
type: Master Element type: Master Element
description: Set the EBML characteristics of the data to follow. description: Set the EBML characteristics of the data to follow.
Each EBML Document has to start with this. Each EBML Document has to start with this.
11.2.2. EBMLVersion Element 11.2.2. EBMLVersion Element
name: EBMLVersion name: EBMLVersion
path: "\EBML\EBMLVersion" path: "\EBML\EBMLVersion"
id 0x4286 id: 0x4286
minOccurs: 1 minOccurs: 1
maxOccurs: 1 maxOccurs: 1
range: not 0 range: not 0
default: 1 default: 1
type: Unsigned Integer type: Unsigned Integer
description: The version of EBML specifications used to create the description: The version of EBML specifications used to create the
EBML Document. The version of EBML defined in this document is 1, so EBML Document. The version of EBML defined in this document is 1,
EBMLVersion SHOULD be 1. so EBMLVersion SHOULD be 1.
11.2.3. EBMLReadVersion Element 11.2.3. EBMLReadVersion Element
name: EBMLReadVersion name: EBMLReadVersion
path: "\EBML\EBMLReadVersion"
id: 0x42F7 path: "\EBML\EBMLReadVersion"
minOccurs: 1 id: 0x42F7
maxOccurs: 1 minOccurs: 1
range: 1 maxOccurs: 1
default: 1 range: 1
type: Unsigned Integer default: 1
description: The minimum EBML version an EBML Reader has to support type: Unsigned Integer
to read this EBML Document. The EBMLReadVersion Element MUST be less
than or equal to EBMLVersion. description: The minimum EBML version an EBML Reader has to support
to read this EBML Document. The EBMLReadVersion Element MUST be
less than or equal to EBMLVersion.
11.2.4. EBMLMaxIDLength Element 11.2.4. EBMLMaxIDLength Element
name: EBMLMaxIDLength name: EBMLMaxIDLength
path: "\EBML\EBMLMaxIDLength" path: "\EBML\EBMLMaxIDLength"
id 0x42F2 id: 0x42F2
minOccurs: 1 minOccurs: 1
maxOccurs: 1 maxOccurs: 1
range: >=4 range: >=4
default: 4 default: 4
type: Unsigned Integer type: Unsigned Integer
description: The EBMLMaxIDLength Element stores the maximum permitted description: The EBMLMaxIDLength Element stores the maximum
length in octets of the Element IDs to be found within the EBML Body. permitted length in octets of the Element IDs to be found within
An EBMLMaxIDLength Element value of four is RECOMMENDED, though the EBML Body. An EBMLMaxIDLength Element value of four is
larger values are allowed. RECOMMENDED, though larger values are allowed.
11.2.5. EBMLMaxSizeLength Element 11.2.5. EBMLMaxSizeLength Element
name: EBMLMaxSizeLength name: EBMLMaxSizeLength
path: "\EBML\EBMLMaxSizeLength" path: "\EBML\EBMLMaxSizeLength"
id 0x42F3 id: 0x42F3
minOccurs: 1
maxOccurs: 1 minOccurs: 1
range: not 0 maxOccurs: 1
default: 8 range: not 0
type: Unsigned Integer default: 8
description: The EBMLMaxSizeLength Element stores the maximum type: Unsigned Integer
permitted length in octets of the expressions of all Element Data
Sizes to be found within the EBML Body. The EBMLMaxSizeLength description: The EBMLMaxSizeLength Element stores the maximum
Element documents an upper bound for the "length" of all Element Data permitted length in octets of the expressions of all Element Data
Size expressions within the EBML Body and not an upper bound for the Sizes to be found within the EBML Body. The EBMLMaxSizeLength
"value" of all Element Data Size expressions within the EBML Body. Element documents an upper bound for the "length" of all Element
EBML Elements that have an Element Data Size expression which is Data Size expressions within the EBML Body and not an upper bound
larger in octets than what is expressed by EBMLMaxSizeLength Element for the "value" of all Element Data Size expressions within the
are invalid. EBML Body. EBML Elements that have an Element Data Size
expression that is larger in octets than what is expressed by
EBMLMaxSizeLength Element are invalid.
11.2.6. DocType Element 11.2.6. DocType Element
name: DocType name: DocType
path: "\EBML\DocType" path: "\EBML\DocType"
id 0x4282 id: 0x4282
minOccurs: 1 minOccurs: 1
maxOccurs: 1 maxOccurs: 1
length: >0 length: >0
type: String type: String
description: A string that describes and identifies the content of description: A string that describes and identifies the content of
the EBML Body that follows this EBML Header. the EBML Body that follows this EBML Header.
11.2.7. DocTypeVersion Element 11.2.7. DocTypeVersion Element
name: DocTypeVersion name: DocTypeVersion
path: "\EBML\DocTypeVersion" path: "\EBML\DocTypeVersion"
id 0x4287 id: 0x4287
minOccurs: 1 minOccurs: 1
maxOccurs: 1
range: not 0 maxOccurs: 1
default: 1 range: not 0
type: Unsigned Integer default: 1
description: The version of DocType interpreter used to create the type: Unsigned Integer
EBML Document.
description: The version of DocType interpreter used to create the
EBML Document.
11.2.8. DocTypeReadVersion Element 11.2.8. DocTypeReadVersion Element
name: DocTypeReadVersion name: DocTypeReadVersion
path: "\EBML\DocTypeReadVersion" path: "\EBML\DocTypeReadVersion"
id 0x4285 id: 0x4285
minOccurs: 1 minOccurs: 1
maxOccurs: 1 maxOccurs: 1
range: not 0 range: not 0
default: 1 default: 1
type: Unsigned Integer type: Unsigned Integer
description: The minimum DocType version an EBML Reader has to description: The minimum DocType version an EBML Reader has to
support to read this EBML Document. The value of the support to read this EBML Document. The value of the
DocTypeReadVersion Element MUST be less than or equal to the value of DocTypeReadVersion Element MUST be less than or equal to the value
the DocTypeVersion Element. of the DocTypeVersion Element.
11.2.9. DocTypeExtension Element 11.2.9. DocTypeExtension Element
name: DocTypeExtension name: DocTypeExtension
path: "\EBML\DocTypeExtension" path: "\EBML\DocTypeExtension"
id 0x4281 id: 0x4281
minOccurs: 0 minOccurs: 0
type: Master Element type: Master Element
description: A DocTypeExtension adds extra Elements to the main description: A DocTypeExtension adds extra Elements to the main
DocType+DocTypeVersion tuple it's attached to. An EBML Reader MAY DocType+DocTypeVersion tuple it's attached to. An EBML Reader MAY
know these extra Elements and how to use them. A DocTypeExtension know these extra Elements and how to use them. A DocTypeExtension
MAY be used to iterate between experimental Elements before they are MAY be used to iterate between experimental Elements before they
integrated in a regular DocTypeVersion. Reading one DocTypeExtension are integrated into a regular DocTypeVersion. Reading one
version of a DocType+DocTypeVersion tuple doesn't imply one should be DocTypeExtension version of a DocType+DocTypeVersion tuple doesn't
able to read upper versions of this DocTypeExtension. imply one should be able to read upper versions of this
DocTypeExtension.
11.2.10. DocTypeExtensionName Element 11.2.10. DocTypeExtensionName Element
name: DocTypeExtensionName name: DocTypeExtensionName
path: "\EBML\DocTypeExtension\Name" path: "\EBML\DocTypeExtension\DocTypeExtensionName"
id 0x4283 id: 0x4283
minOccurs: 1 minOccurs: 1
maxOccurs: 1 maxOccurs: 1
length: >0 length: >0
type: String type: String
description: The name of the DocTypeExtension to differentiate it description: The name of the DocTypeExtension to differentiate it
from other DocTypeExtension of the same DocType+DocTypeVersion tuple. from other DocTypeExtensions of the same DocType+DocTypeVersion
A DocTypeExtensionName value MUST be unique within the EBML Header. tuple. A DocTypeExtensionName value MUST be unique within the
EBML Header.
11.2.11. DocTypeExtensionVersion Element 11.2.11. DocTypeExtensionVersion Element
name: DocTypeExtensionVersion name: DocTypeExtensionVersion
path: "\EBML\DocTypeExtension\Version" path: "\EBML\DocTypeExtension\DocTypeExtensionVersion"
id 0x4284 id: 0x4284
minOccurs: 1 minOccurs: 1
maxOccurs: 1 maxOccurs: 1
range: not 0 range: not 0
type: Unsigned Integer type: Unsigned Integer
description: The version of the DocTypeExtension. Different description: The version of the DocTypeExtension. Different
DocTypeExtensionVersion values of the same DocTypeExtensionVersion values of the same DocType +
DocType+DocTypeVersion+DocTypeExtensionName tuple MAY contain DocTypeVersion + DocTypeExtensionName tuple MAY contain completely
completely different sets of extra Elements. An EBML Reader MAY different sets of extra Elements. An EBML Reader MAY support
support multiple versions of the same DocTypeExtension, only one or multiple versions of the same tuple, only one version of the
none. tuple, or not support the tuple at all.
11.3. Global Elements 11.3. Global Elements
EBML allows some special Elements to be found within more than one EBML allows some special Elements to be found within more than one
parent in an EBML Document or optionally at the Root Level of an EBML parent in an EBML Document or optionally at the Root Level of an EBML
Body. These Elements are called Global Elements. There are 2 Global Body. These Elements are called Global Elements. There are two
Elements that can be found in any EBML Document: the CRC-32 Element Global Elements that can be found in any EBML Document: the CRC-32
and the Void Element. An EBML Schema MAY add other Global Elements Element and the Void Element. An EBML Schema MAY add other Global
to the format it defines. These extra elements apply only to the Elements to the format it defines. These extra elements apply only
EBML Body, not the EBML Header. to the EBML Body, not the EBML Header.
Global Elements are EBML Elements whose EBMLLastParent part of the Global Elements are EBML Elements whose EBMLLastParent part of the
path has a GlobalPlaceholder. Because it is the last Parent part of path has a GlobalPlaceholder. Because it is the last Parent part of
the path, a Global Element might also have an EBMLParentPath parts in the path, a Global Element might also have EBMLParentPath parts in
its path. In this case the Global Element can only be found within its path. In this case, the Global Element can only be found within
this EBMLParentPath path, i.e. it's not fully "global". this EBMLParentPath path -- i.e., it's not fully "global".
A Global Element can be found in many Parent Elements, allowing the A Global Element can be found in many Parent Elements, allowing the
same number of occurrences in each Parent where this Element is same number of occurrences in each Parent where this Element is
found. found.
11.3.1. CRC-32 Element 11.3.1. CRC-32 Element
name: CRC-32 name: CRC-32
path: "\(1-\)CRC-32" path: "\(1-\)CRC-32"
id: 0xBF id: 0xBF
minOccurs: 0 minOccurs: 0
maxOccurs: 1 maxOccurs: 1
length: 4 length: 4
type: Binary type: Binary
description: The CRC-32 Element contains a 32-bit Cyclic Redundancy description: The CRC-32 Element contains a 32-bit Cyclic Redundancy
Check value of all the Element Data of the Parent Element as stored Check value of all the Element Data of the Parent Element as
except for the CRC-32 Element itself. When the CRC-32 Element is stored except for the CRC-32 Element itself. When the CRC-32
present, the CRC-32 Element MUST be the first ordered EBML Element Element is present, the CRC-32 Element MUST be the first ordered
within its Parent Element for easier reading. All Top-Level Elements EBML Element within its Parent Element for easier reading. All
of an EBML Document that are Master Elements SHOULD include a CRC-32 Top-Level Elements of an EBML Document that are Master Elements
Element as a Child Element. The CRC in use is the IEEE-CRC-32 SHOULD include a CRC-32 Element as a Child Element. The CRC in
algorithm as used in the [ISO.3309.1979] standard and in section use is the IEEE-CRC-32 algorithm as used in the [ISO3309] standard
8.1.1.6.2 of [ITU.V42.1994], with initial value of 0xFFFFFFFF. The and in Section 8.1.1.6.2 of [ITU.V42], with initial value of
CRC value MUST be computed on a little endian bytestream and MUST use 0xFFFFFFFF. The CRC value MUST be computed on a little-endian
little endian storage. bytestream and MUST use little-endian storage.
11.3.2. Void Element 11.3.2. Void Element
name: Void name: Void
path: "\(-\)Void" path: "\(-\)Void"
id: 0xEC id: 0xEC
minOccurs: 0 minOccurs: 0
type: Binary type: Binary
description: Used to void data or to avoid unexpected behaviors when description: Used to void data or to avoid unexpected behaviors when
using damaged data. The content is discarded. Also used to reserve using damaged data. The content is discarded. Also used to
space in a sub-element for later use. reserve space in a subelement for later use.
12. Considerations for Reading EBML Data 12. Considerations for Reading EBML Data
The following scenarios describe events to consider when reading EBML The following scenarios describe events to consider when reading EBML
Documents and the recommended design of an EBML Reader. Documents, as well as the recommended design of an EBML Reader.
If a Master Element contains a CRC-32 Element that doesn't validate, If a Master Element contains a CRC-32 Element that doesn't validate,
then the EBML Reader MAY ignore all contained data except for then the EBML Reader MAY ignore all contained data except for
Descendant Elements that contain their own valid CRC-32 Element. Descendant Elements that contain their own valid CRC-32 Element.
In the following XML representation of a simple, hypothetical EBML In the following XML representation of a simple, hypothetical EBML
fragment, a Master Element called CONTACT contains two Child fragment, a Master Element called CONTACT contains two Child
Elements, NAME and ADDRESS. In this example, some data within the Elements, NAME and ADDRESS. In this example, some data within the
NAME Element had been altered, so that the CRC-32 of the NAME Element NAME Element had been altered so that the CRC-32 of the NAME Element
does not validate and thus any Ancestor Element with a CRC-32 would does not validate, and thus any Ancestor Element with a CRC-32 would
therefore also no longer validate. However, even though the CONTACT therefore also no longer validate. However, even though the CONTACT
Element has a CRC-32 that does not validate (because of the changed Element has a CRC-32 that does not validate (because of the changed
data within the NAME Element), the CRC-32 of the ADDRESS Element does data within the NAME Element), the CRC-32 of the ADDRESS Element does
validate and thus the contents and semantics of the ADDRESS Element validate, and thus the contents and semantics of the ADDRESS Element
MAY be used. MAY be used.
<CONTACT> <CONTACT>
<CRC-32>c119a69b</CRC-32><!-- does not validate --> <CRC-32>c119a69b</CRC-32><!-- does not validate -->
<NAME> <NAME>
<CRC-32>1f59ee2b</CRC-32><!-- does not validate --> <CRC-32>1f59ee2b</CRC-32><!-- does not validate -->
<FIRST-NAME>invalid data</FIRST-NAME> <FIRST-NAME>invalid data</FIRST-NAME>
<LAST-NAME>invalid data</LAST-NAME> <LAST-NAME>invalid data</LAST-NAME>
</NAME> </NAME>
<ADDRESS> <ADDRESS>
<CRC-32>df941cc9</CRC-32><!-- validates --> <CRC-32>df941cc9</CRC-32><!-- validates -->
<STREET>valid data</STREET> <STREET>valid data</STREET>
<CITY>valid data</CITY> <CITY>valid data</CITY>
</ADDRESS> </ADDRESS>
</CONTACT> </CONTACT>
If a Master Element contains more occurrences of a Child Master If a Master Element contains more occurrences of a Child Master
Element than permitted according to the maxOccurs and recurring Element than permitted according to the "maxOccurs" and "recurring"
attributes of the definition of that Element then the occurrences in attributes of the definition of that Element, then the occurrences in
addition to maxOccurs MAY be ignored. addition to "maxOccurs" MAY be ignored.
If a Master Element contains more occurrences of a Child Element than If a Master Element contains more occurrences of a Child Element than
permitted according to the maxOccurs attribute of the definition of permitted according to the "maxOccurs" attribute of the definition of
that Element then all instances of that Element after the first that Element, then all instances of that Element after the first
maxOccur occurrences from the beginning of its Parent Element SHOULD "maxOccurs" occurrences from the beginning of its Parent Element
be ignored. SHOULD be ignored.
13. Terminating Elements 13. Terminating Elements
Null Octets, which are octets with all bits set to zero, MAY follow Null Octets, which are octets with all bits set to zero, MAY follow
the value of a String Element or UTF-8 Element to serve as a the value of a String Element or UTF-8 Element to serve as a
terminator. An EBML Writer MAY terminate a String Element or UTF-8 terminator. An EBML Writer MAY terminate a String Element or UTF-8
Element with Null Octets in order to overwrite a stored value with a Element with Null Octets in order to overwrite a stored value with a
new value of lesser length while maintaining the same Element Data new value of lesser length while maintaining the same Element Data
Size (this can prevent the need to rewrite large portions of an EBML Size; this can prevent the need to rewrite large portions of an EBML
Document); otherwise the use of Null Octets within a String Element Document. Otherwise, the use of Null Octets within a String Element
or UTF-8 Element is NOT RECOMMENDED. The Element Data of a UTF-8 or UTF-8 Element is NOT RECOMMENDED. The Element Data of a UTF-8
Element MUST be a valid UTF-8 string up to whichever comes first: the Element MUST be a valid UTF-8 string up to whichever comes first: the
end of the Element or the first occurring Null octet. Within the end of the Element or the first occurring Null octet. Within the
Element Data of a String or UTF-8 Element, any Null octet itself and Element Data of a String or UTF-8 Element, any Null octet itself and
any following data within that Element SHOULD be ignored. A string any following data within that Element SHOULD be ignored. A string
value and a copy of that string value terminated by one or more Null value and a copy of that string value terminated by one or more Null
Octets are semantically equal. Octets are semantically equal.
Table 11 shows examples of semantics and validation for the use of Table 11 shows examples of semantics and validation for the use of
Null Octets. Values to represent Stored Values and the Semantic Null Octets. Values to represent Stored Values and the Semantic
Meaning as represented as hexadecimal values. Meaning as represented as hexadecimal values.
+---------------------+---------------------+ +=====================+=====================+
| Stored Value | Semantic Meaning | | Stored Value | Semantic Meaning |
+=====================+=====================+ +=====================+=====================+
| 0x65 0x62 0x6D 0x6C | 0x65 0x62 0x6D 0x6C | | 0x65 0x62 0x6D 0x6C | 0x65 0x62 0x6D 0x6C |
+---------------------+---------------------+ +---------------------+---------------------+
| 0x65 0x62 0x00 0x6C | 0x65 0x62 | | 0x65 0x62 0x00 0x6C | 0x65 0x62 |
+---------------------+---------------------+ +---------------------+---------------------+
| 0x65 0x62 0x00 0x00 | 0x65 0x62 | | 0x65 0x62 0x00 0x00 | 0x65 0x62 |
+---------------------+---------------------+ +---------------------+---------------------+
| 0x65 0x62 | 0x65 0x62 | | 0x65 0x62 | 0x65 0x62 |
+---------------------+---------------------+ +---------------------+---------------------+
Table 11: Exmaples of semantics for Null Table 11: Examples of semantics for Null
Octets in VINT_DATA. Octets in VINT_DATA
14. Guidelines for Updating Elements 14. Guidelines for Updating Elements
An EBML Document can be updated without requiring that the entire An EBML Document can be updated without requiring that the entire
EBML Document be rewritten. These recommendations describe EBML Document be rewritten. These recommendations describe
strategies to change the Element Data of a written EBML Element with strategies for changing the Element Data of a written EBML Element
minimal disruption to the rest of the EBML Document. with minimal disruption to the rest of the EBML Document.
14.1. Reducing a Element Data in Size 14.1. Reducing Element Data in Size
There are three methods to reduce the size of Element Data of a There are three methods to reduce the size of Element Data of a
written EBML Element. written EBML Element.
14.1.1. Adding a Void Element 14.1.1. Adding a Void Element
When an EBML Element is changed to reduce its total length by more When an EBML Element is changed to reduce its total length by more
than one octet, an EBML Writer SHOULD fill the freed space with a than one octet, an EBML Writer SHOULD fill the freed space with a
Void Element. Void Element.
14.1.2. Extending the Element Data Size 14.1.2. Extending the Element Data Size
The same value for Element Data Size MAY be written in various The same value for Element Data Size MAY be written in various
lengths, so for minor reductions of the Element Data, the Element lengths, so for minor reductions of the Element Data, the Element
Size MAY be written to a longer octet length to fill the freed space. Size MAY be written to a longer octet length to fill the freed space.
For example, the first row of Table 12 depicts a String Element that For example, the first row of Table 12 depicts a String Element that
stores an Element ID (3 octets), Element Data Size (1 octet), and stores an Element ID (3 octets), Element Data Size (1 octet), and
Element Data (4 octets). If the Element Data is changed to reduce Element Data (4 octets). If the Element Data is changed to reduce
the length by one octet and if the current length of the Element Data the length by one octet, and if the current length of the Element
Size is less than its maximum permitted length, then the Element Data Data Size is less than its maximum permitted length, then the Element
Size of that Element MAY be rewritten to increase its length by one Data Size of that Element MAY be rewritten to increase its length by
octet. Thus before and after the change the EBML Element maintains one octet. Thus, before and after the change, the EBML Element
the same length of 8 octets and data around the Element does not need maintains the same length of 8 octets, and data around the Element
to be moved. does not need to be moved.
+-------------+------------+-------------------+--------------+ +=============+============+===================+==============+
| Status | Element ID | Element Data Size | Element Data | | Status | Element ID | Element Data Size | Element Data |
+=============+============+===================+==============+ +=============+============+===================+==============+
| Before edit | 0x3B4040 | 0x84 | 0x65626D6C | | Before edit | 0x3B4040 | 0x84 | 0x65626D6C |
+-------------+------------+-------------------+--------------+ +-------------+------------+-------------------+--------------+
| After edit | 0x3B4040 | 0x4003 | 0x6D6B76 | | After edit | 0x3B4040 | 0x4003 | 0x6D6B76 |
+-------------+------------+-------------------+--------------+ +-------------+------------+-------------------+--------------+
Table 12: Example of editing a VINT to reduce VINT_DATA Table 12: Example of editing a VINT to reduce VINT_DATA
length by one octet. length by one octet
This method is RECOMMENDED when the Element Data is reduced by a This method is RECOMMENDED when the Element Data is reduced by a
single octet; for reductions by two or more octets it is RECOMMENDED single octet; for reductions by two or more octets, it is RECOMMENDED
to fill the freed space with a Void Element. to fill the freed space with a Void Element.
Note that if the Element Data length needs to be rewritten as Note that if the Element Data length needs to be rewritten as
shortened by one octet and the Element Data Size could be rewritten shortened by one octet and the Element Data Size could be rewritten
as a shorter VINT then it is RECOMMENDED to rewrite the Element Data as a shorter VINT, then it is RECOMMENDED to rewrite the Element Data
Size as one octet shorter, shorten the Element Data by one octet, and Size as one octet shorter, shorten the Element Data by one octet, and
follow that Element with a Void Element. For example, Table 13 follow that Element with a Void Element. For example, Table 13
depicts a String Element that stores an Element ID (3 octets), depicts a String Element that stores an Element ID (3 octets),
Element Data Size (2 octets, but could be rewritten in one octet), Element Data Size (2 octets, but could be rewritten in one octet),
and Element Data (3 octets). If the Element Data is to be rewritten and Element Data (3 octets). If the Element Data is to be rewritten
to a two octet length, then another octet can be taken from Element to a two-octet length, then another octet can be taken from Element
Data Size so that there is enough space to add a two octet Void Data Size so that there is enough space to add a two-octet Void
Element. Element.
+--------+------------+-------------------+--------------+---------+ +========+============+===================+==============+=========+
| Status | Element ID | Element Data Size | Element Data | Void | | Status | Element ID | Element Data Size | Element Data | Void |
| | | | | Element | | | | | | Element |
+========+============+===================+==============+=========+ +========+============+===================+==============+=========+
| Before | 0x3B4040 | 0x4003 | 0x6D6B76 | | | Before | 0x3B4040 | 0x4003 | 0x6D6B76 | |
+--------+------------+-------------------+--------------+---------+ +--------+------------+-------------------+--------------+---------+
| After | 0x3B4040 | 0x82 | 0x6869 | 0xEC80 | | After | 0x3B4040 | 0x82 | 0x6869 | 0xEC80 |
+--------+------------+-------------------+--------------+---------+ +--------+------------+-------------------+--------------+---------+
Table 13: Example of editing a VINT to reduce VINT_DATA length Table 13: Example of editing a VINT to reduce VINT_DATA length
by more than one octet. by more than one octet
14.1.3. Terminating Element Data 14.1.3. Terminating Element Data
For String Elements and UTF-8 Elements the length of Element Data For String Elements and UTF-8 Elements, the length of Element Data
could be reduced by adding Null Octets to terminate the Element Data could be reduced by adding Null Octets to terminate the Element Data
(see Section 13). (see Section 13).
In Table 14, a four octets long Element Data is changed to a three In Table 14, Element Data four octets long is changed to a value
octet long value followed by a Null Octet; the Element Data Size three octets long, followed by a Null Octet; the Element Data Size
includes any Null Octets used to terminate Element Data so remains includes any Null Octets used to terminate Element Data and therefore
unchanged. remains unchanged.
+-------------+------------+-------------------+--------------+ +=============+============+===================+==============+
| Status | Element ID | Element Data Size | Element Data | | Status | Element ID | Element Data Size | Element Data |
+=============+============+===================+==============+ +=============+============+===================+==============+
| Before edit | 0x3B4040 | 0x84 | 0x65626D6C | | Before edit | 0x3B4040 | 0x84 | 0x65626D6C |
+-------------+------------+-------------------+--------------+ +-------------+------------+-------------------+--------------+
| After edit | 0x3B4040 | 0x84 | 0x6D6B7600 | | After edit | 0x3B4040 | 0x84 | 0x6D6B7600 |
+-------------+------------+-------------------+--------------+ +-------------+------------+-------------------+--------------+
Table 14: Example of terminating VINT_DATA with a Null Table 14: Example of terminating VINT_DATA with a Null
Octet when reducing VINT length during an edit. Octet when reducing VINT length during an edit
Note that this method is NOT RECOMMENDED. For reductions of one Note that this method is NOT RECOMMENDED. For reductions of one
octet, the method for Extending the Element Data Size SHOULD be used. octet, the method for Extending the Element Data Size SHOULD be used.
For reduction by more than one octet, the method for Adding a Void For reduction by more than one octet, the method for Adding a Void
Element SHOULD be used. Element SHOULD be used.
14.2. Considerations when Updating Elements with Cyclic Redundancy 14.2. Considerations when Updating Elements with Cyclic Redundancy
Check (CRC) Check (CRC)
If the Element to be changed is a Descendant Element of any Master If the Element to be changed is a Descendant Element of any Master
Element that contains a CRC-32 Element (see Section 11.3.1) then the Element that contains a CRC-32 Element (see Section 11.3.1), then the
CRC-32 Element MUST be verified before permitting the change. CRC-32 Element MUST be verified before permitting the change.
Additionally the CRC-32 Element value MUST be subsequently updated to Additionally, the CRC-32 Element value MUST be subsequently updated
reflect the changed data. to reflect the changed data.
15. Backward and Forward Compatibility 15. Backward and Forward Compatibility
Elements of an EBML format SHOULD be designed with backward and Elements of an EBML format SHOULD be designed with backward and
forward compatibility in mind. forward compatibility in mind.
15.1. Backward Compatibility 15.1. Backward Compatibility
Backward compatibility of new EBML Elements can be achieved by using Backward compatibility of new EBML Elements can be achieved by using
default values for mandatory elements. The default value MUST default values for mandatory elements. The default value MUST
represent the state that was assumed for previous versions of the represent the state that was assumed for previous versions of the
EBML Schema, without this new EBML Element. If such a state doesn't EBML Schema, without this new EBML Element. If such a state doesn't
make sense for previous versions, then the new EBML Element SHOULD make sense for previous versions, then the new EBML Element SHOULD
NOT be mandatory. NOT be mandatory.
Non mandatory EBML Elements can be added in a new EBMLDocTypeVersion. Non-mandatory EBML Elements can be added in a new EBMLDocTypeVersion.
Since they are not mandatory they won't be found in older versions of Since they are not mandatory, they won't be found in older versions
the EBMLDocTypeVersion, just as they might not be found in newer of the EBMLDocTypeVersion, just as they might not be found in newer
versions. This causes no compatibility issue. versions. This causes no compatibility issue.
15.2. Forward Compatibility 15.2. Forward Compatibility
EBML Elements MAY be marked as deprecated in a new EBMLDocTypeVersion EBML Elements MAY be marked as deprecated in a new EBMLDocTypeVersion
using the maxver attribute of the EBML Schema. If such an Element is using the "maxver" attribute of the EBML Schema. If such an Element
found in an EBML Document with newer version of the is found in an EBML Document with a newer version of the
EBMLDocTypeVersion it SHOULD be discarded. EBMLDocTypeVersion, it SHOULD be discarded.
16. Security Considerations 16. Security Considerations
EBML itself does not offer any kind of security and does not provide EBML itself does not offer any kind of security and does not provide
confidentiality. EBML does not provide any kind of authorization. confidentiality. EBML does not provide any kind of authorization.
EBML only offers marginally useful and effective data integrity EBML only offers marginally useful and effective data integrity
options, such as CRC elements. options, such as CRC elements.
Even if the semantic layer offers any kind of encryption, EBML itself Even if the semantic layer offers any kind of encryption, EBML itself
could leak information at both the semantic layer (as declared via could leak information at both the semantic layer (as declared via
the DocType Element) and within the EBML structure (the presence of the DocType Element) and within the EBML structure (the presence of
EBML Elements can be derived even with an unknown semantic layer EBML Elements can be derived even with an unknown semantic layer
using a heuristic approach; not without errors, of course, but with a using a heuristic approach -- not without errors, of course, but with
certain degree of confidence). a certain degree of confidence).
An EBML Document that has the following issues may still be handled An EBML Document that has the following issues may still be handled
by the EBML Reader and the data accepted as such, depending on how by the EBML Reader and the data accepted as such, depending on how
strict the EBML Reader wants to be: strict the EBML Reader wants to be:
* Invalid Element IDs that are longer than the limit stated in the * Invalid Element IDs that are longer than the limit stated in the
EBMLMaxIDLength Element of the EBML Header. EBMLMaxIDLength Element of the EBML Header.
* Invalid Element IDs that are not encoded in the shortest-possible * Invalid Element IDs that are not encoded in the shortest-possible
way. way.
skipping to change at page 52, line 49 skipping to change at line 2424
Element IDs that are unknown to the EBML Reader MAY be accepted as Element IDs that are unknown to the EBML Reader MAY be accepted as
valid EBML IDs in order to skip such elements. valid EBML IDs in order to skip such elements.
EBML Elements with a string type may contain extra data after the EBML Elements with a string type may contain extra data after the
first 0x00. These data MUST be discarded according to the Section 13 first 0x00. These data MUST be discarded according to the Section 13
rules. rules.
An EBML Reader may discard some or all data if the following errors An EBML Reader may discard some or all data if the following errors
are found in the EBML Document: are found in the EBML Document:
* Invalid Element Data Size values (e.g. extending the length of the * Invalid Element Data Size values (e.g., extending the length of
EBML Element beyond the scope of the Parent Element; possibly the EBML Element beyond the scope of the Parent Element, possibly
triggering access-out-of-bounds issues). triggering access-out-of-bounds issues).
* Very high lengths in order to force out-of-memory situations * Very high lengths in order to force out-of-memory situations
resulting in a denial of service, access-out-of-bounds issues etc. resulting in a denial of service, access-out-of-bounds issues,
etc.
* Missing EBML Elements that are mandatory in a Master Element and * Missing EBML Elements that are mandatory in a Master Element and
have no declared default value, making the semantic invalid at have no declared default value, making the semantic invalid at
that Master Element level. that Master Element level.
* Usage of invalid UTF-8 encoding in EBML Elements of UTF-8 type * Usage of invalid UTF-8 encoding in EBML Elements of UTF-8 type
(e.g. in order to trigger access-out-of-bounds or buffer overflow (e.g., in order to trigger access-out-of-bounds or buffer-overflow
issues). issues).
* Usage of invalid data in EBML Elements with a date type, * Usage of invalid data in EBML Elements with a date type,
triggering bogus date accesses. triggering bogus date accesses.
* The CRC-32 Element (see Section 11.3.1) of a Master Element * The CRC-32 Element (see Section 11.3.1) of a Master Element
doesn't match the rest of the content of that Master Element. doesn't match the rest of the content of that Master Element.
Side channel attacks could exploit: Side-channel attacks could exploit:
* The semantic equivalence of the same string stored in a String * The semantic equivalence of the same string stored in a String
Element or UTF-8 Element with and without zero-bit padding, making Element or UTF-8 Element with and without zero-bit padding, making
comparison at the semantic level invalid. comparison at the semantic level invalid.
* The semantic equivalence of VINT_DATA within Element Data Size * The semantic equivalence of VINT_DATA within Element Data Size
with two different lengths due to left-padding zero bits, making with two different lengths due to left-padding zero bits, making
comparison at the semantic level invalid. comparison at the semantic level invalid.
* Data contained within a Master Element which is not itself part of * Data contained within a Master Element that is not itself part of
a Child Element can trigger incorrect parsing behavior in EBML a Child Element, which can trigger incorrect parsing behavior in
Readers. EBML Readers.
* Extraneous copies of Identically Recurring Element, making parsing * Extraneous copies of Identically Recurring Element, making parsing
unnecessarily slow to the point of not being usable. unnecessarily slow to the point of not being usable.
* Copies of Identically Recurring Element within a Parent Element * Copies of Identically Recurring Element within a Parent Element
that contain invalid CRC-32 Elements. EBML Readers not checking that contain invalid CRC-32 Elements. EBML Readers not checking
the CRC-32 might use the version of the element with mismatching the CRC-32 might use the version of the element with mismatching
CRC-32. CRC-32s.
* Use of Void Elements which could be used to hide content or create * Use of Void Elements that could be used to hide content or create
bogus resynchronization points seen by some EBML Reader and not bogus resynchronization points seen by some EBML Readers and not
others. others.
17. IANA Considerations 17. IANA Considerations
17.1. EBML Element ID Registry
This document creates a new IANA Registry called "EBML Element ID 17.1. EBML Element IDs Registry
Registry".
Element IDs are described in section Element ID. Element IDs are This document creates a new IANA registry called the "EBML Element
encoded using the VINT mechanism described in section Section 4 can IDs" registry.
be between one and five octets long. Five octet long Element IDs are
possible only if declared in the header.
This IANA Registry only applies to Elements that can be contained in Element IDs are described in Section 5. Element IDs are encoded
using the VINT mechanism described in Section 4 and can be between
one and five octets long. Five-octet-long Element IDs are possible
only if declared in the header.
This IANA registry only applies to Elements that can be contained in
the EBML Header, thus including Global Elements. Elements only found the EBML Header, thus including Global Elements. Elements only found
in the EBML Body have their own set of independent Element IDs and in the EBML Body have their own set of independent Element IDs and
are not part of this IANA Registry. are not part of this IANA registry.
One-octet Element IDs MUST be between 0x81 and 0xFE. These items are One-octet Element IDs MUST be between 0x81 and 0xFE. These items are
valuable because they are short, and need to be used for commonly valuable because they are short, and they need to be used for
repeated elements. Element IDs are to be allocated within this range commonly repeated elements. Element IDs are to be allocated within
according to the "RFC Required" policy [RFC8126]. this range according to the "RFC Required" policy [RFC8126].
The following one-octet Element IDs are RESERVED: 0xFF and 0x80. The following one-octet Element IDs are RESERVED: 0xFF and 0x80.
The one-octet range of 0x00 to 0x7F are not valid for use as an Values in the one-octet range of 0x00 to 0x7F are not valid for use
Element ID. as an Element ID.
Two-octet Element IDs MUST be between 0x407F and 0x7FFE. Element IDs Two-octet Element IDs MUST be between 0x407F and 0x7FFE. Element IDs
are to be allocated within this range according to the "Specification are to be allocated within this range according to the "Specification
Required" policy [RFC8126]. Required" policy [RFC8126].
The following two-octet Element IDs are RESERVED: 0x7FFF and 0x4000. The following two-octet Element IDs are RESERVED: 0x7FFF and 0x4000.
The two-octet ranges of 0x0000 to 0x3FFF and 0x8000 to 0xFFFF are not Values in the two-octet ranges of 0x0000 to 0x3FFF and 0x8000 to
valid for use as an Element ID. 0xFFFF are not valid for use as an Element ID.
Three-octet Element IDs MUST be between 0x203FFF and 0x3FFFFE. Three-octet Element IDs MUST be between 0x203FFF and 0x3FFFFE.
Element IDs are to be allocated within this range according to the Element IDs are to be allocated within this range according to the
"First Come First Served" policy [RFC8126]. "First Come First Served" policy [RFC8126].
The following three-octet Element IDs are RESERVED: 0x3FFFFF and The following three-octet Element IDs are RESERVED: 0x3FFFFF and
0x200000. 0x200000.
The three-octet ranges of 0x000000 to 0x1FFFFF and 0x400000 to Values in the three-octet ranges of 0x000000 to 0x1FFFFF and 0x400000
0xFFFFFF are not valid for use as an Element ID. to 0xFFFFFF are not valid for use as an Element ID.
Four-octet Element IDs MUST be between 0x101FFFFF and 0x1FFFFFFE. Four-octet Element IDs MUST be between 0x101FFFFF and 0x1FFFFFFE.
Four-octet Element IDs are somewhat special in that they are useful Four-octet Element IDs are somewhat special in that they are useful
for resynchronizing to major structures in the event of data for resynchronizing to major structures in the event of data
corruption or loss. As such four-octet Element IDs are split into corruption or loss. As such, four-octet Element IDs are split into
two categories. Four-octet Element IDs whose lower three octets (as two categories. Four-octet Element IDs whose lower three octets (as
encoded) would make printable 7-bit ASCII values (0x20 to 0x7E, encoded) would make printable 7-bit ASCII values (0x20 to 0x7E,
inclusive) MUST be allocated by the "Specification Required" policy. inclusive) MUST be allocated by the "Specification Required" policy.
Sequential allocation of values is not required: specifications Sequential allocation of values is not required: specifications
SHOULD include a specific request, and are encouraged to do early SHOULD include a specific request and are encouraged to do early
allocations. allocations.
To be clear about the above category: four-octet Element IDs always To be clear about the above category: four-octet Element IDs always
start with hex 0x10 to 0x1F, and that octet may be chosen so that the start with hex 0x10 to 0x1F, and that octet may be chosen so that the
entire VINT has some desirable property, such as a specific CRC. The entire VINT has some desirable property, such as a specific CRC. The
other three octets, when ALL having values between 0x20 (32, ASCII other three octets, when ALL having values between 0x20 (32, ASCII
Space) and 0x7E (126, ASCII "~"), fall into this category. Space) and 0x7E (126, ASCII "~"), fall into this category.
Other four-octet Element IDs may be allocated by the "First Come Other four-octet Element IDs may be allocated by the "First Come
First Served" policy. First Served" policy.
The following four-octet Element IDs are RESERVED: 0x1FFFFFFF and The following four-octet Element IDs are RESERVED: 0x1FFFFFFF and
0x10000000. 0x10000000.
The four-octet ranges of 0x00000000 to 0x0FFFFFFF and 0x20000000 to Values in the four-octet ranges of 0x00000000 to 0x0FFFFFFF and
0xFFFFFFFF are not valid for use as an Element ID. 0x20000000 to 0xFFFFFFFF are not valid for use as an Element ID.
Five-octet Element IDs (values from 0x080FFFFFFF to 0x0FFFFFFFFE) are Five-octet Element IDs (values from 0x080FFFFFFF to 0x0FFFFFFFFE) are
RESERVED according to the "Experimental Use" policy [RFC8126]: they RESERVED according to the "Experimental Use" policy [RFC8126]: they
may be used by anyone at any time, but there is no coordination. may be used by anyone at any time, but there is no coordination.
ID Values found in this document are assigned as initial values as ID Values found in this document are assigned as initial values as
follows: follows:
+------------+-------------------------+-----------------+ +============+=========================+=================+
| Element ID | Element Name | Reference | | Element ID | Element Name | Reference |
+============+=========================+=================+ +============+=========================+=================+
| 0x1A45DFA3 | EBML | Described in | | 0x1A45DFA3 | EBML | Described in |
| | | Section 11.2.1 | | | | Section 11.2.1 |
+------------+-------------------------+-----------------+ +------------+-------------------------+-----------------+
| 0x4286 | EBMLVersion | Described in | | 0x4286 | EBMLVersion | Described in |
| | | Section 11.2.2 | | | | Section 11.2.2 |
+------------+-------------------------+-----------------+ +------------+-------------------------+-----------------+
| 0x42F7 | EBMLReadVersion | Described in | | 0x42F7 | EBMLReadVersion | Described in |
| | | Section 11.2.3 | | | | Section 11.2.3 |
skipping to change at page 56, line 49 skipping to change at line 2595
| | | Section 11.2.11 | | | | Section 11.2.11 |
+------------+-------------------------+-----------------+ +------------+-------------------------+-----------------+
| 0xBF | CRC-32 | Described in | | 0xBF | CRC-32 | Described in |
| | | Section 11.3.1 | | | | Section 11.3.1 |
+------------+-------------------------+-----------------+ +------------+-------------------------+-----------------+
| 0xEC | Void | Described in | | 0xEC | Void | Described in |
| | | Section 11.3.2 | | | | Section 11.3.2 |
+------------+-------------------------+-----------------+ +------------+-------------------------+-----------------+
Table 15: IDs and Names for EBML Elements assigned by Table 15: IDs and Names for EBML Elements assigned by
this document. this document
17.2. EBML DocType Registry 17.2. EBML DocTypes Registry
This document creates a new IANA Registry called "EBML DocType This document creates a new IANA registry called the "EBML DocTypes"
Registry". registry.
To register a new DocType in this registry one needs a DocType name, To register a new DocType in this registry, one needs a DocType name,
a Description of the DocType, a Change Controller (IESG or email of a Description of the DocType, a Change Controller (IESG or email of
registrant) and an optional Reference to a document describing the registrant), and an optional Reference to a document describing the
DocType. DocType.
DocType values are described in Section 11.1.3.1. DocTypes are ASCII DocType values are described in Section 11.1.4.1. DocTypes are ASCII
strings, defined in Section 7.4, which label the official name of the strings, defined in Section 7.4, which label the official name of the
EBML Document Type. The strings may be allocated according to the EBML Document Type. The strings may be allocated according to the
"First Come First Served" policy. "First Come First Served" policy.
The use of ASCII corresponds to the types and code already in use, The use of ASCII corresponds to the types and code already in use;
the value is not meant to be visible to the user. the value is not meant to be visible to the user.
DocType string values of "matroska" and "webm" are RESERVED to the DocType string values of "matroska" and "webm" are RESERVED to the
IETF for future use. These can be assigned via the "IESG Approval" IETF for future use. These can be assigned via the "IESG Approval"
or "RFC Required" policies [RFC8126]. or "RFC Required" policies [RFC8126].
18. Normative References 18. Normative References
[W3C.REC-xmlschema-0-20041028] [IEEE.754] IEEE, "IEEE Standard for Binary Floating-Point
Fallside, D. and P. Walmsley, "XML Schema Part 0: Primer Arithmetic", 13 June 2019,
Second Edition", World Wide Web Consortium Recommendation <https://standards.ieee.org/standard/754-2019.html>.
REC-xmlschema-0-20041028, 28 October 2004,
<http://www.w3.org/TR/2004/REC-xmlschema-0-20041028>.
[RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax [ISO3309] International Organization for Standardization, "Data
Specifications: ABNF", STD 68, RFC 5234, communication -- High-level data link control procedures
DOI 10.17487/RFC5234, January 2008, -- Frame structure", ISO 3309, 3rd Edition, October 1984,
<https://www.rfc-editor.org/info/rfc5234>. <https://www.iso.org/standard/8558.html>.
[ITU.V42.1994] [ISO9899] International Organization for Standardization,
International Telecommunications Union, "Error-correcting "Information technology -- Programming languages -- C",
Procedures for DCEs Using Asynchronous-to-Synchronous ISO/IEC 9899:2011, 2011,
Conversion", 1994. <https://www.iso.org/standard/57853.html>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC [ITU.V42] International Telecommunications Union, "Error-correcting
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, procedures for DCEs using asynchronous-to-synchronous
May 2017, <https://www.rfc-editor.org/info/rfc8174>. conversion", ITU-T Recommendation V.42, March 2002,
<https://www.itu.int/rec/T-REC-V.42>.
[RFC0020] Cerf, V., "ASCII format for network interchange", STD 80, [RFC0020] Cerf, V., "ASCII format for network interchange", STD 80,
RFC 20, DOI 10.17487/RFC0020, October 1969, RFC 20, DOI 10.17487/RFC0020, October 1969,
<https://www.rfc-editor.org/info/rfc20>. <https://www.rfc-editor.org/info/rfc20>.
[ISO.9899.2011]
International Organization for Standardization,
"Programming languages - C", 2011.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>. <https://www.rfc-editor.org/info/rfc2119>.
[RFC2648] Moats, R., "A URN Namespace for IETF Documents", RFC 2648,
DOI 10.17487/RFC2648, August 1999,
<https://www.rfc-editor.org/info/rfc2648>.
[RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet:
Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002,
<https://www.rfc-editor.org/info/rfc3339>.
[RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO
10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November
2003, <https://www.rfc-editor.org/info/rfc3629>.
[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
DOI 10.17487/RFC3688, January 2004,
<https://www.rfc-editor.org/info/rfc3688>.
[RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax
Specifications: ABNF", STD 68, RFC 5234,
DOI 10.17487/RFC5234, January 2008,
<https://www.rfc-editor.org/info/rfc5234>.
[RFC5646] Phillips, A., Ed. and M. Davis, Ed., "Tags for Identifying [RFC5646] Phillips, A., Ed. and M. Davis, Ed., "Tags for Identifying
Languages", BCP 47, RFC 5646, DOI 10.17487/RFC5646, Languages", BCP 47, RFC 5646, DOI 10.17487/RFC5646,
September 2009, <https://www.rfc-editor.org/info/rfc5646>. September 2009, <https://www.rfc-editor.org/info/rfc5646>.
[RFC7405] Kyzivat, P., "Case-Sensitive String Support in ABNF", [RFC7405] Kyzivat, P., "Case-Sensitive String Support in ABNF",
RFC 7405, DOI 10.17487/RFC7405, December 2014, RFC 7405, DOI 10.17487/RFC7405, December 2014,
<https://www.rfc-editor.org/info/rfc7405>. <https://www.rfc-editor.org/info/rfc7405>.
[W3C.SPSD-xhtml-basic-20180327]
McCarron, S., "XHTML(tm) Basic 1.1 - Second Edition", 27
March 2018.
[RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for
Writing an IANA Considerations Section in RFCs", BCP 26, Writing an IANA Considerations Section in RFCs", BCP 26,
RFC 8126, DOI 10.17487/RFC8126, June 2017, RFC 8126, DOI 10.17487/RFC8126, June 2017,
<https://www.rfc-editor.org/info/rfc8126>. <https://www.rfc-editor.org/info/rfc8126>.
[IEEE.754.1985] [RFC8141] Saint-Andre, P. and J. Klensin, "Uniform Resource Names
Institute of Electrical and Electronics Engineers, (URNs)", RFC 8141, DOI 10.17487/RFC8141, April 2017,
"Standard for Binary Floating-Point Arithmetic", August <https://www.rfc-editor.org/info/rfc8141>.
1985.
[RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
2003, <https://www.rfc-editor.org/info/rfc3629>. May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: [XHTML] McCarron, S., "XHTML(tm) Basic 1.1 -- Second Edition",
Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002, Latest version available
<https://www.rfc-editor.org/info/rfc3339>. at https://www.w3.org/TR/xhtml-basic, 27 March 2018,
<https://www.w3.org/TR/2018/SPSD-xhtml-basic-20180327/>.
[W3C.REC-xml-20081126] [XML] Bray, T., Ed., Paoli, J., Ed., Sperberg-McQueen, C.M.,
Bray, T., Paoli, J., Sperberg-McQueen, M., Maler, E., and Ed., Maler, E., Ed., and F. Yergeau, Ed., "Extensible
F. Yergeau, "Extensible Markup Language (XML) 1.0 (Fifth Markup Language (XML) 1.0 (Fifth Edition)", Latest version
Edition)", World Wide Web Consortium Recommendation REC- available at https://www.w3.org/TR/xml/, 26 November 2008,
xml-20081126, 26 November 2008, <https://www.w3.org/TR/2008/REC-xml-20081126/>.
<http://www.w3.org/TR/2008/REC-xml-20081126>.
[ISO.3309.1979] [XML-SCHEMA]
International Organization for Standardization, "Data Fallside, D.C. and P. Walmsley, "XML Schema Part 0: Primer
communication - High-level data link control procedures - Second Edition", Latest version available at
Frame structure", 1979. http://www.w3.org/TR/xmlschema-0/, 28 October 2004,
<https://www.w3.org/TR/2004/REC-xmlschema-0-20041028/>.
19. Informative References 19. Informative References
[Matroska] IETF, "Matroska Specifications", 2019, [Matroska] Lhomme, S., Bunkus, M., and D. Rice, "Matroska Media
<https://datatracker.ietf.org/doc/draft-ietf-cellar- Container Format Specifications", Work in Progress,
matroska/>. Internet-Draft, draft-ietf-cellar-matroska-05, 17 April
2020, <https://tools.ietf.org/html/draft-ietf-cellar-
matroska-05>.
[WebM] The WebM Project, "WebM Container Guidelines", November [WebM] The WebM Project, "WebM Container Guidelines", 28 November
2017, <https://www.webmproject.org/docs/container/>. 2017, <https://www.webmproject.org/docs/container/>.
[W3C.REC-xpath-19991116] [XPath] Clark, J., Ed. and S. DeRose, "XML Path Language (XPath)
Clark, J. and S. DeRose, "XML Path Language (XPath) Version 1.0", Latest version available
Version 1.0", World Wide Web Consortium Recommendation at https://www.w3.org/TR/xpath, 16 November 1999,
REC-xpath-19991116, 16 November 1999, <https://www.w3.org/TR/1999/REC-xpath-19991116>.
<http://www.w3.org/TR/1999/REC-xpath-19991116>.
Authors' Addresses Authors' Addresses
Steve Lhomme Steve Lhomme
Email: slhomme@matroska.org Email: slhomme@matroska.org
Dave Rice Dave Rice
Email: dave@dericed.com Email: dave@dericed.com
 End of changes. 479 change blocks. 
992 lines changed or deleted 1033 lines changed or added

This html diff was produced by rfcdiff 1.47. The latest version is available from http://tools.ietf.org/tools/rfcdiff/