idnits 2.17.1 draft-ietf-cellar-ebml-15.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (16 December 2019) is 1593 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'EBMLParentPath' is mentioned on line 1013, but not defined == Missing Reference: 'PathMinOccurrence' is mentioned on line 1024, but not defined == Missing Reference: 'PathMaxOccurrence' is mentioned on line 1024, but not defined -- Possible downref: Non-RFC (?) normative reference: ref. 'IEEE.754.1985' -- Possible downref: Non-RFC (?) normative reference: ref. 'ITU.V42.1994' Summary: 0 errors (**), 0 flaws (~~), 4 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 cellar S. Lhomme 3 Internet-Draft 4 Intended status: Standards Track D. Rice 5 Expires: 18 June 2020 6 M. Bunkus 7 16 December 2019 9 Extensible Binary Meta Language 10 draft-ietf-cellar-ebml-15 12 Abstract 14 This document defines the Extensible Binary Meta Language (EBML) 15 format as a generalized file format for any type of data in a 16 hierarchical form. EBML is designed as a binary equivalent to XML 17 and uses a storage-efficient approach to build nested Elements with 18 identifiers, lengths, and values. Similar to how an XML Schema 19 defines the structure and semantics of an XML Document, this document 20 defines how EBML Schemas are created to convey the semantics of an 21 EBML Document. 23 Status of This Memo 25 This Internet-Draft is submitted in full conformance with the 26 provisions of BCP 78 and BCP 79. 28 Internet-Drafts are working documents of the Internet Engineering 29 Task Force (IETF). Note that other groups may also distribute 30 working documents as Internet-Drafts. The list of current Internet- 31 Drafts is at https://datatracker.ietf.org/drafts/current/. 33 Internet-Drafts are draft documents valid for a maximum of six months 34 and may be updated, replaced, or obsoleted by other documents at any 35 time. It is inappropriate to use Internet-Drafts as reference 36 material or to cite them other than as "work in progress." 38 This Internet-Draft will expire on 18 June 2020. 40 Copyright Notice 42 Copyright (c) 2019 IETF Trust and the persons identified as the 43 document authors. All rights reserved. 45 This document is subject to BCP 78 and the IETF Trust's Legal 46 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 47 license-info) in effect on the date of publication of this document. 48 Please review these documents carefully, as they describe your rights 49 and restrictions with respect to this document. Code Components 50 extracted from this document must include Simplified BSD License text 51 as described in Section 4.e of the Trust Legal Provisions and are 52 provided without warranty as described in the Simplified BSD License. 54 Table of Contents 56 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 57 2. Notation and Conventions . . . . . . . . . . . . . . . . . . 4 58 3. Structure . . . . . . . . . . . . . . . . . . . . . . . . . . 7 59 4. Variable Size Integer . . . . . . . . . . . . . . . . . . . . 7 60 4.1. VINT_WIDTH . . . . . . . . . . . . . . . . . . . . . . . 7 61 4.2. VINT_MARKER . . . . . . . . . . . . . . . . . . . . . . . 7 62 4.3. VINT_DATA . . . . . . . . . . . . . . . . . . . . . . . . 8 63 4.4. VINT Examples . . . . . . . . . . . . . . . . . . . . . . 8 64 5. Element ID . . . . . . . . . . . . . . . . . . . . . . . . . 9 65 6. Element Data Size . . . . . . . . . . . . . . . . . . . . . . 11 66 6.1. Data Size Format . . . . . . . . . . . . . . . . . . . . 11 67 6.2. Unknown Data Size . . . . . . . . . . . . . . . . . . . . 12 68 6.3. Data Size Values . . . . . . . . . . . . . . . . . . . . 14 69 7. EBML Element Types . . . . . . . . . . . . . . . . . . . . . 15 70 7.1. Signed Integer Element . . . . . . . . . . . . . . . . . 15 71 7.2. Unsigned Integer Element . . . . . . . . . . . . . . . . 16 72 7.3. Float Element . . . . . . . . . . . . . . . . . . . . . . 16 73 7.4. String Element . . . . . . . . . . . . . . . . . . . . . 16 74 7.5. UTF-8 Element . . . . . . . . . . . . . . . . . . . . . . 16 75 7.6. Date Element . . . . . . . . . . . . . . . . . . . . . . 17 76 7.7. Master Element . . . . . . . . . . . . . . . . . . . . . 17 77 7.8. Binary Element . . . . . . . . . . . . . . . . . . . . . 17 78 8. EBML Document . . . . . . . . . . . . . . . . . . . . . . . . 18 79 8.1. EBML Header . . . . . . . . . . . . . . . . . . . . . . . 18 80 8.2. EBML Body . . . . . . . . . . . . . . . . . . . . . . . . 18 81 9. EBML Stream . . . . . . . . . . . . . . . . . . . . . . . . . 18 82 10. EBML Versioning . . . . . . . . . . . . . . . . . . . . . . . 19 83 10.1. EBML Header Version . . . . . . . . . . . . . . . . . . 19 84 10.2. EBML Document Version . . . . . . . . . . . . . . . . . 19 85 11. Elements semantic . . . . . . . . . . . . . . . . . . . . . . 19 86 11.1. EBML Schema . . . . . . . . . . . . . . . . . . . . . . 19 87 11.1.1. EBML Schema Example . . . . . . . . . . . . . . . . 20 88 11.1.2. Element . . . . . . . . . . . . . . . . 21 89 11.1.3. Attributes . . . . . . . . . . . . . . 21 90 11.1.4. Element . . . . . . . . . . . . . . . . . 22 91 11.1.5. Attributes . . . . . . . . . . . . . . . . 22 92 11.1.6. Element . . . . . . . . . . . . . . 29 93 11.1.7. Attributes . . . . . . . . . . . . . 29 94 11.1.8. Element . . . . . . . . . . . 30 95 11.1.9. Attributes . . . . . . . . . . 31 96 11.1.10. Element . . . . . . . . . . . . . . . 32 97 11.1.11. Element . . . . . . . . . . . . . . . . . . . 32 98 11.1.12. Attributes . . . . . . . . . . . . . . . . . 33 99 11.1.13. Element . . . . . . . . . . . . . . . . 33 100 11.1.14. Attributes . . . . . . . . . . . . . . . 33 101 11.1.15. XML Schema for EBML Schema . . . . . . . . . . . . . 34 102 11.1.16. Identically Recurring Elements . . . . . . . . . . . 37 103 11.1.17. Textual expression of floats . . . . . . . . . . . . 38 104 11.1.18. Note on the use of default attributes to define 105 Mandatory EBML Elements . . . . . . . . . . . . . . . 39 106 11.2. EBML Header Elements . . . . . . . . . . . . . . . . . . 39 107 11.2.1. EBML Element . . . . . . . . . . . . . . . . . . . . 40 108 11.2.2. EBMLVersion Element . . . . . . . . . . . . . . . . 40 109 11.2.3. EBMLReadVersion Element . . . . . . . . . . . . . . 40 110 11.2.4. EBMLMaxIDLength Element . . . . . . . . . . . . . . 41 111 11.2.5. EBMLMaxSizeLength Element . . . . . . . . . . . . . 41 112 11.2.6. DocType Element . . . . . . . . . . . . . . . . . . 42 113 11.2.7. DocTypeVersion Element . . . . . . . . . . . . . . . 42 114 11.2.8. DocTypeReadVersion Element . . . . . . . . . . . . . 43 115 11.2.9. DocTypeExtension Element . . . . . . . . . . . . . . 43 116 11.2.10. DocTypeExtensionName Element . . . . . . . . . . . . 44 117 11.2.11. DocTypeExtensionVersion Element . . . . . . . . . . 44 118 11.3. Global Elements . . . . . . . . . . . . . . . . . . . . 45 119 11.3.1. CRC-32 Element . . . . . . . . . . . . . . . . . . . 45 120 11.3.2. Void Element . . . . . . . . . . . . . . . . . . . . 46 121 12. Considerations for Reading EBML Data . . . . . . . . . . . . 46 122 13. Terminating Elements . . . . . . . . . . . . . . . . . . . . 47 123 14. Guidelines for Updating Elements . . . . . . . . . . . . . . 48 124 14.1. Reducing a Element Data in Size . . . . . . . . . . . . 48 125 14.1.1. Adding a Void Element . . . . . . . . . . . . . . . 48 126 14.1.2. Extending the Element Data Size . . . . . . . . . . 48 127 14.1.3. Terminating Element Data . . . . . . . . . . . . . . 49 128 14.2. Considerations when Updating Elements with Cyclic 129 Redundancy Check (CRC) . . . . . . . . . . . . . . . . . 50 130 15. Backward and Forward Compatibility . . . . . . . . . . . . . 50 131 15.1. Backward Compatibility . . . . . . . . . . . . . . . . . 50 132 15.2. Forward Compatibility . . . . . . . . . . . . . . . . . 51 133 16. Security Considerations . . . . . . . . . . . . . . . . . . . 51 134 17. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 52 135 17.1. CELLAR EBML Element ID Registry . . . . . . . . . . . . 52 136 17.2. CELLAR EBML DocType Registry . . . . . . . . . . . . . . 56 137 18. Normative References . . . . . . . . . . . . . . . . . . . . 56 138 19. Informative References . . . . . . . . . . . . . . . . . . . 58 139 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 58 141 1. Introduction 143 EBML, short for Extensible Binary Meta Language, specifies a binary 144 and octet (byte) aligned format inspired by the principle of XML (a 145 framework for structuring data). 147 The goal of this document is to define a generic, binary, space- 148 efficient format that can be used to define more complex formats 149 using an EBML Schema. EBML is used by the multimedia container, 150 Matroska [Matroska]. The applicability of EBML for other use cases 151 is beyond the scope of this document. 153 The definition of the EBML format recognizes the idea behind HTML and 154 XML as a good one: separate structure and semantics allowing the same 155 structural layer to be used with multiple, possibly widely differing 156 semantic layers. Except for the EBML Header and a few Global 157 Elements this specification does not define particular EBML format 158 semantics; however this specification is intended to define how other 159 EBML-based formats can be defined, such as the audio-video container 160 formats Matroska and WebM [WebM]. 162 EBML uses a simple approach of building Elements upon three pieces of 163 data (tag, length, and value) as this approach is well known, easy to 164 parse, and allows selective data parsing. The EBML structure 165 additionally allows for hierarchical arrangement to support complex 166 structural formats in an efficient manner. 168 A typical EBML file has the following structure: 170 EBML Header (master) 171 + DocType (string) 172 + DocTypeVersion (unsigned integer) 173 EBML Body Root (master) 174 + ElementA (utf-8) 175 + Parent (master) 176 + ElementB (integer) 177 + Parent (master) 178 + ElementB (integer) 180 2. Notation and Conventions 182 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 183 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 184 "OPTIONAL" in this document are to be interpreted as described in BCP 185 14 [RFC2119] [RFC8174] when, and only when, they appear in all 186 capitals, as shown here. 188 This document defines specific terms in order to define the format 189 and application of "EBML". Specific terms are defined below: 191 "EBML": Extensible Binary Meta Language 193 "EBML Document Type": A name provided by an "EBML Schema" to 194 designate a particular implementation of "EBML" for a data format 195 (e.g.: matroska and webm). 197 "EBML Schema": A standardized definition for the structure of an 198 "EBML Document Type". 200 "EBML Document": A datastream comprised of only two components, an 201 "EBML Header" and an "EBML Body". 203 "EBML Reader": A data parser that interprets the semantics of an 204 "EBML Document" and creates a way for programs to use "EBML". 206 "EBML Stream": A file that consists of one or more "EBML Documents" 207 that are concatenated together. 209 "EBML Header": A declaration that provides processing instructions 210 and identification of the "EBML Body". The "EBML Header" is 211 analogous to an XML Declaration [W3C.REC-xml-20081126] (see section 212 2.8 on Prolog and Document Type Declaration). 214 "EBML Body": All data of an "EBML Document" following the "EBML 215 Header". 217 "Variable Size Integer": A compact variable-length binary value which 218 defines its own length. 220 "VINT": Also known as "Variable Size Integer". 222 "EBML Element": A foundation block of data that contains three parts: 223 an "Element ID", an "Element Data Size", and "Element Data". 225 "Element ID": The "Element ID" is a binary value, encoded as a 226 "Variable Size Integer", used to uniquely identify a defined "EBML 227 Element" within a specific "EBML Schema". 229 "Element Data Size": An expression, encoded as a "Variable Size 230 Integer", of the length in octets of "Element Data". 232 "VINTMAX": The maximum possible value that can be stored as "Element 233 Data Size". 235 "Unknown-Sized Element": An "Element" with an unknown "Element Data 236 Size". 238 "Element Data": The value(s) of the "EBML Element" which is 239 identified by its "Element ID" and "Element Data Size". The form of 240 the "Element Data" is defined by this document and the corresponding 241 "EBML Schema" of the Element's "EBML Document Type". 243 "Root Level": The starting level in the hierarchy of an "EBML 244 Document". 246 "Root Element": A mandatory, non-repeating "EBML Element" which 247 occurs at the top level of the path hierarchy within an "EBML Body" 248 and contains all other "EBML Elements" of the "EBML Body", excepting 249 optional "Void Elements". 251 "Top-Level Element": An "EBML Element" defined to only occur as a 252 "Child Element" of the "Root Element". 254 "Master Element": The "Master Element" contains zero, one, or many 255 other "EBML Elements". 257 "Child Element": A "Child Element" is a relative term to describe the 258 "EBML Elements" immediately contained within a "Master Element". 260 "Parent Element": A relative term to describe the "Master Element" 261 which contains a specified element. For any specified "EBML Element" 262 that is not at "Root Level", the "Parent Element" refers to the 263 "Master Element" in which that "EBML Element" is contained. 265 "Descendant Element": A relative term to describe any "EBML Elements" 266 contained within a "Master Element", including any of the "Child 267 Elements" of its "Child Elements", and so on. 269 "Void Element": A "Void Element" is an "Element" used to overwrite 270 data or reserve space within a "Master Element" for later use. 272 "Element Name": The human-readable name of the "EBML Element". 274 "Element Path": The hierarchy of "Parent Element" where the "EBML 275 Element" is expected to be found in the "EBML Body". 277 "Empty Element": An "EBML Element" that has an "Element Data Size" 278 with all "VINT_DATA" bits set to zero, which indicates that the 279 "Element Data" of the "Element" is zero octets in length. 281 3. Structure 283 EBML uses a system of Elements to compose an EBML Document. EBML 284 Elements incorporate three parts: an Element ID, an Element Data 285 Size, and Element Data. The Element Data, which is described by the 286 Element ID, includes either binary data, one or more other EBML 287 Elements, or both. 289 4. Variable Size Integer 291 The Element ID and Element Data Size are both encoded as a Variable 292 Size Integer. The Variable Size Integer is composed of a VINT_WIDTH, 293 VINT_MARKER, and VINT_DATA, in that order. Variable Size Integers 294 MUST left-pad the VINT_DATA value with zero bits so that the whole 295 Variable Size Integer is octet-aligned. Variable Size Integer will 296 be referred to as VINT for shorthand. 298 4.1. VINT_WIDTH 300 Each Variable Size Integer begins with a VINT_WIDTH which consists of 301 zero or many zero-value bits. The count of consecutive zero-values 302 of the VINT_WIDTH plus one equals the length in octets of the 303 Variable Size Integer. For example, a Variable Size Integer that 304 starts with a VINT_WIDTH which contains zero consecutive zero-value 305 bits is one octet in length and a Variable Size Integer that starts 306 with one consecutive zero-value bit is two octets in length. The 307 VINT_WIDTH MUST only contain zero-value bits or be empty. 309 Within the EBML Header the VINT_WIDTH of a VINT MUST NOT exceed three 310 bits in length (meaning that the Variable Size Integer MUST NOT 311 exceed four octets in length) except if said VINT is used to express 312 the Element Data Size of an EBML Element with Element Name EBML and 313 Element ID "0x1A45DFA3" (see Section 11.2.1) in which case the 314 VINT_WIDTH MUST NOT exceed seven bits in length. Within the EBML 315 Body, when a VINT is used to express an Element ID, the maximum 316 length allowed for the VINT_WIDTH is one less than the value set in 317 the EBMLMaxIDLength Element. Within the EBML Body, when a VINT is 318 used to express an Element Data Size, the maximum length allowed for 319 the VINT_WIDTH is one less than the value set in the 320 EBMLMaxSizeLength Element. 322 4.2. VINT_MARKER 324 The VINT_MARKER serves as a separator between the VINT_WIDTH and 325 VINT_DATA. Each Variable Size Integer MUST contain exactly one 326 VINT_MARKER. The VINT_MARKER is one bit in length and contain a bit 327 with a value of one. The first bit with a value of one within the 328 Variable Size Integer is the VINT_MARKER. 330 4.3. VINT_DATA 332 The VINT_DATA portion of the Variable Size Integer includes all data 333 that follows (but not including) the VINT_MARKER until end of the 334 Variable Size Integer whose length is derived from the VINT_WIDTH. 335 The bits required for the VINT_WIDTH and the VINT_MARKER use one out 336 of every eight bits of the total length of the Variable Size Integer. 337 Thus a Variable Size Integer of 1 octet length supplies 7 bits for 338 VINT_DATA, a 2 octet length supplies 14 bits for VINT_DATA, and a 3 339 octet length supplies 21 bits for VINT_DATA. If the number of bits 340 required for VINT_DATA are less than the bit size of VINT_DATA, then 341 VINT_DATA MUST be zero-padded to the left to a size that fits. The 342 VINT_DATA value MUST be expressed as a big-endian unsigned integer. 344 4.4. VINT Examples 346 Table 1 shows examples of Variable Size Integers with lengths from 1 347 to 5 octets. The Usable Bits column refers to the number of bits 348 that can be used in the VINT_DATA. The Representation column depicts 349 a binary expression of Variable Size Integers where VINT_WIDTH is 350 depicted by "0", the VINT_MARKER as "1", and the VINT_DATA as "x". 352 +--------------+-------------+-------------------------------+ 353 | Octet Length | Usable Bits | Representation | 354 +==============+=============+===============================+ 355 | 1 | 7 | 1xxx xxxx | 356 +--------------+-------------+-------------------------------+ 357 | 2 | 14 | 01xx xxxx xxxx xxxx | 358 +--------------+-------------+-------------------------------+ 359 | 3 | 21 | 001x xxxx xxxx xxxx xxxx xxxx | 360 +--------------+-------------+-------------------------------+ 361 | 4 | 28 | 0001 xxxx xxxx xxxx xxxx xxxx | 362 | | | xxxx xxxx | 363 +--------------+-------------+-------------------------------+ 364 | 5 | 35 | 0000 1xxx xxxx xxxx xxxx xxxx | 365 | | | xxxx xxxx xxxx xxxx | 366 +--------------+-------------+-------------------------------+ 368 Table 1: VINT examples depicting usable bits 370 Data encoded as a Variable Size Integer may be rendered at octet 371 lengths larger than needed to store the data in order to facilitate 372 overwriting it at a later date, e.g. when its final size isn't known 373 in advance. In Table 2 a binary value of 0b10 is shown encoded as 374 different Variable Size Integers with lengths from one octet to four 375 octets. All four encoded examples have identical semantic meaning 376 though the VINT_WIDTH and the padding of the VINT_DATA vary. 378 +--------------+--------------+-----------------------+ 379 | Binary Value | Octet Length | As Represented in | 380 | | | Variable Size Integer | 381 +==============+==============+=======================+ 382 | 10 | 1 | 1000 0010 | 383 +--------------+--------------+-----------------------+ 384 | 10 | 2 | 0100 0000 0000 0010 | 385 +--------------+--------------+-----------------------+ 386 | 10 | 3 | 0010 0000 0000 0000 | 387 | | | 0000 0010 | 388 +--------------+--------------+-----------------------+ 389 | 10 | 4 | 0001 0000 0000 0000 | 390 | | | 0000 0000 0000 0010 | 391 +--------------+--------------+-----------------------+ 393 Table 2: VINT examples depicting the same integer 394 value rendered at different VINT sizes 396 5. Element ID 398 The Element ID is encoded as a Variable Size Integer. By default, 399 Element IDs are encoded in lengths from one octet to four octets, 400 although Element IDs of greater lengths MAY be used if the 401 EBMLMaxIDLength Element of the EBML Header is set to a value greater 402 than four (see Section 11.2.4). The VINT_DATA component of the 403 Element ID MUST NOT be either defined or written as either all zero 404 values or all one values. Any Element ID with the VINT_DATA 405 component set as all zero values or all one values MUST be ignored. 406 The VINT_DATA component of the Element ID MUST be encoded at the 407 shortest valid length. For example, an Element ID with binary 408 encoding of "1011 1111" is valid, whereas an Element ID with binary 409 encoding of "0100 0000 0011 1111" stores a semantically equal 410 VINT_DATA but is invalid because a shorter VINT encoding is possible. 411 Additionally, an Element ID with binary encoding of "1111 1111" is 412 invalid since the VINT_DATA section is set to all one values, whereas 413 an Element ID with binary encoding of "0100 0000 0111 1111" stores a 414 semantically equal VINT_DATA and is the shortest possible VINT 415 encoding. 417 Table 3 details these specific examples further: 419 +------------+-------------+----------------+--------------------+ 420 | VINT_WIDTH | VINT_MARKER | VINT_DATA | Element ID Status | 421 +============+=============+================+====================+ 422 | | 1 | 0000000 | Invalid: VINT_DATA | 423 | | | | MUST NOT be set to | 424 | | | | all 0 | 425 +------------+-------------+----------------+--------------------+ 426 | 0 | 1 | 00000000000000 | Invalid: VINT_DATA | 427 | | | | MUST NOT be set to | 428 | | | | all 0 | 429 +------------+-------------+----------------+--------------------+ 430 | | 1 | 0000001 | Valid | 431 +------------+-------------+----------------+--------------------+ 432 | 0 | 1 | 00000000000001 | Invalid: A shorter | 433 | | | | VINT_DATA encoding | 434 | | | | is available. | 435 +------------+-------------+----------------+--------------------+ 436 | | 1 | 0111111 | Valid | 437 +------------+-------------+----------------+--------------------+ 438 | 0 | 1 | 00000000111111 | Invalid: A shorter | 439 | | | | VINT_DATA encoding | 440 | | | | is available. | 441 +------------+-------------+----------------+--------------------+ 442 | | 1 | 1111111 | Invalid: VINT_DATA | 443 | | | | MUST NOT be set to | 444 | | | | all 1 | 445 +------------+-------------+----------------+--------------------+ 446 | 0 | 1 | 00000001111111 | Valid | 447 +------------+-------------+----------------+--------------------+ 449 Table 3: Examples of valid and invalid VINTs 451 The range and count of VINT_DATA values is determined by the octet 452 length of the VINT. Examples of this are provided in Table 4. 454 +-----------------------+-------------------------+---------------+ 455 | VINT Length in octets | Range of Possible IDs | Number of IDs | 456 +=======================+=========================+===============+ 457 | 1 | 0x81 - 0xFE | 126 | 458 +-----------------------+-------------------------+---------------+ 459 | 2 | 0x407F - 0x7FFE | 16,256 | 460 +-----------------------+-------------------------+---------------+ 461 | 3 | 0x203FFF - 0x3FFFFE | 2,080,768 | 462 +-----------------------+-------------------------+---------------+ 463 | 4 | 0x101FFFFF - 0x1FFFFFFE | 268,338,304 | 464 +-----------------------+-------------------------+---------------+ 466 Table 4: Examples of count and range for VINT_DATA per VINT 467 length in octets 469 6. Element Data Size 471 6.1. Data Size Format 473 The Element Data Size expresses the length in octets of Element Data. 474 The Element Data Size itself is encoded as a Variable Size Integer. 475 By default, Element Data Sizes can be encoded in lengths from one 476 octet to eight octets, although Element Data Sizes of greater lengths 477 MAY be used if the octet length of the longest Element Data Size of 478 the EBML Document is declared in the EBMLMaxSizeLength Element of the 479 EBML Header (see Section 11.2.5). Unlike the VINT_DATA of the 480 Element ID, the VINT_DATA component of the Element Data Size is not 481 mandated to be encoded at the shortest valid length. For example, an 482 Element Data Size with binary encoding of 1011 1111 or a binary 483 encoding of 0100 0000 0011 1111 are both valid Element Data Sizes and 484 both store a semantically equal value (both 0b00000000111111 and 485 0b0111111, the VINT_DATA sections of the examples, represent the 486 integer 63). 488 Although an Element ID with all VINT_DATA bits set to zero is 489 invalid, an Element Data Size with all VINT_DATA bits set to zero is 490 allowed for EBML Element Types which do not mandate a non-zero length 491 (see Section 7). An Element Data Size with all VINT_DATA bits set to 492 zero indicates that the Element Data is zero octets in length. Such 493 an EBML Element is referred to as an Empty Element. If an Empty 494 Element has a default value declared then the EBML Reader MUST 495 interpret the value of the Empty Element as the default value. If an 496 Empty Element has no default value declared then the EBML Reader MUST 497 use the value of the Empty Element for the corresponding EBML Element 498 Type of the Element ID, 0 for numbers and an empty string for 499 strings. 501 6.2. Unknown Data Size 503 An Element Data Size with all VINT_DATA bits set to one is reserved 504 as an indicator that the size of the EBML Element is unknown. The 505 only reserved value for the VINT_DATA of Element Data Size is all 506 bits set to one. An EBML Element with an unknown Element Data Size 507 is referred to as an Unknown-Sized Element. A Master Element MAY be 508 an Unknown-Sized Element; however an EBML Element that is not a 509 Master Element MUST NOT be an Unknown-Sized Element. Master Elements 510 MUST NOT use an unknown size unless the unknownsizeallowed attribute 511 of their EBML Schema is set to true (see Section 11.1.5.10). 513 The use of Unknown-Sized Elements allows for an EBML Element to be 514 written and read before the size of the EBML Element is known. 515 Unknown-Sized Elements MUST only be used if the Element Data Size is 516 not known before the Element Data is written, such as in some cases 517 of data streaming. The end of an Unknown-Sized Element is determined 518 by whichever comes first: 520 * Any EBML Element that is a valid Parent Element of the Unknown- 521 Sized Element according to the EBML Schema, Global Elements 522 excluded. 524 * Any valid EBML Element according to the EBML Schema, Global 525 Elements excluded, that is not a Descendant Element of the 526 Unknown-Sized Element but share a common direct parent, such as a 527 Top-Level Element. 529 * Any EBML Element that is a valid Root Element according to the 530 EBML Schema, Global Elements excluded. 532 * The end of the Parent Element with a known size has been reached. 534 * The end of the EBML Document, either when reaching the end of the 535 file or because a new EBML Header started. 537 Consider an Unknown-Sized Element which EBML path is 538 "\root\level1\level2\elt". When reading a new Element ID, assuming 539 the EBML Path of that new Element is valid, here are some possible 540 and impossible ways that this new Element is ending "elt": 542 +------------------------------------+----------------------------+ 543 | EBML Path of new element | Status | 544 +====================================+============================+ 545 | "\root\level1\level2" | Ends the Unknown-Sized | 546 | | Element, as it is a new | 547 | | Parent Element | 548 +------------------------------------+----------------------------+ 549 | "\root\level1" | Ends the Unknown-Sized | 550 | | Element, as it is a new | 551 | | Parent Element | 552 +------------------------------------+----------------------------+ 553 | "\root" | Ends the Unknown-Sized | 554 | | Element, as it is a new | 555 | | Root Element | 556 +------------------------------------+----------------------------+ 557 | "\root2" | Ends the Unknown-Sized | 558 | | Element, as it is a new | 559 | | Root Element | 560 +------------------------------------+----------------------------+ 561 | "\root\level1\level2\other" | Ends the Unknown-Sized | 562 | | Element, as they share the | 563 | | same parent | 564 +------------------------------------+----------------------------+ 565 | "\root\level1\level2\elt" | Ends the Unknown-Sized | 566 | | Element, as they share the | 567 | | same parent | 568 +------------------------------------+----------------------------+ 569 | "\root\level1\level2\elt\inside" | Doesn't end the Unknown- | 570 | | Sized Element, it's a | 571 | | child of "elt" | 572 +------------------------------------+----------------------------+ 573 | "\root\level1\level2\elt\" | Global Element is valid, | 574 | | it's a child of "elt" | 575 +------------------------------------+----------------------------+ 576 | "\root\level1\level2\" | Global Element cannot be | 577 | | assumed to have this path, | 578 | | while parsing "elt" it can | 579 | | only be a child of "elt" | 580 +------------------------------------+----------------------------+ 582 Table 5: Examples of determining the end of an Unknown-Sized 583 Element 585 6.3. Data Size Values 587 For Element Data Sizes encoded at octet lengths from one to eight, 588 Table 6 depicts the range of possible values that can be encoded as 589 an Element Data Size. An Element Data Size with an octet length of 8 590 is able to express a size of 2^56-2 or 72,057,594,037,927,934 octets 591 (or about 72 petabytes). The maximum possible value that can be 592 stored as Element Data Size is referred to as VINTMAX. 594 +--------------+----------------------+ 595 | Octet Length | Possible Value Range | 596 +==============+======================+ 597 | 1 | 0 to 2^(7-2) | 598 +--------------+----------------------+ 599 | 2 | 0 to 2^(14-2) | 600 +--------------+----------------------+ 601 | 3 | 0 to 2^(21-2) | 602 +--------------+----------------------+ 603 | 4 | 0 to 2^(28-2) | 604 +--------------+----------------------+ 605 | 5 | 0 to 2^(35-2) | 606 +--------------+----------------------+ 607 | 6 | 0 to 2^(42-2) | 608 +--------------+----------------------+ 609 | 7 | 0 to 2^(49-2) | 610 +--------------+----------------------+ 611 | 8 | 0 to 2^(56-2) | 612 +--------------+----------------------+ 614 Table 6: Possible range of values 615 that can be stored in VINTs by 616 octet length. 618 If the length of Element Data equals 2^(n*7)-1 then the octet length 619 of the Element Data Size MUST be at least n+1. This rule prevents an 620 Element Data Size from being expressed as the unknown size value. 621 Table 7 clarifies this rule by showing a valid and invalid expression 622 of an Element Data Size with a VINT_DATA of 127 (which is equal to 623 2^(1*7)-1) and 16,383 (which is equal to 2^((2*7)-1).) 624 +------------+-------------+-----------------------+--------------+ 625 | VINT_WIDTH | VINT_MARKER | VINT_DATA | Element Data | 626 | | | | Size Status | 627 +============+=============+=======================+==============+ 628 | | 1 | 1111111 | Reserved | 629 | | | | (meaning | 630 | | | | Unknown) | 631 +------------+-------------+-----------------------+--------------+ 632 | 0 | 1 | 00000001111111 | Valid | 633 | | | | (meaning 127 | 634 | | | | octets) | 635 +------------+-------------+-----------------------+--------------+ 636 | 00 | 1 | 000000000000001111111 | Valid | 637 | | | | (meaning 127 | 638 | | | | octets) | 639 +------------+-------------+-----------------------+--------------+ 640 | 0 | 1 | 11111111111111 | Reserved | 641 | | | | (meaning | 642 | | | | Unknown) | 643 +------------+-------------+-----------------------+--------------+ 644 | 00 | 1 | 000000011111111111111 | Valid | 645 | | | | (16,383 | 646 | | | | octets) | 647 +------------+-------------+-----------------------+--------------+ 649 Table 7: Demonstration of VINT_DATA reservation for VINTs of 650 unknown size. 652 7. EBML Element Types 654 EBML Elements are defined by an EBML Schema (see Section 11.1) which 655 MUST declare one of the following EBML Element Types for each EBML 656 Element. An EBML Element Type defines a concept of storing data 657 within an EBML Element that describes such characteristics as length, 658 endianness, and definition. 660 EBML Elements which are defined as a Signed Integer Element, Unsigned 661 Integer Element, Float Element, or Date Element use big endian 662 storage. 664 7.1. Signed Integer Element 666 A Signed Integer Element MUST declare a length from zero to eight 667 octets. If the EBML Element is not defined to have a default value, 668 then a Signed Integer Element with a zero-octet length represents an 669 integer value of zero. 671 A Signed Integer Element stores an integer (meaning that it can be 672 written without a fractional component) which could be negative, 673 positive, or zero. Signed Integers are stored with two's complement 674 notation with the leftmost bit being the sign bit. Because EBML 675 limits Signed Integers to 8 octets in length a Signed Integer Element 676 stores a number from -9,223,372,036,854,775,808 to 677 +9,223,372,036,854,775,807. 679 7.2. Unsigned Integer Element 681 An Unsigned Integer Element MUST declare a length from zero to eight 682 octets. If the EBML Element is not defined to have a default value, 683 then an Unsigned Integer Element with a zero-octet length represents 684 an integer value of zero. 686 An Unsigned Integer Element stores an integer (meaning that it can be 687 written without a fractional component) which could be positive or 688 zero. Because EBML limits Unsigned Integers to 8 octets in length an 689 Unsigned Integer Element stores a number from 0 to 690 18,446,744,073,709,551,615. 692 7.3. Float Element 694 A Float Element MUST declare a length of either zero octet (0 bit), 695 four octets (32 bit) or eight octets (64 bit). If the EBML Element 696 is not defined to have a default value, then a Float Element with a 697 zero-octet length represents a numerical value of zero. 699 A Float Element stores a floating-point number as defined in 700 [IEEE.754.1985]. 702 7.4. String Element 704 A String Element MUST declare a length in octets from zero to 705 VINTMAX. If the EBML Element is not defined to have a default value, 706 then a String Element with a zero-octet length represents an empty 707 string. 709 A String Element MUST either be empty (zero-length) or contain 710 printable ASCII characters [RFC0020] in the range of 0x20 to 0x7E, 711 with an exception made for termination (see Section 13). 713 7.5. UTF-8 Element 715 A UTF-8 Element MUST declare a length in octets from zero to VINTMAX. 716 If the EBML Element is not defined to have a default value, then a 717 UTF-8 Element with a zero-octet length represents an empty string. 719 A UTF-8 Element contains only a valid Unicode string as defined in 720 [RFC3629], with an exception made for termination (see Section 13). 722 7.6. Date Element 724 A Date Element MUST declare a length of either zero octets or eight 725 octets. If the EBML Element is not defined to have a default value, 726 then a Date Element with a zero-octet length represents a timestamp 727 of 2001-01-01T00:00:00.000000000 UTC [RFC3339]. 729 The Date Element stores an integer in the same format as the Signed 730 Integer Element that expresses a point in time referenced in 731 nanoseconds from the precise beginning of the third millennium of the 732 Gregorian Calendar in Coordinated Universal Time (also known as 733 2001-01-01T00:00:00.000000000 UTC). This provides a possible 734 expression of time from 1708-09-11T00:12:44.854775808 UTC to 735 2293-04-11T11:47:16.854775807 UTC. 737 7.7. Master Element 739 A Master Element MUST declare a length in octets from zero to 740 VINTMAX. The Master Element MAY also use an unknown length. See 741 Section 6 for rules that apply to elements of unknown length. 743 The Master Element contains zero, one, or many other elements. EBML 744 Elements contained within a Master Element MUST have the 745 EBMLParentPath of their Element Path equal to the EBMLFullPath of the 746 Master Element Element Path (see Section 11.1.5.2). Element Data 747 stored within Master Elements SHOULD only consist of EBML Elements 748 and SHOULD NOT contain any data that is not part of an EBML Element. 749 The EBML Schema identifies what Element IDs are valid within the 750 Master Elements for that version of the EBML Document Type. Any data 751 contained within a Master Element that is not part of a Child Element 752 MUST be ignored. 754 7.8. Binary Element 756 A Binary Element MUST declare a length in octets from zero to 757 VINTMAX. 759 The contents of a Binary Element should not be interpreted by the 760 EBML Reader. 762 8. EBML Document 764 An EBML Document is comprised of only two components, an EBML Header 765 and an EBML Body. An EBML Document MUST start with an EBML Header 766 that declares significant characteristics of the entire EBML Body. 767 An EBML Document consists of EBML Elements and MUST NOT contain any 768 data that is not part of an EBML Element. 770 8.1. EBML Header 772 The EBML Header is a declaration that provides processing 773 instructions and identification of the EBML Body. The EBML Header of 774 an EBML Document is analogous to the XML Declaration of an XML 775 Document. 777 The EBML Header documents the EBML Schema (also known as the EBML 778 DocType) that is used to semantically interpret the structure and 779 meaning of the EBML Document. Additionally the EBML Header documents 780 the versions of both EBML and the EBML Schema that were used to write 781 the EBML Document and the versions required to read the EBML 782 Document. 784 The EBML Header MUST contain a single Master Element with an Element 785 Name of EBML and Element ID of 0x1A45DFA3 (see Section 11.2.1) and 786 any number of additional EBML Elements within it. The EBML Header of 787 an EBML Document that uses an EBMLVersion of 1 MUST only contain EBML 788 Elements that are defined as part of this document. 790 8.2. EBML Body 792 All data of an EBML Document following the EBML Header is the EBML 793 Body. The end of the EBML Body, as well as the end of the EBML 794 Document that contains the EBML Body, is reached at whichever comes 795 first: the beginning of a new EBML Header at the Root Level or the 796 end of the file. The EBML Body MUST NOT contain any data that is not 797 part of an EBML Element. This document defines precisely which EBML 798 Elements are to be used within the EBML Header, but does not name or 799 define which EBML Elements are to be used within the EBML Body. The 800 definition of which EBML Elements are to be used within the EBML Body 801 is defined by an EBML Schema. 803 9. EBML Stream 805 An EBML Stream is a file that consists of one or more EBML Documents 806 that are concatenated together. An occurrence of a EBML Header at 807 the Root Level marks the beginning of an EBML Document. 809 10. EBML Versioning 811 An EBML Document handles 2 different versions: the version of the 812 EBML Header and the version of the EBML Body. Both versions are 813 meant to be backward compatible. 815 10.1. EBML Header Version 817 The version of the EBML Header is found in EBMLVersion. An EBML 818 parser can read an EBML Header if it can read either the EBMLVersion 819 version or a version equal or higher than the one found in 820 EBMLReadVersion. 822 10.2. EBML Document Version 824 The version of the EBML Body is found in EBMLDocTypeVersion. A 825 parser for the particular DocType format can read the EBML Document 826 if it can read either the EBMLDocTypeVersion version of that format 827 or a version equal or higher than the one found in 828 EBMLDocTypeReadVersion. 830 11. Elements semantic 832 11.1. EBML Schema 834 An EBML Schema is a well-formed XML Document [W3C.REC-xml-20081126] 835 that defines the properties, arrangement, and usage of EBML Elements 836 that compose a specific EBML Document Type. The relationship of an 837 EBML Schema to an EBML Document is analogous to the relationship of 838 an XML Schema [W3C.REC-xmlschema-0-20041028] to an XML Document 839 [W3C.REC-xml-20081126]. An EBML Schema MUST be clearly associated 840 with one or more EBML Document Types. An EBML Document Type is 841 identified by a string stored within the EBML Header in the DocType 842 Element; for example matroska or webm (see Section 11.2.6). The 843 DocType value for an EBML Document Type MUST be unique and 844 persistent. 846 An EBML Schema MUST declare exactly one EBML Element at Root Level 847 (referred to as the Root Element) that occurs exactly once within an 848 EBML Document. The Void Element MAY also occur at Root Level but is 849 not a Root Element (see Section 11.3.2). 851 The EBML Schema MUST document all Elements of the EBML Body. The 852 EBML Schema does not document Global Elements that are defined by 853 this document (namely the Void Element and the CRC-32 Element). 855 The EBML Schema MUST NOT use the Element ID "0x1A45DFA3" which is 856 reserved for the EBML Header for resynchronization purpose. 858 An EBML Schema MAY constrain the use of EBML Header Elements (see 859 Section 11.2) by adding or constraining that Element's "range" 860 attribute. For example, an EBML Schema MAY constrain the 861 EBMLMaxSizeLength to a maximum value of "8" or MAY constrain the 862 EBMLVersion to only support a value of "1". If an EBML Schema adopts 863 the EBML Header Element as-is, then it is not required to document 864 that Element within the EBML Schema. If an EBML Schema constrains 865 the range of an EBML Header Element, then that Element MUST be 866 documented within an "" node of the EBML Schema. This 867 document provides an example of an EBML Schema, see Section 11.1.1. 869 11.1.1. EBML Schema Example 871 872 874 875 878 881 882 884 Container of data and 885 attributes representing one or many files. 886 887 889 890 An attached file. 891 892 893 896 897 Filename of the attached file. 898 899 900 903 904 MIME type of the file. 905 907 908 911 912 Modification timestamp of the file. 913 914 915 917 918 The data of the file. 919 920 921 923 11.1.2. Element 925 Within an EBML Schema, the XPath [W3C.REC-xpath-19991116] of 926 "" element is "/EBMLSchema". 928 As an XML Document, the EBML Schema MUST use "" as the 929 top level element. The "" element can contain 930 "" sub-elements. 932 11.1.3. Attributes 934 Within an EBML Schema the "" element uses the following 935 attributes: 937 11.1.3.1. docType 939 Within an EBML Schema, the XPath of "@docType" attribute is 940 "/EBMLSchema/@docType". 942 The docType lists the official name of the EBML Document Type that is 943 defined by the EBML Schema; for example, "". 946 The docType attribute is REQUIRED within the "" Element. 948 11.1.3.2. version 950 Within an EBML Schema, the XPath of "@version" attribute is 951 "/EBMLSchema/@version". 953 The version lists a non-negative integer that specifies the version 954 of the docType documented by the EBML Schema. Unlike XML Schemas, an 955 EBML Schema documents all versions of a docType's definition rather 956 than using separate EBML Schemas for each version of a docType. EBML 957 Elements may be introduced and deprecated by using the minver and 958 maxver attributes of "". 960 The version attribute is REQUIRED within the "" Element. 962 11.1.4. Element 964 Within an EBML Schema, the XPath of "" element is 965 "/EBMLSchema/element". 967 Each "" defines one EBML Element through the use of several 968 attributes that are defined in Section 11.1.3. EBML Schemas MAY 969 contain additional attributes to extend the semantics but MUST NOT 970 conflict with the definitions of the "" attributes defined 971 within this document. 973 The "" nodes contain a description of the meaning and use of 974 the EBML Element stored within one or more "" sub- 975 elements, followed by optional "" sub-elements, 976 followed by zero or one "" sub-element, followed by 977 optional "" sub-elements. All "" nodes MUST be 978 sub-elements of the "". 980 11.1.5. Attributes 982 Within an EBML Schema the "" uses the following attributes 983 to define an EBML Element: 985 11.1.5.1. name 987 Within an EBML Schema, the XPath of "@name" attribute is 988 "/EBMLSchema/element/@name". 990 The name provides the human-readable name of the EBML Element. The 991 value of the name MUST be in the form of characters "A" to "Z", "a" 992 to "z", "0" to "9", "-" and ".". The first character of the name 993 MUST be in the form of an "A" to "Z", "a" to "z", "0" to "9" 994 character. 996 The name attribute is REQUIRED. 998 11.1.5.2. path 1000 Within an EBML Schema, the XPath of "@path" attribute is 1001 "/EBMLSchema/element/@path". 1003 The path defines the allowed storage locations of the EBML Element 1004 within an EBML Document. This path MUST be defined with the full 1005 hierarchy of EBML Elements separated with a "\". The top EBML 1006 Element in the path hierarchy being the first in the value. The 1007 syntax of the path attribute is defined using this Augmented Backus- 1008 Naur Form (ABNF) [RFC5234] with the case sensitive update [RFC7405] 1009 notation: 1011 The path attribute is REQUIRED. 1013 EBMLFullPath = [EBMLParentPath] EBMLElementPath 1014 EBMLParentPath = EBMLFixedParent EBMLLastParent 1015 EBMLFixedParent = *(EBMLPathAtom) 1016 EBMLElementPath = EBMLPathAtom / EBMLPathAtomRecursive 1017 EBMLPathAtom = PathDelimiter EBMLAtomName 1018 EBMLPathAtomRecursive = "(1*(" EBMLPathAtom "))" 1019 EBMLLastParent = EBMLPathAtom / EBMLGlobalParent 1020 EBMLGlobalParent = "(" GlobalParentOccurence "\)" 1021 EBMLAtomName = 1*(EBMLNameChar) 1022 EBMLNameChar = ALPHA / DIGIT / "-" / "." 1023 PathDelimiter = "\" 1024 GlobalParentOccurence = [PathMinOccurrence] "*" [PathMaxOccurrence] 1025 PathMinOccurrence = 1*DIGIT ; no upper limit 1026 PathMaxOccurrence = 1*DIGIT ; no upper limit 1028 The "*", "(" and ")" symbols are interpreted as defined in [RFC5234]. 1030 The EBMLPathAtom part of the EBMLElementPath MUST be equal to the 1031 name attribute of the EBML Schema. 1033 The starting PathDelimiter of the path corresponds to the root of the 1034 EBML Document. 1036 In some cases the EBMLLastParent part of the path is an 1037 EBMLGlobalParent. A path with a EBMLGlobalParent defines a 1038 Section 11.3. Any path that starts with the EBMLFixedParent of the 1039 Global Element and matches the occurrences found in the 1040 GlobalParentOccurence is a valid path for the Global Element. 1042 The GlobalParentOccurence part is interpreted as an ABNF Variable 1043 Repetition. The repetition amounts correspond to the amount of 1044 unspecified Parent Element levels there can be between the 1045 EBMLFixedParent and the actual EBMLElementPath. 1047 PathMinOccurrence represents the minimum number of element path 1048 required between the EBMLFixedParent and the Global Element 1049 EBMLElementPath. For example 0 means the EBMLElementPath can be 1050 right after the EBMLFixedParent, 1 means there has to be at least an 1051 element between the EBMLFixedParent and the EBMLElementPath. If 1052 PathMinOccurrence is not present then that EBML Element has an 1053 PathMinOccurrence value of 0. 1055 PathMaxOccurrence represents the maximum number of element path 1056 possible between the EBMLFixedParent and the Global Element 1057 EBMLElementPath. It cannot have the value 0 as it would be the 1058 Global Element can only be found right after the EBMLFixedParent, in 1059 which case it's not a Global Element anymore. If PathMaxOccurrence 1060 is not present then there is no upper bound for the permitted number 1061 of occurrences of element path possible between the EBMLFixedParent 1062 and the Global Element EBMLElementPath. 1064 If the path contains an EBMLPathAtomRecursive part, the EBML Element 1065 can occur within itself recursively (see Section 11.1.5.11). 1067 As an example, a "path" of "1*(\Segment\Info)" means the element Info 1068 is found inside the Segment elements at least once and with no 1069 maximum iteration. An element SeekHead with path 1070 "0*2(\Segment\SeekHead)" may not be found at all in its Segment 1071 parent, once or twice but no more than that. 1073 11.1.5.3. id 1075 Within an EBML Schema, the XPath of "@id" attribute is "/EBMLSchema/ 1076 element/@id". 1078 The Element ID encoded as a Variable Size Integer expressed in 1079 hexadecimal notation prefixed by a 0x that is read and stored in big- 1080 endian order. To reduce the risk of false positives while parsing 1081 EBML Streams, the Element IDs of the Root Element and Top-Level 1082 Elements SHOULD be at least 4 octets in length. Element IDs defined 1083 for use at Root Level or directly under the Root Level MAY use 1084 shorter octet lengths to facilitate padding and optimize edits to 1085 EBML Documents; for instance, the Void Element uses an Element ID 1086 with a one octet length to allow its usage in more writing and 1087 editing scenarios. 1089 The id attribute is REQUIRED. 1091 11.1.5.4. minOccurs 1093 Within an EBML Schema, the XPath of "@minOccurs" attribute is 1094 "/EBMLSchema/element/@minOccurs". 1096 The minOccurs is a non-negative integer expressing the minimum 1097 permitted number of occurrences of this EBML Element within its 1098 Parent Element. 1100 Each instance of the Parent Element MUST contain at least this many 1101 instances of this EBML Element. If the EBML Element has an empty 1102 EBMLParentPath then minOccurs refers to constraints on the occurrence 1103 of the EBML Element within the EBML Document. EBML Elements with 1104 minOccurs set to "1" that also have a default value (see 1105 Section 11.1.5.8) declared are not REQUIRED to be stored but are 1106 REQUIRED to be interpreted, see Section 11.1.18. 1108 An EBML Element defined with a minOccurs value greater than zero is 1109 called a Mandatory EBML Element. 1111 The minOccurs attribute is OPTIONAL. If the minOccurs attribute is 1112 not present then that EBML Element has a minOccurs value of 0. 1114 The semantic meaning of minOccurs within an EBML Schema is analogous 1115 to the meaning of minOccurs within an XML Schema. 1117 11.1.5.5. maxOccurs 1119 Within an EBML Schema, the XPath of "@maxOccurs" attribute is 1120 "/EBMLSchema/element/@maxOccurs". 1122 The maxOccurs is a non-negative integer expressing the maximum 1123 permitted number of occurrences of this EBML Element within its 1124 Parent Element. 1126 Each instance of the Parent Element MUST contain at most this many 1127 instances of this EBML Element, including the unwritten mandatory 1128 element with a default value, see Section 11.1.18. If the EBML 1129 Element has an empty EBMLParentPath then maxOccurs refers to 1130 constraints on the occurrence of the EBML Element within the EBML 1131 Document. 1133 The maxOccurs attribute is OPTIONAL. If the maxOccurs attribute is 1134 not present then there is no upper bound for the permitted number of 1135 occurrences of this EBML Element within its Parent Element or within 1136 the EBML Document depending on whether the EBMLParentPath of the EBML 1137 Element is empty or not. 1139 The semantic meaning of maxOccurs within an EBML Schema is analogous 1140 to the meaning of maxOccurs within an XML Schema, when it is not 1141 present it's similar to xml:maxOccurs="unbounded" in an XML Schema. 1143 11.1.5.6. range 1145 Within an EBML Schema, the XPath of "@range" attribute is 1146 "/EBMLSchema/element/@range". 1148 A numerical range for EBML Elements which are of numerical types 1149 (Unsigned Integer, Signed Integer, Float, and Date). If specified 1150 the value of the EBML Element MUST be within the defined range. See 1151 Section 11.1.5.6.1 for rules applied to expression of range values. 1153 The range attribute is OPTIONAL. If the range attribute is not 1154 present then any value legal for the type attribute is valid. 1156 11.1.5.6.1. Expression of range 1158 The range attribute MUST only be used with EBML Elements that are 1159 either signed integer, unsigned integer, float, or date. The 1160 expression defines the upper, lower, exact or excluded value of the 1161 EBML Element and optionally an upper boundary value combined with a 1162 lower boundary. The range expression may contain whitespace (using 1163 the ASCII 0x20 character) for readability but whitespace within a 1164 range expression MUST NOT convey meaning. 1166 To set a fixed value for the range, the value is used as the 1167 attribute value. For example "1234" means the EBML element always 1168 has the value 1234. The value can be prefixed with "not" to indicate 1169 that the fixed value MUST NOT be used for that Element. For example 1170 "not 1234" means the Element can use all values of its type except 1171 1234. 1173 For an exclusive lower boundary the ">" sign is used and the ">=" 1174 sign is used for an inclusive lower boundary. For example ">3" 1175 meaning the Element value MUST be greater than 3 or ">=0x1p+0" 1176 meaning the Element value MUST be greater than or equal to the 1177 floating value 1.0, see Section 11.1.17. 1179 For an exclusive upper boundary the "<" sign is used and the "<=" 1180 sign is used for an inclusive upper boundary. For example "<-2" 1181 meaning the Element value MUST be less than -2 or "<=10" meaning the 1182 Element value MUST be less than or equal to the 10. 1184 The lower and upper bounds can be combined into an expression to form 1185 a closed boundary. The lower boundary coming first followed by the 1186 upper boundary, separated by a comma. For example ">3,<= 20" means 1187 the Element value MUST be greater than 3 and less than or equal to 1188 20. 1190 A special form of lower and upper bounds using the "-" separator is 1191 possible, meaning the Element value MUST be greater than or to the 1192 first value and MUST be less than or equal to the second value. For 1193 example "1-10" is equivalent to ">=1,<=10". If the upper boundary is 1194 negative, only the latter form MUST be used. 1196 11.1.5.7. length 1198 Within an EBML Schema, the XPath of "@length" attribute is 1199 "/EBMLSchema/element/@length". 1201 A value to express the valid length of the Element Data as written 1202 measured in octets. The length provides a constraint in addition to 1203 the Length value of the definition of the corresponding EBML Element 1204 Type. This length MUST be expressed as either a non-negative integer 1205 or a range (see Section 11.1.5.6.1) that consists of only non- 1206 negative integers and valid operators. 1208 The length attribute is OPTIONAL. If the length attribute is not 1209 present for that EBML Element then that EBML Element is only limited 1210 in length by the definition of the associated EBML Element Type. 1212 11.1.5.8. default 1214 Within an EBML Schema, the XPath of "@default" attribute is 1215 "/EBMLSchema/element/@default". 1217 If an Element is mandatory (has a minOccurs value greater than zero) 1218 but not written within its Parent Element or stored as an Empty 1219 Element, then the EBML Reader of the EBML Document MUST semantically 1220 interpret the EBML Element as present with this specified default 1221 value for the EBML Element. An unwritten mandatory Element with a 1222 declared default value is semantically equivalent to that Element if 1223 written with the default value stored as the Element Data. EBML 1224 Elements that are Master Elements MUST NOT declare a default value. 1225 EBML Elements with a minOccurs value greater than 1 MUST NOT declare 1226 a default value. 1228 The default attribute is OPTIONAL. 1230 11.1.5.9. type 1232 Within an EBML Schema, the XPath of "@type" attribute is 1233 "/EBMLSchema/element/@type". 1235 The type MUST be set to one of the following values: "integer" 1236 (signed integer), "uinteger" (unsigned integer), "float", "string", 1237 "date", "utf-8", "master", or "binary". The content of each type is 1238 defined within Section 7. 1240 The type attribute is REQUIRED. 1242 11.1.5.10. unknownsizeallowed 1244 Within an EBML Schema, the XPath of "@unknownsizeallowed" attribute 1245 is "/EBMLSchema/element/@unknownsizeallowed". 1247 A boolean to express if an EBML Element is permitted to be Unknown- 1248 Sized Element (having all VINT_DATA bits of Element Data Size set to 1249 1). EBML Elements that are not Master Elements MUST NOT set 1250 unknownsizeallowed to true. An EBML Element that is defined with an 1251 unknownsizeallowed attribute set to 1 MUST also have the 1252 unknownsizeallowed attribute of its Parent Element set to 1. 1254 An EBML Element with the unknownsizeallowed attribute set to 1 MUST 1255 NOT have its recursive attribute set to 1. 1257 The unknownsizeallowed attribute is OPTIONAL. If the 1258 unknownsizeallowed attribute is not used then that EBML Element is 1259 not allowed to use an unknown Element Data Size. 1261 11.1.5.11. recursive 1263 Within an EBML Schema, the XPath of "@recursive" attribute is 1264 "/EBMLSchema/element/@recursive". 1266 A boolean to express if an EBML Element is permitted to be stored 1267 recursively. In this case the EBML Element MAY be stored within 1268 another EBML Element that has the same Element ID. Which itself can 1269 be stored in an EBML Element that has the same Element ID, and so on. 1270 EBML Elements that are not Master Elements MUST NOT set recursive to 1271 true. 1273 If the path contains an EBMLPathAtomRecursive part then the recursive 1274 value MUST be true and false otherwise. 1276 An EBML Element with the recursive attribute set to 1 MUST NOT have 1277 its unknownsizeallowed attribute set to 1. 1279 The recursive attribute is OPTIONAL. If the recursive attribute is 1280 not present then the EBML Element MUST NOT be used recursively. 1282 11.1.5.12. recurring 1284 Within an EBML Schema, the XPath of "@recurring" attribute is 1285 "/EBMLSchema/element/@recurring". 1287 A boolean to express if an EBML Element is defined as an Identically 1288 Recurring Element or not. 1290 The recurring attribute is OPTIONAL. If the recurring attribute is 1291 not present then the EBML Element is not an Identically Recurring 1292 Element. 1294 11.1.5.13. minver 1296 Within an EBML Schema, the XPath of "@minver" attribute is 1297 "/EBMLSchema/element/@minver". 1299 The minver (minimum version) attribute stores a non-negative integer 1300 that represents the first version of the docType to support the EBML 1301 Element. 1303 The minver attribute is OPTIONAL. If the minver attribute is not 1304 present, then the EBML Element has a minimum version of "1". 1306 11.1.5.14. maxver 1308 Within an EBML Schema, the XPath of "@maxver" attribute is 1309 "/EBMLSchema/element/@maxver". 1311 The maxver (maximum version) attribute stores a non-negative integer 1312 that represents the last or most recent version of the docType to 1313 support the element. maxver MUST be greater than or equal to minver. 1315 The maxver attribute is OPTIONAL. If the maxver attribute is not 1316 present then the EBML Element has a maximum version equal to the 1317 value stored in the version attribute of "". 1319 11.1.6. Element 1321 Within an EBML Schema, the XPath of "" attribute is 1322 "/EBMLSchema/element/documentation". 1324 The "" element provides additional information about 1325 the EBML Element. Within the "" element the following 1326 XHTML [W3C.SPSD-xhtml-basic-20180327] elements MAY be used: "", 1327 "
", "". 1329 11.1.7. Attributes 1331 11.1.7.1. lang 1333 Within an EBML Schema, the XPath of "@lang" attribute is 1334 "/EBMLSchema/element/documentation/@lang". 1336 A lang attribute which is set to the [RFC5646] value of the language 1337 of the element's documentation. 1339 The lang attribute is OPTIONAL. 1341 11.1.7.2. purpose 1343 Within an EBML Schema, the XPath of "@purpose" attribute is 1344 "/EBMLSchema/element/documentation/@purpose". 1346 A purpose attribute distinguishes the meaning of the documentation. 1347 Values for the "" sub-element's purpose attribute MUST 1348 include one of the values listed in Table 8. 1350 +------------+-------------------------------------------------+ 1351 | value of | definition | 1352 | purpose | | 1353 | attribute | | 1354 +============+=================================================+ 1355 | definition | A 'definition' is recommended for every defined | 1356 | | EBML Element. This documentation explains the | 1357 | | semantic meaning of the EBML Element. | 1358 +------------+-------------------------------------------------+ 1359 | rationale | An explanation about the reason or catalyst for | 1360 | | the definition of the Element. | 1361 +------------+-------------------------------------------------+ 1362 | usage | Recommended practices or guideline for both | 1363 | notes | reading, writing, or interpreting the Element. | 1364 +------------+-------------------------------------------------+ 1365 | references | Informational references to support the | 1366 | | contextualization and understanding of the | 1367 | | value of the Element. | 1368 +------------+-------------------------------------------------+ 1370 Table 8: Definitions of the permitted values for the purpose 1371 attribute of the documentation Element. 1373 The purpose attribute is REQUIRED. 1375 11.1.8. Element 1377 Within an EBML Schema, the XPath of "" attribute 1378 is "/EBMLSchema/element/implementation_note". 1380 In some cases within an EBML Document Type, the attributes of the 1381 "" element are not sufficient to clearly communicate how the 1382 defined EBML Element is intended to be implemented. For instance, 1383 one EBML Element might only be mandatory if another EBML Element is 1384 present, or as another example, the default value of an EBML Element 1385 might derive from a related Element's content. In these cases where 1386 the Element's definition is conditional or advanced implementation 1387 notes are needed, one or many "" elements can be 1388 used to store that information. The "" refer to 1389 a specific attribute of the parent "" as expressed by the 1390 "note_attribute" attribute Section 11.1.9.1. 1392 11.1.9. Attributes 1394 11.1.9.1. note_attribute 1396 Within an EBML Schema, the XPath of "@note_attribute" attribute is 1397 "/EBMLSchema/element/implementation_note/@note_attribute". 1399 The note_attribute attribute references which of the ""'s 1400 attributes that the implementation_note is in regards to. The 1401 note_attribute attribute MUST be set to one of the following values 1402 (corresponding to that attribute of the parent ""): 1403 "minOccurs", "maxOccurs", "range", "length", "default", "minver", or 1404 "maxver". The "" SHALL supersede the parent 1405 ""'s attribute that is named in the "note_attribute" 1406 attribute. An "" SHALL NOT have more than one 1407 "" of the same "note_attribute". 1409 The note_attribute attribute is REQUIRED. 1411 11.1.9.2. Example 1413 The following fragment of an EBML Schema demonstrates how an 1414 "" is used. In this case an EBML Schema 1415 documents a list of items that are described with an optional cost. 1416 The Currency Element uses an "" to say that the 1417 Currency Element is REQUIRED if the Cost Element is set, otherwise 1418 not. 1420 1422 1423 A set of items. 1424 1425 1426 1428 1429 An item. 1430 1431 1432 1434 1435 The cost of the item, if any. 1436 1437 1438 1440 1441 The currency of the item's cost. 1442 1443 1444 Currency MUST be set (minOccurs=1) if the associated Item stores 1445 a Cost, else Currency MAY be unset (minOccurs=0). 1446 1447 1449 11.1.10. Element 1451 Within an EBML Schema, the XPath of "" attribute is 1452 "/EBMLSchema/element/restriction". 1454 The "" element provides information about restrictions 1455 to the allowable values for the EBML Element which are listed in 1456 "" elements. 1458 11.1.11. Element 1460 Within an EBML Schema, the XPath of "" attribute is 1461 "/EBMLSchema/element/restriction/enum". 1463 The "" element stores a list of values allowed for storage in 1464 the EBML Element. The values MUST match the type of the EBML Element 1465 (for example "" cannot be a valid value for a EBML 1466 Element that is defined as an unsigned integer). An "" element 1467 MAY also store "" elements to further describe the 1468 "". 1470 11.1.12. Attributes 1472 11.1.12.1. label 1474 Within an EBML Schema, the XPath of "@label" attribute is 1475 "/EBMLSchema/element/restriction/enum/@label". 1477 The label provides a concise expression for human consumption that 1478 describes what the value of the "" represents. 1480 The label attribute is OPTIONAL. 1482 11.1.12.2. value 1484 Within an EBML Schema, the XPath of "@value" attribute is 1485 "/EBMLSchema/element/restriction/enum/@value". 1487 The value represents data that MAY be stored within the EBML Element. 1489 The value attribute is REQUIRED. 1491 11.1.13. Element 1493 Within an EBML Schema, the XPath of "" attribute is 1494 "/EBMLSchema/element/extension". 1496 The "" element provides an unconstrained element to 1497 contain information about the associated EBML "" which is 1498 undefined by this document but MAY be defined by the associated EBML 1499 Document Type. The "" element MUST contain a "type" 1500 attribute and also MAY contain any other attribute or sub-element as 1501 long as the EBML Schema remains as a well-formed XML Document. All 1502 "" elements MUST be sub-elements of the "". 1504 11.1.14. Attributes 1506 11.1.14.1. type 1508 Within an EBML Schema, the XPath of "@type" attribute is 1509 "/EBMLSchema/element/extension/@type". 1511 The type attribute should reference a name or identifier of the 1512 project or authority associated with the contents of the 1513 "" element. 1515 The type attribute is REQUIRED. 1517 11.1.15. XML Schema for EBML Schema 1519 This following provides an XML Schema [W3C.REC-xmlschema-0-20041028] 1520 for facilitating verification of an EBML Schema to the definition 1521 described in Section 8.1. 1523 1524 1530 1531 1534 1536 1537 1538 1540 1541 1542 1543 1545 1546 1547 1549 1551 1553 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1626 1627 1628 1630 1631 1633 1634 1635 1637 1638 1639 1640 1642 1643 1644 1646 1647 1648 1649 1651 1652 1653 1655 1657 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1695 11.1.16. Identically Recurring Elements 1697 An Identically Recurring Element is an EBML Element that MAY occur 1698 within its Parent Element more than once but that each recurrence 1699 within that Parent Element MUST be identical both in storage and 1700 semantics. Identically Recurring Elements are permitted to be stored 1701 multiple times within the same Parent Element in order to increase 1702 data resilience and optimize the use of EBML in transmission. For 1703 instance a pertinent Top-Level Element could be periodically resent 1704 within a data stream so that an EBML Reader which starts reading the 1705 stream from the middle could better interpret the contents. 1706 Identically Recurring Elements SHOULD include a CRC-32 Element as a 1707 Child Element; this is especially recommended when EBML is used for 1708 long-term storage or transmission. If a Parent Element contains more 1709 than one copy of an Identically Recurring Element which includes a 1710 CRC-32 Element as a Child Element then the first instance of the 1711 Identically Recurring Element with a valid CRC-32 value should be 1712 used for interpretation. If a Parent Element contains more than one 1713 copy of an Identically Recurring Element which does not contain a 1714 CRC-32 Element or if CRC-32 Elements are present but none are valid 1715 then the first instance of the Identically Recurring Element should 1716 be used for interpretation. 1718 11.1.17. Textual expression of floats 1720 When a float value is represented textually in an EBML Schema, such 1721 as within a default or range value, the float values MUST be 1722 expressed as Hexadecimal Floating-Point Constants as defined in the 1723 C11 standard [ISO.9899.2011] (see section 6.4.4.2 on Floating 1724 Constants). Table 9 provides examples of expressions of float 1725 ranges. 1727 +-------------------+-----------------------------------------+ 1728 | as decimal | as Hexadecimal Floating-Point Constants | 1729 +===================+=========================================+ 1730 | 0.0 | "0x0p+1" | 1731 +-------------------+-----------------------------------------+ 1732 | 0.0-1.0 | "0x0p+1-0x1p+0" | 1733 +-------------------+-----------------------------------------+ 1734 | 1.0-256.0 | "0x1p+0-0x1p+8" | 1735 +-------------------+-----------------------------------------+ 1736 | 0.857421875 | "0x1.b7p-1" | 1737 +-------------------+-----------------------------------------+ 1738 | -1.0--0.857421875 | "-0x1p+0--0x1.b7p-1" | 1739 +-------------------+-----------------------------------------+ 1741 Table 9: Example of floating point values and ranges as 1742 decimal and as Hexadecimal Floating-Point Constants. 1744 Within an expression of a float range, as in an integer range, the - 1745 (hyphen) character is the separator between the minimal and maximum 1746 value permitted by the range. Hexadecimal Floating-Point Constants 1747 also use a - (hyphen) when indicating a negative binary power. 1748 Within a float range, when a - (hyphen) is immediately preceded by a 1749 letter p, then the - (hyphen) is a part of the Hexadecimal Floating- 1750 Point Constant which notes negative binary power. Within a float 1751 range, when a - (hyphen) is not immediately preceded by a letter p, 1752 then the - (hyphen) represents the separator between the minimal and 1753 maximum value permitted by the range. 1755 11.1.18. Note on the use of default attributes to define Mandatory EBML 1756 Elements 1758 If a Mandatory EBML Element has a default value declared by an EBML 1759 Schema and the value of the EBML Element is equal to the declared 1760 default value then that EBML Element is not required to be present 1761 within the EBML Document if its Parent Element is present. In this 1762 case, the default value of the Mandatory EBML Element MUST be read by 1763 the EBML Reader although the EBML Element is not present within its 1764 Parent Element. 1766 If a Mandatory EBML Element has no default value declared by an EBML 1767 Schema and its Parent Element is present then the EBML Element MUST 1768 be present as well. If a Mandatory EBML Element has a default value 1769 declared by an EBML Schema and its Parent Element is present and the 1770 value of the EBML Element is NOT equal to the declared default value 1771 then the EBML Element MUST be present. 1773 Table 10 clarifies if a Mandatory EBML Element MUST be written, 1774 according to if the default value is declared, if the value of the 1775 EBML Element is equal to the declared default value, and if the 1776 Parent Element is used. 1778 +-----------------+-------------+---------------+------------------+ 1779 | Is the default | Is the | Is the Parent | Then is storing | 1780 | value declared? | value equal | Element | the EBML Element | 1781 | | to default? | present? | REQUIRED? | 1782 +=================+=============+===============+==================+ 1783 | Yes | Yes | Yes | No | 1784 +-----------------+-------------+---------------+------------------+ 1785 | Yes | Yes | No | No | 1786 +-----------------+-------------+---------------+------------------+ 1787 | Yes | No | Yes | Yes | 1788 +-----------------+-------------+---------------+------------------+ 1789 | Yes | No | No | No | 1790 +-----------------+-------------+---------------+------------------+ 1791 | No | n/a | Yes | Yes | 1792 +-----------------+-------------+---------------+------------------+ 1793 | No | n/a | No | No | 1794 +-----------------+-------------+---------------+------------------+ 1796 Table 10: Demonstration of the conditional requirements of VINT 1797 Storage. 1799 11.2. EBML Header Elements 1801 This document contains definitions of all EBML Elements of the EBML 1802 Header. 1804 11.2.1. EBML Element 1806 name: EBML 1808 path: "1*1(\EBML)" 1810 id: 0x1A45DFA3 1812 minOccurs: 1 1814 maxOccurs: 1 1816 type: Master Element 1818 description: Set the EBML characteristics of the data to follow. 1819 Each EBML Document has to start with this. 1821 11.2.2. EBMLVersion Element 1823 name: EBMLVersion 1825 path: "1*1(\EBML\EBMLVersion)" 1827 id 0x4286 1829 minOccurs: 1 1831 maxOccurs: 1 1833 range: not 0 1835 default: 1 1837 type: Unsigned Integer 1839 description: The version of EBML specifications used to create the 1840 EBML Document. The version of EBML defined in this document is 1, so 1841 EBMLVersion SHOULD be 1. 1843 11.2.3. EBMLReadVersion Element 1845 name: EBMLReadVersion 1847 path: "1*1(\EBML\EBMLReadVersion)" 1849 id: 0x42F7 1851 minOccurs: 1 1852 maxOccurs: 1 1854 range: 1 1856 default: 1 1858 type: Unsigned Integer 1860 description: The minimum EBML version an EBML Reader has to support 1861 to read this EBML Document. The EBMLReadVersion Element MUST be less 1862 than or equal to EBMLVersion. 1864 11.2.4. EBMLMaxIDLength Element 1866 name: EBMLMaxIDLength 1868 path: "1*1(\EBML\EBMLMaxIDLength)" 1870 id 0x42F2 1872 minOccurs: 1 1874 maxOccurs: 1 1876 range: >=4 1878 default: 4 1880 type: Unsigned Integer 1882 description: The EBMLMaxIDLength Element stores the maximum permitted 1883 length in octets of the Element IDs to be found within the EBML Body. 1884 An EBMLMaxIDLength Element value of four is RECOMMENDED, though 1885 larger values are allowed. 1887 11.2.5. EBMLMaxSizeLength Element 1889 name: EBMLMaxSizeLength 1891 path: "1*1(\EBML\EBMLMaxSizeLength)" 1893 id 0x42F3 1895 minOccurs: 1 1897 maxOccurs: 1 1899 range: not 0 1900 default: 8 1902 type: Unsigned Integer 1904 description: The EBMLMaxSizeLength Element stores the maximum 1905 permitted length in octets of the expressions of all Element Data 1906 Sizes to be found within the EBML Body. The EBMLMaxSizeLength 1907 Element documents an upper bound for the "length" of all Element Data 1908 Size expressions within the EBML Body and not an upper bound for the 1909 "value" of all Element Data Size expressions within the EBML Body. 1910 EBML Elements that have an Element Data Size expression which is 1911 larger in octets than what is expressed by EBMLMaxSizeLength Element 1912 are invalid. 1914 11.2.6. DocType Element 1916 name: DocType 1918 path: "1*1(\EBML\DocType)" 1920 id 0x4282 1922 minOccurs: 1 1924 maxOccurs: 1 1926 length: >0 1928 type: String 1930 description: A string that describes and identifies the content of 1931 the EBML Body that follows this EBML Header. 1933 11.2.7. DocTypeVersion Element 1935 name: DocTypeVersion 1937 path: "1*1(\EBML\DocTypeVersion)" 1939 id 0x4287 1941 minOccurs: 1 1943 maxOccurs: 1 1945 range: not 0 1947 default: 1 1948 type: Unsigned Integer 1950 description: The version of DocType interpreter used to create the 1951 EBML Document. 1953 11.2.8. DocTypeReadVersion Element 1955 name: DocTypeReadVersion 1957 path: "1*1(\EBML\DocTypeReadVersion)" 1959 id 0x4285 1961 minOccurs: 1 1963 maxOccurs: 1 1965 range: not 0 1967 default: 1 1969 type: Unsigned Integer 1971 description: The minimum DocType version an EBML Reader has to 1972 support to read this EBML Document. The value of the 1973 DocTypeReadVersion Element MUST be less than or equal to the value of 1974 the DocTypeVersion Element. 1976 11.2.9. DocTypeExtension Element 1978 name: DocTypeExtension 1980 path: "0*(\EBML\DocTypeExtension)" 1982 id 0x4281 1984 minOccurs: 0 1986 type: Master Element 1988 description: A DocTypeExtension adds extra Elements to the main 1989 DocType+DocTypeVersion tuple it's attached to. An EBML Reader MAY 1990 know these extra Elements and how to use them. A DocTypeExtension 1991 MAY be used to iterate between experimental Elements before they are 1992 integrated in a regular DocTypeVersion. Reading one DocTypeExtension 1993 version of a DocType+DocTypeVersion tuple doesn't imply one should be 1994 able to read upper versions of this DocTypeExtension. 1996 11.2.10. DocTypeExtensionName Element 1998 name: DocTypeExtensionName 2000 path: "1*1(\EBML\DocTypeExtension\Name)" 2002 id 0x4283 2004 minOccurs: 1 2006 maxOccurs: 1 2008 length: >0 2010 type: String 2012 description: The name of the DocTypeExtension to differentiate it 2013 from other DocTypeExtension of the same DocType+DocTypeVersion tuple. 2014 A DocTypeExtensionName value MUST be unique within the EBML Header. 2016 11.2.11. DocTypeExtensionVersion Element 2018 name: DocTypeExtensionVersion 2020 path: "1*1(\EBML\DocTypeExtension\Version)" 2022 id 0x4284 2024 minOccurs: 1 2026 maxOccurs: 1 2028 range: not 0 2030 type: Unsigned Integer 2032 description: The version of the DocTypeExtension. Different 2033 DocTypeExtensionVersion values of the same 2034 DocType+DocTypeVersion+DocTypeExtensionName tuple MAY contain 2035 completely different sets of extra Elements. An EBML Reader MAY 2036 support multiple versions of the same DocTypeExtension, only one or 2037 none. 2039 11.3. Global Elements 2041 EBML allows some special Elements to be found within more than one 2042 parent in an EBML Document or optionally at the Root Level of an EBML 2043 Body. These Elements are called Global Elements. There are 2 Global 2044 Elements that can be found in any EBML Document: the CRC-32 Element 2045 and the Void Element. An EBML Schema MAY add other Global Elements 2046 to the format it defines. These extra elements apply only to the 2047 EBML Body, not the EBML Header. 2049 Global Elements are EBML Elements whose path have a EBMLGlobalParent 2050 as their EBMLLastParent. Because it is the last Parent part of the 2051 path, a Global Element might also have non-EBMLGlobalParent parts in 2052 its path. In this case the Global Element can only be found within 2053 this non-EBMLGlobalParent path, i.e. it's not fully "global". 2055 A Global Element can be found in many Parent Elements, allowing the 2056 same number of occurrences in each Parent where this Element is 2057 found. 2059 11.3.1. CRC-32 Element 2061 name: CRC-32 2063 path: "*1((1*\)\CRC-32)" 2065 id: 0xBF 2067 minOccurs: 0 2069 maxOccurs: 1 2071 length: 4 2073 type: Binary 2075 description: The CRC-32 Element contains a 32-bit Cyclic Redundancy 2076 Check value of all the Element Data of the Parent Element as stored 2077 except for the CRC-32 Element itself. When the CRC-32 Element is 2078 present, the CRC-32 Element MUST be the first ordered EBML Element 2079 within its Parent Element for easier reading. All Top-Level Elements 2080 of an EBML Document that are Master Elements SHOULD include a CRC-32 2081 Element as a Child Element. The CRC in use is the IEEE-CRC-32 2082 algorithm as used in the [ISO.3309.1979] standard and in section 2083 8.1.1.6.2 of [ITU.V42.1994], with initial value of 0xFFFFFFFF. The 2084 CRC value MUST be computed on a little endian bitstream and MUST use 2085 little endian storage. 2087 11.3.2. Void Element 2089 name: Void 2091 path: "*((*\)\Void)" 2093 id: 0xEC 2095 minOccurs: 0 2097 type: Binary 2099 description: Used to void data or to avoid unexpected behaviors when 2100 using damaged data. The content is discarded. Also used to reserve 2101 space in a sub-element for later use. 2103 12. Considerations for Reading EBML Data 2105 The following scenarios describe events to consider when reading EBML 2106 Documents and the recommended design of an EBML Reader. 2108 If a Master Element contains a CRC-32 Element that doesn't validate, 2109 then the EBML Reader MAY ignore all contained data except for 2110 Descendant Elements that contain their own valid CRC-32 Element. 2112 In the following XML representation of a simple, hypothetical EBML 2113 fragment, a Master Element called CONTACT contains two Child 2114 Elements, NAME and ADDRESS. In this example, some data within the 2115 NAME Element had been altered, so that the CRC-32 of the NAME Element 2116 does not validate and thus any Ancestor Element with a CRC-32 would 2117 therefore also no longer validate. However, even though the CONTACT 2118 Element has a CRC-32 that does not validate (because of the changed 2119 data within the NAME Element), the CRC-32 of the ADDRESS Element does 2120 validate and thus the contents and semantics of the ADDRESS Element 2121 MAY be used. 2123 2124 c119a69b 2125 2126 1f59ee2b 2127 invalid data 2128 invalid data 2129 2130
2131 df941cc9 2132 valid data 2133 valid data 2134
2135
2137 If a Master Element contains more occurrences of a Child Master 2138 Element than permitted according to the maxOccurs and recurring 2139 attributes of the definition of that Element then the occurrences in 2140 addition to maxOccurs MAY be ignored. 2142 If a Master Element contains more occurrences of a Child Element than 2143 permitted according to the maxOccurs attribute of the definition of 2144 that Element then all instances of that Element after the first 2145 maxOccur occurrences from the beginning of its Parent Element SHOULD 2146 be ignored. 2148 13. Terminating Elements 2150 Null Octets, which are octets with all bits set to zero, MAY follow 2151 the value of a String Element or UTF-8 Element to serve as a 2152 terminator. An EBML Writer MAY terminate a String Element or UTF-8 2153 Element with Null Octets in order to overwrite a stored value with a 2154 new value of lesser length while maintaining the same Element Data 2155 Size (this can prevent the need to rewrite large portions of an EBML 2156 Document); otherwise the use of Null Octets within a String Element 2157 or UTF-8 Element is NOT RECOMMENDED. An EBML Reader MUST consider 2158 the value of the String Element or UTF-8 Element to be terminated 2159 upon the first read Null Octet and MUST ignore any data following the 2160 first Null Octet within that Element. A string value and a copy of 2161 that string value terminated by one or more Null Octets are 2162 semantically equal. 2164 Table 11 shows examples of semantics and validation for the use of 2165 Null Octets. Values to represent Stored Values and the Semantic 2166 Meaning as represented as hexadecimal values. 2168 +---------------------+---------------------+ 2169 | Stored Value | Semantic Meaning | 2170 +=====================+=====================+ 2171 | 0x65 0x62 0x6D 0x6C | 0x65 0x62 0x6D 0x6C | 2172 +---------------------+---------------------+ 2173 | 0x65 0x62 0x00 0x6C | 0x65 0x62 | 2174 +---------------------+---------------------+ 2175 | 0x65 0x62 0x00 0x00 | 0x65 0x62 | 2176 +---------------------+---------------------+ 2177 | 0x65 0x62 | 0x65 0x62 | 2178 +---------------------+---------------------+ 2180 Table 11: Exmaples of semantics for Null 2181 Octets in VINT_DATA. 2183 14. Guidelines for Updating Elements 2185 An EBML Document can be updated without requiring that the entire 2186 EBML Document be rewritten. These recommendations describe 2187 strategies to change the Element Data of a written EBML Element with 2188 minimal disruption to the rest of the EBML Document. 2190 14.1. Reducing a Element Data in Size 2192 There are three methods to reduce the size of Element Data of a 2193 written EBML Element. 2195 14.1.1. Adding a Void Element 2197 When an EBML Element is changed to reduce its total length by more 2198 than one octet, an EBML Writer SHOULD fill the freed space with a 2199 Void Element. 2201 14.1.2. Extending the Element Data Size 2203 The same value for Element Data Size MAY be written in variable 2204 lengths, so for minor reductions in octet length the Element Data 2205 Size MAY be written to a longer octet length to fill the freed space. 2207 For example, the first row of Table 12 depicts a String Element that 2208 stores an Element ID (3 octets), Element Data Size (1 octet), and 2209 Element Data (4 octets). If the Element Data is changed to reduce 2210 the length by one octet and if the current length of the Element Data 2211 Size is less than its maximum permitted length, then the Element Data 2212 Size of that Element MAY be rewritten to increase its length by one 2213 octet. Thus before and after the change the EBML Element maintains 2214 the same length of 8 octets and data around the Element does not need 2215 to be moved. 2217 +-------------+------------+-------------------+--------------+ 2218 | Status | Element ID | Element Data Size | Element Data | 2219 +=============+============+===================+==============+ 2220 | Before edit | 0x3B4040 | 0x84 | 0x65626D6C | 2221 +-------------+------------+-------------------+--------------+ 2222 | After edit | 0x3B4040 | 0x4003 | 0x6D6B76 | 2223 +-------------+------------+-------------------+--------------+ 2225 Table 12: Example of editing a VINT to reduce VINT_DATA 2226 length by one octet. 2228 This method is RECOMMENDED when the Element Data is reduced by a 2229 single octet; for reductions by two or more octets it is RECOMMENDED 2230 to fill the freed space with a Void Element. 2232 Note that if the Element Data length needs to be rewritten as 2233 shortened by one octet and the Element Data Size could be rewritten 2234 as a shorter VINT then it is RECOMMENDED to rewrite the Element Data 2235 Size as one octet shorter, shorten the Element Data by one octet, and 2236 follow that Element with a Void Element. For example, Table 13 2237 depicts a String Element that stores an Element ID (3 octets), 2238 Element Data Size (2 octets, but could be rewritten in one octet), 2239 and Element Data (3 octets). If the Element Data is to be rewritten 2240 to a two octet length, then another octet can be taken from Element 2241 Data Size so that there is enough space to add a two octet Void 2242 Element. 2244 +--------+------------+-------------------+--------------+---------+ 2245 | Status | Element ID | Element Data Size | Element Data | Void | 2246 | | | | | Element | 2247 +========+============+===================+==============+=========+ 2248 | Before | 0x3B4040 | 0x4003 | 0x6D6B76 | | 2249 +--------+------------+-------------------+--------------+---------+ 2250 | After | 0x3B4040 | 0x82 | 0x6869 | 0xEC80 | 2251 +--------+------------+-------------------+--------------+---------+ 2253 Table 13: Example of editing a VINT to reduce VINT_DATA length 2254 by more than one octet. 2256 14.1.3. Terminating Element Data 2258 For String Elements and UTF-8 Elements the length of Element Data MAY 2259 be reduced by adding Null Octets to terminate the Element Data (see 2260 Section 13). 2262 In Table 14, a four octets long Element Data is changed to a three 2263 octet long value followed by a Null Octet; the Element Data Size 2264 includes any Null Octets used to terminate Element Data so remains 2265 unchanged. 2267 +-------------+------------+-------------------+--------------+ 2268 | Status | Element ID | Element Data Size | Element Data | 2269 +=============+============+===================+==============+ 2270 | Before edit | 0x3B4040 | 0x84 | 0x65626D6C | 2271 +-------------+------------+-------------------+--------------+ 2272 | After edit | 0x3B4040 | 0x84 | 0x6D6B7600 | 2273 +-------------+------------+-------------------+--------------+ 2275 Table 14: Example of terminating VINT_DATA with a Null 2276 Octet when reducing VINT length during an edit. 2278 Note that this method is NOT RECOMMENDED. For reductions of one 2279 octet, the method for Extending the Element Data Size SHOULD be used. 2280 For reduction by more than one octet, the method for Adding a Void 2281 Element SHOULD be used. 2283 14.2. Considerations when Updating Elements with Cyclic Redundancy 2284 Check (CRC) 2286 If the Element to be changed is a Descendant Element of any Master 2287 Element that contains a CRC-32 Element (see Section 11.3.1) then the 2288 CRC-32 Element MUST be verified before permitting the change. 2289 Additionally the CRC-32 Element value MUST be subsequently updated to 2290 reflect the changed data. 2292 15. Backward and Forward Compatibility 2294 Elements of an EBML format SHOULD be designed with backward and 2295 forward compatibility in mind. 2297 15.1. Backward Compatibility 2299 Backward compatibility of new EBML Elements can be achieved by using 2300 default values for mandatory elements. The default value MUST 2301 represent the state that was assumed for previous versions of the 2302 EBML Schema, without this new EBML Element. If such a state doesn't 2303 make sense for previous versions, then the new EBML Element SHOULD 2304 NOT be mandatory. 2306 Non mandatory EBML Elements can be added in a new EBMLDocTypeVersion. 2307 Since they are not mandatory they won't be found in older versions of 2308 the EBMLDocTypeVersion, just as they might not be found in newer 2309 versions. This causes no compatibility issue. 2311 15.2. Forward Compatibility 2313 EBML Elements MAY be marked as deprecated in a new EBMLDocTypeVersion 2314 using the maxver attribute of the EBML Schema. If such an Element is 2315 found in an EBML Document with newer version of the 2316 EBMLDocTypeVersion it SHOULD be discarded. 2318 16. Security Considerations 2320 EBML itself does not offer any kind of security and does not provide 2321 confidentiality. EBML does not provide any kind of authorization. 2322 EBML only offers marginally useful and effective data integrity 2323 options, such as CRC elements. 2325 Even if the semantic layer offers any kind of encryption, EBML itself 2326 could leak information at both the semantic layer (as declared via 2327 the DocType Element) and within the EBML structure (the presence of 2328 EBML Elements can be derived even with an unknown semantic layer 2329 using a heuristic approach; not without errors, of course, but with a 2330 certain degree of confidence). 2332 An EBML Document that has the following issues may still be handled 2333 by the EBML Reader and the data accepted as such, depending on how 2334 strict the EBML Reader wants to be: 2336 * Invalid Element IDs that are longer than the limit stated in the 2337 EBMLMaxIDLength Element of the EBML Header. 2339 * Invalid Element IDs that are not encoded in the shortest-possible 2340 way. 2342 * Invalid Element Data Size values that are longer than the limit 2343 stated in the EBMLMaxSizeLength Element of the EBML Header. 2345 Element IDs that are unknown to the EBML Reader MAY be accepted as 2346 valid EBML IDs in order to skip such elements. 2348 EBML Elements with a string type may contain extra data after the 2349 first 0x00. These data MUST be discarded according to the Section 13 2350 rules. 2352 An EBML Reader may discard some or all data if the following errors 2353 are found in the EBML Document: 2355 * Invalid Element Data Size values (e.g. extending the length of the 2356 EBML Element beyond the scope of the Parent Element; possibly 2357 triggering access-out-of-bounds issues). 2359 * Very high lengths in order to force out-of-memory situations 2360 resulting in a denial of service, access-out-of-bounds issues etc. 2362 * Missing EBML Elements that are mandatory in a Master Element and 2363 have no declared default value, making the semantic invalid at 2364 that Master Element level. 2366 * Usage of invalid UTF-8 encoding in EBML Elements of UTF-8 type 2367 (e.g. in order to trigger access-out-of-bounds or buffer overflow 2368 issues). 2370 * Usage of invalid data in EBML Elements with a date type, 2371 triggering bogus date accesses. 2373 Side channel attacks could exploit: 2375 * The semantic equivalence of the same string stored in a String 2376 Element or UTF-8 Element with and without zero-bit padding, making 2377 comparison at the semantic level invalid. 2379 * The semantic equivalence of VINT_DATA within Element Data Size 2380 with two different lengths due to left-padding zero bits, making 2381 comparison at the semantic level invalid. 2383 * Data contained within a Master Element which is not itself part of 2384 a Child Element can trigger incorrect parsing behavior in EBML 2385 Readers. 2387 * Extraneous copies of Identically Recurring Element, making parsing 2388 unnecessarily slow to the point of not being usable. 2390 * Copies of Identically Recurring Element within a Parent Element 2391 that contain invalid CRC-32 Elements. EBML Readers not checking 2392 the CRC-32 might use the version of the element with mismatching 2393 CRC-32. 2395 * Use of Void Elements which could be used to hide content or create 2396 bogus resynchronization points seen by some EBML Reader and not 2397 others. 2399 17. IANA Considerations 2401 17.1. CELLAR EBML Element ID Registry 2403 This document creates a new IANA Registry called "CELLAR EBML Element 2404 ID Registry". 2406 Element IDs are described in section Element ID. Element IDs are 2407 encoded using the VINT mechanism described in section Section 4 can 2408 be between one and five octets long. Five octet long Element IDs are 2409 possible only if declared in the header. 2411 This IANA Registry only applies to Elements that can be contained in 2412 the EBML Header, thus including Global Elements. Elements only found 2413 in the EBML Body have their own set of independent Element IDs and 2414 are not part of this IANA Registry. 2416 The VINT Data value of one-octet Element IDs MUST be between 0x01 and 2417 0x7E. These items are valuable because they are short, and need to 2418 be used for commonly repeated elements. Values from 1 to 126 are to 2419 be allocated according to the "RFC Required" policy [RFC8126]. 2421 The VINT Data value of two-octet Element IDs MUST be between 0x007F 2422 and 0x3FFE. Numbers are to be allocated within this range according 2423 to the "Specification Required" policy [RFC8126]. 2425 The numbers 0x3FFF and 0x4000 are RESERVED. 2427 The VINT Data value of three-octet Element IDs MUST be between 0x4001 2428 and 0x1FFFFE. Numbers may be allocated within this range according 2429 to the "First Come First Served" policy [RFC8126]. 2431 The numbers 0x1FFFFF and 0x200000 are RESERVED. 2433 Four-octet Element IDs are numbers between 0x101FFFFF and 0x1FFFFFFE. 2434 Four-octet Element IDs are somewhat special in that they are useful 2435 for resynchronizing to major structures in the event of data 2436 corruption or loss. As such four-octet Element IDs are split into 2437 two categories. Four-octet Element IDs whose lower three octets (as 2438 encoded) would make printable 7-bit ASCII values (0x20 to 0x7E, 2439 inclusive) MUST be allocated by the "Specification Required" policy. 2440 Sequential allocation of values is not required: specifications 2441 SHOULD include a specific request, and are encouraged to do early 2442 allocations. 2444 To be clear about the above category: four-octet Element IDs always 2445 start with hex 0x10 to 0x1F, and that octet may be chosen so that the 2446 entire number has some desirable property, such as a specific CRC. 2447 The other three octets, when ALL having values between 0x21 (33, 2448 ASCII !) and 0x7E (126, ASCII ~), fall into this category. 2450 Other four-octet Element IDs may be allocated by the "First Come 2451 First Served" policy. 2453 The numbers 0xFFFFFFF and 0x1000000 are RESERVED. 2455 Five octet Element IDs (values from 0x10000001 upwards) are RESERVED 2456 according to the "Experimental Use" policy [RFC8126]: they may be 2457 used by anyone at any time, but there is no coordination. 2459 ID Values found in this document are assigned as initial values as 2460 follows: 2462 +------------+-------------------------+-----------------+ 2463 | ID | Element Name | Reference | 2464 +============+=========================+=================+ 2465 | 0x1A45DFA3 | EBML | Described in | 2466 | | | Section 11.2.1 | 2467 +------------+-------------------------+-----------------+ 2468 | 0x4286 | EBMLVersion | Described in | 2469 | | | Section 11.2.2 | 2470 +------------+-------------------------+-----------------+ 2471 | 0x42F7 | EBMLReadVersion | Described in | 2472 | | | Section 11.2.3 | 2473 +------------+-------------------------+-----------------+ 2474 | 0x42F2 | EBMLMaxIDLength | Described in | 2475 | | | Section 11.2.4 | 2476 +------------+-------------------------+-----------------+ 2477 | 0x42F3 | EBMLMaxSizeLength | Described in | 2478 | | | Section 11.2.5 | 2479 +------------+-------------------------+-----------------+ 2480 | 0x4282 | DocType | Described in | 2481 | | | Section 11.2.6 | 2482 +------------+-------------------------+-----------------+ 2483 | 0x4287 | DocTypeVersion | Described in | 2484 | | | Section 11.2.7 | 2485 +------------+-------------------------+-----------------+ 2486 | 0x4285 | DocTypeReadVersion | Described in | 2487 | | | Section 11.2.8 | 2488 +------------+-------------------------+-----------------+ 2489 | 0x4281 | DocTypeExtension | Described in | 2490 | | | Section 11.2.9 | 2491 +------------+-------------------------+-----------------+ 2492 | 0x4283 | DocTypeExtensionName | Described in | 2493 | | | Section 11.2.10 | 2494 +------------+-------------------------+-----------------+ 2495 | 0x4284 | DocTypeExtensionVersion | Described in | 2496 | | | Section 11.2.11 | 2497 +------------+-------------------------+-----------------+ 2498 | 0xBF | CRC-32 | Described in | 2499 | | | Section 11.3.1 | 2500 +------------+-------------------------+-----------------+ 2501 | 0xEC | Void | Described in | 2502 | | | Section 11.3.2 | 2503 +------------+-------------------------+-----------------+ 2505 Table 15: IDs and Names for EBML Elements assigned by 2506 this document. 2508 17.2. CELLAR EBML DocType Registry 2510 This document creates a new IANA Registry called "CELLAR EBML DocType 2511 Registry". 2513 To register a new DocType in this registry one needs a DocType name, 2514 a Description of the DocType, a Change Controller (IESG or email of 2515 registrant) and an optional Reference to a document describing the 2516 DocType. 2518 DocType values are described in Section 11.1.3.1. DocTypes are ASCII 2519 strings, defined in Section 7.4, which label the official name of the 2520 EBML Document Type. The strings may be allocated according to the 2521 "First Come First Served" policy. 2523 The use of ASCII corresponds to the types and code already in use, 2524 the value is not meant to be visible to the user. 2526 DocType string values of "matroska" and "webm" are RESERVED to the 2527 IETF for future use. These can be assigned via the "IESG Approval" 2528 or "RFC Required" policies [RFC8126]. 2530 18. Normative References 2532 [RFC0020] Cerf, V., "ASCII format for network interchange", STD 80, 2533 RFC 20, DOI 10.17487/RFC0020, October 1969, 2534 . 2536 [RFC7405] Kyzivat, P., "Case-Sensitive String Support in ABNF", 2537 RFC 7405, DOI 10.17487/RFC7405, December 2014, 2538 . 2540 [W3C.REC-xmlschema-0-20041028] 2541 Fallside, D. and P. Walmsley, "XML Schema Part 0: Primer 2542 Second Edition", World Wide Web Consortium Recommendation 2543 REC-xmlschema-0-20041028, 28 October 2004, 2544 . 2546 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 2547 Specifications: ABNF", STD 68, RFC 5234, 2548 DOI 10.17487/RFC5234, January 2008, 2549 . 2551 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2552 Requirement Levels", BCP 14, RFC 2119, 2553 DOI 10.17487/RFC2119, March 1997, 2554 . 2556 [IEEE.754.1985] 2557 Institute of Electrical and Electronics Engineers, 2558 "Standard for Binary Floating-Point Arithmetic", August 2559 1985. 2561 [RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: 2562 Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002, 2563 . 2565 [ITU.V42.1994] 2566 International Telecommunications Union, "Error-correcting 2567 Procedures for DCEs Using Asynchronous-to-Synchronous 2568 Conversion", 1994. 2570 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 2571 10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November 2572 2003, . 2574 [ISO.3309.1979] 2575 International Organization for Standardization, "Data 2576 communication - High-level data link control procedures - 2577 Frame structure", 1979. 2579 [W3C.SPSD-xhtml-basic-20180327] 2580 McCarron, S., "XHTML(tm) Basic 1.1 - Second Edition", 27 2581 March 2018. 2583 [RFC5646] Phillips, A., Ed. and M. Davis, Ed., "Tags for Identifying 2584 Languages", BCP 47, RFC 5646, DOI 10.17487/RFC5646, 2585 September 2009, . 2587 [ISO.9899.2011] 2588 International Organization for Standardization, 2589 "Programming languages - C", 2011. 2591 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2592 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2593 May 2017, . 2595 [W3C.REC-xml-20081126] 2596 Bray, T., Paoli, J., Sperberg-McQueen, M., Maler, E., and 2597 F. Yergeau, "Extensible Markup Language (XML) 1.0 (Fifth 2598 Edition)", World Wide Web Consortium Recommendation REC- 2599 xml-20081126, 26 November 2008, 2600 . 2602 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 2603 Writing an IANA Considerations Section in RFCs", BCP 26, 2604 RFC 8126, DOI 10.17487/RFC8126, June 2017, 2605 . 2607 19. Informative References 2609 [W3C.REC-xpath-19991116] 2610 Clark, J. and S. DeRose, "XML Path Language (XPath) 2611 Version 1.0", World Wide Web Consortium Recommendation 2612 REC-xpath-19991116, 16 November 1999, 2613 . 2615 [Matroska] IETF, "Matroska Specifications", 2019, 2616 . 2619 [WebM] The WebM Project, "WebM Container Guidelines", November 2620 2017, . 2622 Authors' Addresses 2624 Steve Lhomme 2626 Email: slhomme@matroska.org 2628 Dave Rice 2630 Email: dave@dericed.com 2632 Moritz Bunkus 2634 Email: moritz@bunkus.org