draft-ietf-cellar-ebml-16.txt   draft-ietf-cellar-ebml-17.txt 
cellar S. Lhomme cellar S. Lhomme
Internet-Draft Internet-Draft
Intended status: Standards Track D. Rice Intended status: Standards Track D. Rice
Expires: 24 June 2020 Expires: 30 July 2020
M. Bunkus M. Bunkus
22 December 2019 27 January 2020
Extensible Binary Meta Language Extensible Binary Meta Language
draft-ietf-cellar-ebml-16 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.
skipping to change at page 1, line 38 skipping to change at page 1, line 38
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on 24 June 2020. This Internet-Draft will expire on 30 July 2020.
Copyright Notice Copyright Notice
Copyright (c) 2019 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 (https://trustee.ietf.org/
license-info) in effect on the date of publication of this document. license-info) in effect on the date of publication of this document.
Please review these documents carefully, as they describe your rights Please review these documents carefully, as they describe your rights
and restrictions with respect to this document. Code Components and restrictions with respect to this document. Code Components
extracted from this document must include Simplified BSD License text extracted from this document must include Simplified BSD License text
as described in Section 4.e of the Trust Legal Provisions and are as described in Section 4.e of the Trust Legal Provisions and are
provided without warranty as described in the Simplified BSD License. provided without warranty as described in the Simplified BSD License.
skipping to change at page 2, line 49 skipping to change at page 2, line 49
11. Elements semantic . . . . . . . . . . . . . . . . . . . . . . 19 11. Elements semantic . . . . . . . . . . . . . . . . . . . . . . 19
11.1. EBML Schema . . . . . . . . . . . . . . . . . . . . . . 19 11.1. EBML Schema . . . . . . . . . . . . . . . . . . . . . . 19
11.1.1. EBML Schema Example . . . . . . . . . . . . . . . . 20 11.1.1. EBML Schema Example . . . . . . . . . . . . . . . . 20
11.1.2. <EBMLSchema> Element . . . . . . . . . . . . . . . . 21 11.1.2. <EBMLSchema> Element . . . . . . . . . . . . . . . . 21
11.1.3. <EBMLSchema> Attributes . . . . . . . . . . . . . . 21 11.1.3. <EBMLSchema> Attributes . . . . . . . . . . . . . . 21
11.1.4. <element> Element . . . . . . . . . . . . . . . . . 22 11.1.4. <element> Element . . . . . . . . . . . . . . . . . 22
11.1.5. <element> Attributes . . . . . . . . . . . . . . . . 22 11.1.5. <element> Attributes . . . . . . . . . . . . . . . . 22
11.1.6. <documentation> Element . . . . . . . . . . . . . . 30 11.1.6. <documentation> Element . . . . . . . . . . . . . . 30
11.1.7. <documentation> Attributes . . . . . . . . . . . . . 30 11.1.7. <documentation> Attributes . . . . . . . . . . . . . 30
11.1.8. <implementation_note> Element . . . . . . . . . . . 31 11.1.8. <implementation_note> Element . . . . . . . . . . . 31
11.1.9. <implementation_note> Attributes . . . . . . . . . . 31 11.1.9. <implementation_note> Attributes . . . . . . . . . . 32
11.1.10. <restriction> Element . . . . . . . . . . . . . . . 33 11.1.10. <restriction> Element . . . . . . . . . . . . . . . 33
11.1.11. <enum> Element . . . . . . . . . . . . . . . . . . . 33 11.1.11. <enum> Element . . . . . . . . . . . . . . . . . . . 33
11.1.12. <enum> Attributes . . . . . . . . . . . . . . . . . 34 11.1.12. <enum> Attributes . . . . . . . . . . . . . . . . . 34
11.1.13. <extension> Element . . . . . . . . . . . . . . . . 34 11.1.13. <extension> Element . . . . . . . . . . . . . . . . 34
11.1.14. <extension> Attributes . . . . . . . . . . . . . . . 34 11.1.14. <extension> Attributes . . . . . . . . . . . . . . . 34
11.1.15. XML Schema for EBML Schema . . . . . . . . . . . . . 35 11.1.15. XML Schema for EBML Schema . . . . . . . . . . . . . 35
11.1.16. Identically Recurring Elements . . . . . . . . . . . 38 11.1.16. Identically Recurring Elements . . . . . . . . . . . 38
11.1.17. Textual expression of floats . . . . . . . . . . . . 39 11.1.17. Textual expression of floats . . . . . . . . . . . . 39
11.1.18. Note on the use of default attributes to define 11.1.18. Note on the use of default attributes to define
Mandatory EBML Elements . . . . . . . . . . . . . . . 40 Mandatory EBML Elements . . . . . . . . . . . . . . . 40
11.2. EBML Header Elements . . . . . . . . . . . . . . . . . . 40 11.2. EBML Header Elements . . . . . . . . . . . . . . . . . . 41
11.2.1. EBML Element . . . . . . . . . . . . . . . . . . . . 41 11.2.1. EBML Element . . . . . . . . . . . . . . . . . . . . 41
11.2.2. EBMLVersion Element . . . . . . . . . . . . . . . . 41 11.2.2. EBMLVersion Element . . . . . . . . . . . . . . . . 41
11.2.3. EBMLReadVersion Element . . . . . . . . . . . . . . 41 11.2.3. EBMLReadVersion Element . . . . . . . . . . . . . . 41
11.2.4. EBMLMaxIDLength Element . . . . . . . . . . . . . . 42 11.2.4. EBMLMaxIDLength Element . . . . . . . . . . . . . . 42
11.2.5. EBMLMaxSizeLength Element . . . . . . . . . . . . . 42 11.2.5. EBMLMaxSizeLength Element . . . . . . . . . . . . . 42
11.2.6. DocType Element . . . . . . . . . . . . . . . . . . 43 11.2.6. DocType Element . . . . . . . . . . . . . . . . . . 43
11.2.7. DocTypeVersion Element . . . . . . . . . . . . . . . 43 11.2.7. DocTypeVersion Element . . . . . . . . . . . . . . . 43
11.2.8. DocTypeReadVersion Element . . . . . . . . . . . . . 44 11.2.8. DocTypeReadVersion Element . . . . . . . . . . . . . 44
11.2.9. DocTypeExtension Element . . . . . . . . . . . . . . 44 11.2.9. DocTypeExtension Element . . . . . . . . . . . . . . 44
11.2.10. DocTypeExtensionName Element . . . . . . . . . . . . 45 11.2.10. DocTypeExtensionName Element . . . . . . . . . . . . 45
skipping to change at page 3, line 41 skipping to change at page 3, line 41
14.1.1. Adding a Void Element . . . . . . . . . . . . . . . 49 14.1.1. Adding a Void Element . . . . . . . . . . . . . . . 49
14.1.2. Extending the Element Data Size . . . . . . . . . . 49 14.1.2. Extending the Element Data Size . . . . . . . . . . 49
14.1.3. Terminating Element Data . . . . . . . . . . . . . . 50 14.1.3. Terminating Element Data . . . . . . . . . . . . . . 50
14.2. Considerations when Updating Elements with Cyclic 14.2. Considerations when Updating Elements with Cyclic
Redundancy Check (CRC) . . . . . . . . . . . . . . . . . 51 Redundancy Check (CRC) . . . . . . . . . . . . . . . . . 51
15. Backward and Forward Compatibility . . . . . . . . . . . . . 51 15. Backward and Forward Compatibility . . . . . . . . . . . . . 51
15.1. Backward Compatibility . . . . . . . . . . . . . . . . . 51 15.1. Backward Compatibility . . . . . . . . . . . . . . . . . 51
15.2. Forward Compatibility . . . . . . . . . . . . . . . . . 52 15.2. Forward Compatibility . . . . . . . . . . . . . . . . . 52
16. Security Considerations . . . . . . . . . . . . . . . . . . . 52 16. Security Considerations . . . . . . . . . . . . . . . . . . . 52
17. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 53 17. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 53
17.1. EBML Element ID Registry . . . . . . . . . . . . . . . . 53 17.1. EBML Element ID Registry . . . . . . . . . . . . . . . . 54
17.2. EBML DocType Registry . . . . . . . . . . . . . . . . . 57 17.2. EBML DocType Registry . . . . . . . . . . . . . . . . . 57
18. Normative References . . . . . . . . . . . . . . . . . . . . 57 18. Normative References . . . . . . . . . . . . . . . . . . . . 57
19. Informative References . . . . . . . . . . . . . . . . . . . 59 19. Informative References . . . . . . . . . . . . . . . . . . . 59
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 59 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 59
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 and octet (byte) aligned format inspired by the principle of XML (a
framework for structuring data). framework for structuring data).
skipping to change at page 6, line 25 skipping to change at page 6, line 25
"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 the
"EBML Elements" immediately contained within a "Master Element". "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" which contains a specified element. For any specified "EBML Element"
that is not at "Root Level", the "Parent Element" refers to the that is not at "Root Level", the "Parent Element" refers to the
"Master Element" in which that "EBML Element" is contained. "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 Elements"
contained within a "Master Element", including any of the "Child contained within a "Master Element", including any of the "Child
Elements" of its "Child Elements", and so on. Elements" of its "Child Elements", and so on.
"Void Element": A "Void Element" is an "Element" used to overwrite "Void Element": A "Void Element" is an "Element" used to overwrite
data or reserve space within a "Master Element" for later use. data or reserve space 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".
skipping to change at page 13, line 5 skipping to change at page 13, line 5
* 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 which 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 the | | | Element; as they share |
| | same parent | | | the same parent |
+------------------------------------+----------------------------+ +------------------------------------+---------------------------+
| "\root\level1\level2\elt" | Ends the Unknown-Sized | | "\root\level1\level2\elt" | Ends the Unknown-Sized |
| | Element, as they share the | | | Element; as they share |
| | same parent | | | the 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 |
| | assumed to have this path, | | | interpreted with this |
| | while parsing "elt" it can | | | path; while parsing "elt" |
| | only be a child of "elt" | | | a Global Element can only |
+------------------------------------+----------------------------+ | | 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 octets
(or about 72 petabytes). The maximum possible value that can be (or about 72 petabytes). The maximum possible value that can be
stored as Element Data Size is referred to as VINTMAX. stored as Element Data Size is referred to as VINTMAX.
skipping to change at page 19, line 45 skipping to change at page 19, line 45
An EBML Schema is a well-formed XML Document [W3C.REC-xml-20081126] An EBML Schema is a well-formed XML Document [W3C.REC-xml-20081126]
that defines the properties, arrangement, and usage of EBML Elements that defines the properties, arrangement, and usage of EBML Elements
that compose a specific EBML Document Type. The relationship of an that compose a specific EBML Document Type. The relationship of an
EBML Schema to an EBML Document is analogous to the relationship of EBML Schema to an EBML Document is analogous to the relationship of
an XML Schema [W3C.REC-xmlschema-0-20041028] to an XML Document an XML Schema [W3C.REC-xmlschema-0-20041028] to an XML Document
[W3C.REC-xml-20081126]. An EBML Schema MUST be clearly associated [W3C.REC-xml-20081126]. An EBML Schema MUST be clearly associated
with one or more EBML Document Types. An EBML Document Type is with one or more EBML Document Types. An EBML Document Type is
identified by a string stored within the EBML Header in the DocType identified by a string stored within the EBML Header in the DocType
Element; for example matroska or webm (see Section 11.2.6). The Element; for example matroska or webm (see Section 11.2.6). The
DocType value for an EBML Document Type MUST be unique and DocType value for an EBML Document Type MUST be unique, persistent
persistent. and described in the IANA Registry (see 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).
skipping to change at page 20, line 29 skipping to change at page 20, line 29
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="https://ietf.org/cellar/ebml"
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="1*1(\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="1*1(\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="*1(\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="1*(\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="1*1(\Files\File\FileName)" <element name="FileName" path="\Files\File\FileName"
id="0x614E" type="utf-8" id="0x614E" type="utf-8"
minOccurs="1"> minOccurs="1">
<documentation lang="en" purpose="definition"> <documentation lang="en" purpose="definition">
Filename of the attached file. Filename of the attached file.
</documentation> </documentation>
</element> </element>
<element name="MimeType" path="1*1(\Files\File\MimeType)" <element name="MimeType" path="\Files\File\MimeType"
id="0x464D" type="string" id="0x464D" type="string"
minOccurs="1"> minOccurs="1">
<documentation lang="en" purpose="definition"> <documentation lang="en" purpose="definition">
MIME type of the file. MIME type of the file.
</documentation> </documentation>
</element> </element>
<element name="ModificationTimestamp" <element name="ModificationTimestamp"
path="1*1(\Files\File\ModificationTimestamp)" id="0x4654" path="\Files\File\ModificationTimestamp" id="0x4654"
type="date" minOccurs="1"> type="date" minOccurs="1">
<documentation lang="en" purpose="definition"> <documentation lang="en" purpose="definition">
Modification timestamp of the file. Modification timestamp of the file.
</documentation> </documentation>
</element> </element>
<element name="Data" path="1*1(\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 [W3C.REC-xpath-19991116] of
skipping to change at page 22, line 19 skipping to change at page 22, line 19
The version lists a non-negative integer that specifies the version The version lists a non-negative integer that specifies the version
of the docType documented by the EBML Schema. Unlike XML Schemas, an of 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
Within an EBML Schema, the XPath of "@ebml" attribute is
"/EBMLSchema/@ebml".
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
the attribute is omitted, the EBML Header version is 1.
11.1.4. <element> Element 11.1.4. <element> Element
Within an EBML Schema, the XPath of "<element>" element is Within an EBML Schema, the XPath of "<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.3. EBML Schemas MAY attributes that are defined in Section 11.1.5. 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>" sub-
elements, followed by optional "<implementation_note>" sub-elements, elements, followed by optional "<implementation_note>" sub-elements,
followed by zero or one "<restriction>" sub-element, followed by followed by zero or one "<restriction>" sub-element, followed by
optional "<extension>" sub-elements. All "<element>" nodes MUST be optional "<extension>" sub-elements. All "<element>" nodes MUST be
sub-elements of the "<EBMLSchema>". sub-elements of the "<EBMLSchema>".
skipping to change at page 23, line 22 skipping to change at page 23, line 33
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 being the first in the value. The
syntax of the path attribute is defined using this Augmented Backus- syntax of the path attribute is defined using this Augmented Backus-
Naur Form (ABNF) [RFC5234] with the case sensitive update [RFC7405] Naur Form (ABNF) [RFC5234] with the case sensitive update [RFC7405]
notation: notation:
The path attribute is REQUIRED. The path attribute is REQUIRED.
EBMLFullPath = [EBMLParentPath] EBMLElementPath EBMLFullPath = EBMLParentPath EBMLElement
EBMLParentPath = EBMLFixedParent EBMLLastParent
EBMLFixedParent = *(EBMLPathAtom) EBMLParentPath = PathDelimiter [EBMLParents]
EBMLElementPath = EBMLPathAtom / EBMLPathAtomRecursive
EBMLPathAtom = PathDelimiter EBMLAtomName EBMLParents = 0*IntermediatePathAtom EBMLLastParent
EBMLPathAtomRecursive = "(1*(" EBMLPathAtom "))" IntermediatePathAtom = EBMLPathAtom / GlobalPlaceholder
EBMLLastParent = EBMLPathAtom / EBMLGlobalParent EBMLLastParent = EBMLPathAtom / GlobalPlaceholder
EBMLGlobalParent = "(" GlobalParentOccurence "\)"
EBMLAtomName = 1*(EBMLNameChar) EBMLPathAtom = [IsRecursive] EBMLAtomName PathDelimiter
EBMLNameChar = ALPHA / DIGIT / "-" / "." EBMLElement = [IsRecursive] EBMLAtomName
PathDelimiter = "\" PathDelimiter = "\"
GlobalParentOccurence = [PathMinOccurrence] "*" [PathMaxOccurrence] IsRecursive = "+"
EBMLAtomName = ALPHA / DIGIT 0*EBMLNameChar
EBMLNameChar = ALPHA / DIGIT / "-" / "."
GlobalPlaceholder = "(" GlobalParentOccurence "\)"
GlobalParentOccurence = [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 EBMLPathAtom part of the EBMLElementPath MUST be equal to the The EBMLAtomName of the EBMLElement part MUST be equal to the "@name"
name attribute of the EBML Schema. attribute of the EBML Schema. If the EBMLElement part contains an
IsRecursive part, the EBML Element can occur within itself
recursively (see Section 11.1.5.11).
The starting PathDelimiter of the path corresponds to the root of the The starting PathDelimiter of EBMLParentPath corresponds to the root
EBML Document. of the EBML Document.
In some cases the EBMLLastParent part of the path is an The "@path" value MUST be unique within the EBML Schema. The "@id"
EBMLGlobalParent. A path with a EBMLGlobalParent defines a Global value corresponding to this "@path" MUST NOT be defined for use
Element; see Section 11.3. Any path that starts with the within another EBML Element with the same EBMLParentPath as this
EBMLFixedParent of the Global Element and matches the occurrences "@path".
found in the GlobalParentOccurence is a valid path for the Global
Element.
The GlobalParentOccurence part is interpreted as an ABNF Variable A path with a GlobalPlaceholder as the EBMLLastParent defines a
Repetition. The repetition amounts correspond to the amount of Global Element; see Section 11.3. If the element has no
unspecified Parent Element levels there can be between the EBMLLastParent part or the EBMLLastParent part is not a
EBMLFixedParent and the actual EBMLElementPath. GlobalPlaceholder then the Element is not a Global Element.
PathMinOccurrence represents the minimum number of element path The GlobalParentOccurence part is interpreted as the amount of valid
required between the EBMLFixedParent and the Global Element EBMLPathAtom parts that can replace the GlobalPlaceholder in the
EBMLElementPath. For example 0 means the EBMLElementPath can be path. PathMinOccurrence represents the minimum amount of
right after the EBMLFixedParent, 1 means there has to be at least an EBMLPathAtom required to replace the GlobalPlaceholder.
element between the EBMLFixedParent and the EBMLElementPath. If PathMaxOccurrence represents the maximum amount of EBMLPathAtom
PathMinOccurrence is not present then that EBML Element has an possible to replace the GlobalPlaceholder.
PathMinOccurrence value of 0.
PathMaxOccurrence represents the maximum number of element path If PathMinOccurrence is not present then that GlobalParentOccurence
possible between the EBMLFixedParent and the Global Element has a PathMinOccurrence value of 0. If PathMaxOccurrence is not
EBMLElementPath. It cannot have the value 0 as it would be the present then there is no upper bound for the permitted amount of
Global Element can only be found right after the EBMLFixedParent, in EBMLPathAtom possible to replace the GlobalPlaceholder.
which case it's not a Global Element anymore. If PathMaxOccurrence PathMaxOccurrence MUST NOT have the value 0 as it would mean no
is not present then there is no upper bound for the permitted number EBMLPathAtom can replace the GlobalPlaceholder and the EBMLFullPath
of occurrences of element path possible between the EBMLFixedParent would be the same without that GlobalPlaceholder part.
and the Global Element EBMLElementPath. PathMaxOccurrence MUST be bigger or equal to PathMinOccurrence.
If the path contains an EBMLPathAtomRecursive part, the EBML Element For example in "\a\(0-1\)global", the Element path "\a\x\global"
can occur within itself recursively (see Section 11.1.5.11). corresponds to an EBMLPathAtom occurence of 1. The Element
"\a\x\y\global" corresponds to an EBMLPathAtom occurence of 2, etc.
In those case "\a\x" or "\a\x\y" MUST be valid pathes to be able to
contain the element "global".
As an example, a "path" of "1*(\Segment\Info)" means the element Info Consider another EBML Path "\a\(1-\)global". There has to be at
is found inside the Segment elements at least once and with no least one EBMLPathAtom between the "\a\" part and "global". So the
maximum iteration. An element SeekHead with path "global" EBML Element cannot be found inside the "\a" EBML Element as
"0*2(\Segment\SeekHead)" may not be found at all in its Segment it means the resulting path "\a\global" has no EBMLPathAtom between
parent, once or twice but no more than that. the "\a\" and "global". But the "global" EBML Element can be found
inside the "\a\b" EBML Element as the resulting path "\a\b\global"
has one EBMLPathAtom between the "\a\" and "global". Or it can be
found inside the "\a\b\c" EBML Element (two EBMLPathAtom), or inside
the "\a\b\c\d" EBML Element (three EBMLPathAtom), etc.
The "@path" value MUST be unique within the EBML Schema. The "@id" Consider another EBML Path "\a\(0-1\)global". There has to be at
value corresponding to this "@path" MUST NOT be defined for use most one EBMLPathAtom between the "\a\" part and "global". So the
within another EBML Element with the same EBMLParentPath as this "global" EBML Element can be found inside the "\a" EBML Element (0
"@path". EBMLPathAtom replacing GlobalPlaceholder) or inside the "\a\b" EBML
Element (one replacement EBMLPathAtom). But it cannot be found
inside the "\a\b\c" EBML Element as the resulting path
"\a\b\c\global" has two EBMLPathAtom between "\a\" and "global".
11.1.5.3. id 11.1.5.3. id
Within an EBML Schema, the XPath of "@id" attribute is "/EBMLSchema/ Within an EBML Schema, the XPath of "@id" attribute is "/EBMLSchema/
element/@id". element/@id".
The Element ID encoded as a Variable Size Integer expressed in The Element ID encoded as a Variable Size Integer expressed in
hexadecimal notation prefixed by a 0x that is read and stored in big- hexadecimal notation prefixed by a 0x that is read and stored in big-
endian order. To reduce the risk of false positives while parsing endian order. To reduce the risk of false positives while parsing
EBML Streams, the Element IDs of the Root Element and Top-Level EBML Streams, the Element IDs of the Root Element and Top-Level
skipping to change at page 29, line 12 skipping to change at page 29, line 36
Within an EBML Schema, the XPath of "@recursive" attribute is Within an EBML Schema, the XPath of "@recursive" attribute is
"/EBMLSchema/element/@recursive". "/EBMLSchema/element/@recursive".
A boolean to express if an EBML Element is permitted to be stored A boolean to express if an EBML Element is permitted to be stored
recursively. In this case the EBML Element MAY be stored within recursively. In this case the EBML Element MAY be stored within
another EBML Element that has the same Element ID. Which itself can another EBML Element that has the same Element ID. Which itself can
be stored in an EBML Element that has the same Element ID, and so on. be stored in an EBML Element that has the same Element ID, and so on.
EBML Elements that are not Master Elements MUST NOT set recursive to EBML Elements that are not Master Elements MUST NOT set recursive to
true. true.
If the path contains an EBMLPathAtomRecursive part then the recursive If the EBMLElement part of the "@path" contains an IsRecursive part
value MUST be true and false otherwise. then the recursive value MUST be true and false otherwise.
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 is
not present then the EBML Element MUST NOT be used recursively. not present then the EBML Element MUST NOT be used recursively.
11.1.5.12. recurring 11.1.5.12. recurring
Within an EBML Schema, the XPath of "@recurring" attribute is Within an EBML Schema, the XPath of "@recurring" attribute is
skipping to change at page 33, line 5 skipping to change at page 33, line 5
11.1.9.2. <implementation_note> Example 11.1.9.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="Item" path="1*1(\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>
</element> </element>
<element name="Item" path="0*(\Items\Item)" id="0x4026" <element name="Item" path="\Items\Item" id="0x4026"
type="master"> type="master">
<documentation lang="en" purpose="definition"> <documentation lang="en" purpose="definition">
An item. An item.
</documentation> </documentation>
</element> </element>
<element name="Cost" path="0*1(\Items\Item\Cost)" id="0x4024" <element name="Cost" path="\Items\Item\Cost" id="0x4024"
type="float" maxOccurs="1"> type="float" maxOccurs="1">
<documentation lang="en" purpose="definition"> <documentation lang="en" purpose="definition">
The cost of the item, if any. The cost of the item, if any.
</documentation> </documentation>
</element> </element>
<element name="Currency" path="0*1(\Items\Item\Currency)" id="0x403F" <element name="Currency" path="\Items\Item\Currency" id="0x403F"
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>
skipping to change at page 35, line 33 skipping to change at page 35, line 33
<xs:element name="EBMLSchema" type="EBMLSchemaType"/> <xs:element name="EBMLSchema" type="EBMLSchemaType"/>
<xs:complexType name="EBMLSchemaType"> <xs:complexType name="EBMLSchemaType">
<xs:sequence> <xs:sequence>
<xs:element name="element" type="elementType" <xs:element name="element" type="elementType"
minOccurs="0" maxOccurs="unbounded"/> minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence> </xs:sequence>
<xs:attribute name="docType" use="required"/> <xs:attribute name="docType" use="required"/>
<xs:attribute name="version" use="required" type="xs:integer"/> <xs:attribute name="version" use="required" type="xs:integer"/>
<xs:attribute name="ebml" type="xs:positiveInteger"
default="1"/>
</xs:complexType> </xs:complexType>
<xs:complexType name="elementType"> <xs:complexType name="elementType">
<xs:sequence> <xs:sequence>
<xs:element name="documentation" type="documentationType" <xs:element name="documentation" type="documentationType"
minOccurs="0" maxOccurs="unbounded"/> minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="implementation_note" type="noteType" <xs:element name="implementation_note" type="noteType"
minOccurs="0" maxOccurs="unbounded"/> minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="restriction" type="restrictionType" <xs:element name="restriction" type="restrictionType"
minOccurs="0" maxOccurs="1"/> minOccurs="0" maxOccurs="1"/>
skipping to change at page 36, line 49 skipping to change at page 36, line 52
<xs:enumeration value="uinteger"/> <xs:enumeration value="uinteger"/>
<xs:enumeration value="float"/> <xs:enumeration value="float"/>
<xs:enumeration value="string"/> <xs:enumeration value="string"/>
<xs:enumeration value="date"/> <xs:enumeration value="date"/>
<xs:enumeration value="utf-8"/> <xs:enumeration value="utf-8"/>
<xs:enumeration value="master"/> <xs:enumeration value="master"/>
<xs:enumeration value="binary"/> <xs:enumeration value="binary"/>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:attribute> </xs:attribute>
<xs:attribute name="unknownsizeallowed" type="xs:boolean"/> <xs:attribute name="unknownsizeallowed" type="xs:boolean"
<xs:attribute name="recurring" type="xs:boolean"/> default="false"/>
<xs:attribute name="recursive" type="xs:boolean"
default="false"/>
<xs:attribute name="recurring" type="xs:boolean"
default="false"/>
<xs:attribute name="minver" default="1"> <xs:attribute name="minver" default="1">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:integer"> <xs:restriction base="xs:integer">
<xs:minInclusive value="0"/> <xs:minInclusive value="0"/>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:attribute> </xs:attribute>
<xs:attribute name="maxver"> <xs:attribute name="maxver">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:integer"> <xs:restriction base="xs:integer">
skipping to change at page 41, line 9 skipping to change at page 41, line 14
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: "1*1(\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: "1*1(\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, so
EBMLVersion SHOULD be 1. EBMLVersion SHOULD be 1.
11.2.3. EBMLReadVersion Element 11.2.3. EBMLReadVersion Element
name: EBMLReadVersion name: EBMLReadVersion
path: "\EBML\EBMLReadVersion"
path: "1*1(\EBML\EBMLReadVersion)"
id: 0x42F7 id: 0x42F7
minOccurs: 1 minOccurs: 1
maxOccurs: 1 maxOccurs: 1
range: 1 range: 1
default: 1 default: 1
type: Unsigned Integer type: Unsigned Integer
description: The minimum EBML version an EBML Reader has to support description: The minimum EBML version an EBML Reader has to support
to read this EBML Document. The EBMLReadVersion Element MUST be less to read this EBML Document. The EBMLReadVersion Element MUST be less
skipping to change at page 42, line 20 skipping to change at page 42, line 26
type: Unsigned Integer type: Unsigned Integer
description: The minimum EBML version an EBML Reader has to support description: The minimum EBML version an EBML Reader has to support
to read this EBML Document. The EBMLReadVersion Element MUST be less to read this EBML Document. The EBMLReadVersion Element MUST be less
than or equal to EBMLVersion. than or equal to EBMLVersion.
11.2.4. EBMLMaxIDLength Element 11.2.4. EBMLMaxIDLength Element
name: EBMLMaxIDLength name: EBMLMaxIDLength
path: "1*1(\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
skipping to change at page 42, line 43 skipping to change at page 42, line 49
description: The EBMLMaxIDLength Element stores the maximum permitted description: The EBMLMaxIDLength Element stores the maximum permitted
length in octets of the Element IDs to be found within the EBML Body. length in octets of the Element IDs to be found within the EBML Body.
An EBMLMaxIDLength Element value of four is RECOMMENDED, though An EBMLMaxIDLength Element value of four is RECOMMENDED, though
larger values are allowed. larger values are allowed.
11.2.5. EBMLMaxSizeLength Element 11.2.5. EBMLMaxSizeLength Element
name: EBMLMaxSizeLength name: EBMLMaxSizeLength
path: "1*1(\EBML\EBMLMaxSizeLength)" path: "\EBML\EBMLMaxSizeLength"
id 0x42F3 id 0x42F3
minOccurs: 1 minOccurs: 1
maxOccurs: 1 maxOccurs: 1
range: not 0 range: not 0
default: 8 default: 8
type: Unsigned Integer type: Unsigned Integer
description: The EBMLMaxSizeLength Element stores the maximum description: The EBMLMaxSizeLength Element stores the maximum
permitted length in octets of the expressions of all Element Data permitted length in octets of the expressions of all Element Data
Sizes to be found within the EBML Body. The EBMLMaxSizeLength Sizes to be found within the EBML Body. The EBMLMaxSizeLength
Element documents an upper bound for the "length" of all Element Data Element documents an upper bound for the "length" of all Element Data
Size expressions within the EBML Body and not an upper bound for the Size expressions within the EBML Body and not an upper bound for the
"value" of all Element Data Size expressions within the EBML Body. "value" of all Element Data Size expressions within the EBML Body.
skipping to change at page 43, line 22 skipping to change at page 43, line 28
Size expressions within the EBML Body and not an upper bound for the Size expressions within the EBML Body and not an upper bound for the
"value" of all Element Data Size expressions within the EBML Body. "value" of all Element Data Size expressions within the EBML Body.
EBML Elements that have an Element Data Size expression which is EBML Elements that have an Element Data Size expression which is
larger in octets than what is expressed by EBMLMaxSizeLength Element larger in octets than what is expressed by EBMLMaxSizeLength Element
are invalid. are invalid.
11.2.6. DocType Element 11.2.6. DocType Element
name: DocType name: DocType
path: "1*1(\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: "1*1(\EBML\DocTypeVersion)" path: "\EBML\DocTypeVersion"
id 0x4287 id 0x4287
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 DocType interpreter used to create the description: The version of DocType interpreter used to create the
EBML Document. EBML Document.
11.2.8. DocTypeReadVersion Element 11.2.8. DocTypeReadVersion Element
name: DocTypeReadVersion name: DocTypeReadVersion
path: "1*1(\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
skipping to change at page 44, line 36 skipping to change at page 44, line 42
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 of
the DocTypeVersion Element. the DocTypeVersion Element.
11.2.9. DocTypeExtension Element 11.2.9. DocTypeExtension Element
name: DocTypeExtension name: DocTypeExtension
path: "0*(\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 are
integrated in a regular DocTypeVersion. Reading one DocTypeExtension integrated in a regular DocTypeVersion. Reading one DocTypeExtension
version of a DocType+DocTypeVersion tuple doesn't imply one should be version of a DocType+DocTypeVersion tuple doesn't imply one should be
able to read upper versions of this DocTypeExtension. able to read upper versions of this DocTypeExtension.
11.2.10. DocTypeExtensionName Element 11.2.10. DocTypeExtensionName Element
name: DocTypeExtensionName name: DocTypeExtensionName
path: "1*1(\EBML\DocTypeExtension\Name)" path: "\EBML\DocTypeExtension\Name"
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 DocTypeExtension of the same DocType+DocTypeVersion tuple.
A DocTypeExtensionName value MUST be unique within the EBML Header. 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: "1*1(\EBML\DocTypeExtension\Version)" path: "\EBML\DocTypeExtension\Version"
id 0x4284 id 0x4284
minOccurs: 1 minOccurs: 1
maxOccurs: 1 maxOccurs: 1
range: not 0 range: not 0
type: Unsigned Integer type: Unsigned Integer
skipping to change at page 46, line 15 skipping to change at page 46, line 15
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 2 Global
Elements that can be found in any EBML Document: the CRC-32 Element Elements that can be found in any EBML Document: the CRC-32 Element
and the Void Element. An EBML Schema MAY add other Global Elements and the Void Element. An EBML Schema MAY add other Global Elements
to the format it defines. These extra elements apply only to the to the format it defines. These extra elements apply only to the
EBML Body, not the EBML Header. EBML Body, not the EBML Header.
Global Elements are EBML Elements whose path have a EBMLGlobalParent Global Elements are EBML Elements whose EBMLLastParent part of the
as their EBMLLastParent. Because it is the last Parent part of the path has a GlobalPlaceholder. Because it is the last Parent part of
path, a Global Element might also have non-EBMLGlobalParent parts in the path, a Global Element might also have an 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 non-EBMLGlobalParent 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((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 stored
except for the CRC-32 Element itself. When the CRC-32 Element is except for the CRC-32 Element itself. When the CRC-32 Element is
present, the CRC-32 Element MUST be the first ordered EBML Element present, the CRC-32 Element MUST be the first ordered EBML Element
within its Parent Element for easier reading. All Top-Level Elements within its Parent Element for easier reading. All Top-Level Elements
of an EBML Document that are Master Elements SHOULD include a CRC-32 of an EBML Document that are Master Elements SHOULD include a CRC-32
Element as a Child Element. The CRC in use is the IEEE-CRC-32 Element as a Child Element. The CRC in use is the IEEE-CRC-32
algorithm as used in the [ISO.3309.1979] standard and in section algorithm as used in the [ISO.3309.1979] standard and in section
8.1.1.6.2 of [ITU.V42.1994], with initial value of 0xFFFFFFFF. The 8.1.1.6.2 of [ITU.V42.1994], with initial value of 0xFFFFFFFF. The
CRC value MUST be computed on a little endian bitstream and MUST use CRC value MUST be computed on a little endian bytestream and MUST use
little endian storage. 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 reserve
space in a sub-element for later use. space in a sub-element for later use.
skipping to change at page 48, line 39 skipping to change at page 48, line 39
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. An EBML Reader MUST consider or UTF-8 Element is NOT RECOMMENDED. The Element Data of a UTF-8
the value of the String Element or UTF-8 Element to be terminated Element MUST be a valid UTF-8 string up to whichever comes first: the
upon the first read Null Octet and MUST ignore any data following the end of the Element or the first occurring Null octet. Within the
first Null Octet within that Element. A string value and a copy of Element Data of a String or UTF-8 Element, any Null octet itself and
that string value terminated by one or more Null Octets are any following data within that Element SHOULD be ignored. A string
semantically equal. value and a copy of that string value terminated by one or more Null
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 |
+---------------------+---------------------+ +---------------------+---------------------+
skipping to change at page 49, line 40 skipping to change at page 49, line 40
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 variable The same value for Element Data Size MAY be written in various
lengths, so for minor reductions in octet length the Element Data 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 Data
Size is less than its maximum permitted length, then the Element Data Size is less than its maximum permitted length, then the Element Data
Size of that Element MAY be rewritten to increase its length by one Size of that Element MAY be rewritten to increase its length by one
octet. Thus before and after the change the EBML Element maintains octet. Thus before and after the change the EBML Element maintains
the same length of 8 octets and data around the Element does not need the same length of 8 octets and data around the Element does not need
skipping to change at page 53, line 19 skipping to change at page 53, line 19
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
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.
skipping to change at page 57, line 29 skipping to change at page 57, line 29
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]
Fallside, D. and P. Walmsley, "XML Schema Part 0: Primer
Second Edition", World Wide Web Consortium Recommendation
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
Specifications: ABNF", STD 68, RFC 5234,
DOI 10.17487/RFC5234, January 2008,
<https://www.rfc-editor.org/info/rfc5234>.
[ITU.V42.1994] [ITU.V42.1994]
International Telecommunications Union, "Error-correcting International Telecommunications Union, "Error-correcting
Procedures for DCEs Using Asynchronous-to-Synchronous Procedures for DCEs Using Asynchronous-to-Synchronous
Conversion", 1994. Conversion", 1994.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[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
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>.
[RFC5646] Phillips, A., Ed. and M. Davis, Ed., "Tags for Identifying
Languages", BCP 47, RFC 5646, DOI 10.17487/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>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[W3C.REC-xml-20081126]
Bray, T., Paoli, J., Sperberg-McQueen, M., Maler, E., and
F. Yergeau, "Extensible Markup Language (XML) 1.0 (Fifth
Edition)", World Wide Web Consortium Recommendation REC-
xml-20081126, 26 November 2008,
<http://www.w3.org/TR/2008/REC-xml-20081126>.
[IEEE.754.1985] [IEEE.754.1985]
Institute of Electrical and Electronics Engineers, Institute of Electrical and Electronics Engineers,
"Standard for Binary Floating-Point Arithmetic", August "Standard for Binary Floating-Point Arithmetic", August
1985. 1985.
[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>.
[RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: [RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet:
Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002, Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002,
<https://www.rfc-editor.org/info/rfc3339>. <https://www.rfc-editor.org/info/rfc3339>.
[W3C.SPSD-xhtml-basic-20180327] [W3C.REC-xml-20081126]
McCarron, S., "XHTML(tm) Basic 1.1 - Second Edition", 27 Bray, T., Paoli, J., Sperberg-McQueen, M., Maler, E., and
March 2018. F. Yergeau, "Extensible Markup Language (XML) 1.0 (Fifth
Edition)", World Wide Web Consortium Recommendation REC-
xml-20081126, 26 November 2008,
<http://www.w3.org/TR/2008/REC-xml-20081126>.
[ISO.3309.1979] [ISO.3309.1979]
International Organization for Standardization, "Data International Organization for Standardization, "Data
communication - High-level data link control procedures - communication - High-level data link control procedures -
Frame structure", 1979. Frame structure", 1979.
[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>.
[W3C.REC-xmlschema-0-20041028]
Fallside, D. and P. Walmsley, "XML Schema Part 0: Primer
Second Edition", World Wide Web Consortium Recommendation
REC-xmlschema-0-20041028, 28 October 2004,
<http://www.w3.org/TR/2004/REC-xmlschema-0-20041028>.
[RFC5646] Phillips, A., Ed. and M. Davis, Ed., "Tags for Identifying
Languages", BCP 47, RFC 5646, DOI 10.17487/RFC5646,
September 2009, <https://www.rfc-editor.org/info/rfc5646>.
[ISO.9899.2011]
International Organization for Standardization,
"Programming languages - C", 2011.
[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>.
19. Informative References 19. Informative References
[Matroska] IETF, "Matroska Specifications", 2019, [Matroska] IETF, "Matroska Specifications", 2019,
<https://datatracker.ietf.org/doc/draft-ietf-cellar- <https://datatracker.ietf.org/doc/draft-ietf-cellar-
matroska/>. matroska/>.
[WebM] The WebM Project, "WebM Container Guidelines", November [WebM] The WebM Project, "WebM Container Guidelines", November
2017, <https://www.webmproject.org/docs/container/>. 2017, <https://www.webmproject.org/docs/container/>.
[W3C.REC-xpath-19991116] [W3C.REC-xpath-19991116]
 End of changes. 73 change blocks. 
192 lines changed or deleted 226 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/