idnits 2.17.1 draft-ietf-cellar-ebml-16.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 (22 December 2019) is 1586 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 1012, but not defined == Missing Reference: 'PathMinOccurrence' is mentioned on line 1023, but not defined == Missing Reference: 'PathMaxOccurrence' is mentioned on line 1023, but not defined -- Possible downref: Non-RFC (?) normative reference: ref. 'ITU.V42.1994' -- Possible downref: Non-RFC (?) normative reference: ref. 'IEEE.754.1985' 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: 24 June 2020 6 M. Bunkus 7 22 December 2019 9 Extensible Binary Meta Language 10 draft-ietf-cellar-ebml-16 12 Abstract 14 This document defines the Extensible Binary Meta Language (EBML) 15 format as a binary container format designed for audio/video storage. 16 EBML is designed as a binary equivalent to XML and uses a storage- 17 efficient approach to build nested Elements with identifiers, 18 lengths, and values. Similar to how an XML Schema defines the 19 structure and semantics of an XML Document, this document defines how 20 EBML Schemas are created to convey the semantics of an EBML Document. 22 Status of This Memo 24 This Internet-Draft is submitted in full conformance with the 25 provisions of BCP 78 and BCP 79. 27 Internet-Drafts are working documents of the Internet Engineering 28 Task Force (IETF). Note that other groups may also distribute 29 working documents as Internet-Drafts. The list of current Internet- 30 Drafts is at https://datatracker.ietf.org/drafts/current/. 32 Internet-Drafts are draft documents valid for a maximum of six months 33 and may be updated, replaced, or obsoleted by other documents at any 34 time. It is inappropriate to use Internet-Drafts as reference 35 material or to cite them other than as "work in progress." 37 This Internet-Draft will expire on 24 June 2020. 39 Copyright Notice 41 Copyright (c) 2019 IETF Trust and the persons identified as the 42 document authors. All rights reserved. 44 This document is subject to BCP 78 and the IETF Trust's Legal 45 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 46 license-info) in effect on the date of publication of this document. 47 Please review these documents carefully, as they describe your rights 48 and restrictions with respect to this document. Code Components 49 extracted from this document must include Simplified BSD License text 50 as described in Section 4.e of the Trust Legal Provisions and are 51 provided without warranty as described in the Simplified BSD License. 53 Table of Contents 55 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 56 2. Notation and Conventions . . . . . . . . . . . . . . . . . . 4 57 3. Structure . . . . . . . . . . . . . . . . . . . . . . . . . . 6 58 4. Variable Size Integer . . . . . . . . . . . . . . . . . . . . 7 59 4.1. VINT_WIDTH . . . . . . . . . . . . . . . . . . . . . . . 7 60 4.2. VINT_MARKER . . . . . . . . . . . . . . . . . . . . . . . 7 61 4.3. VINT_DATA . . . . . . . . . . . . . . . . . . . . . . . . 7 62 4.4. VINT Examples . . . . . . . . . . . . . . . . . . . . . . 8 63 5. Element ID . . . . . . . . . . . . . . . . . . . . . . . . . 9 64 6. Element Data Size . . . . . . . . . . . . . . . . . . . . . . 11 65 6.1. Data Size Format . . . . . . . . . . . . . . . . . . . . 11 66 6.2. Unknown Data Size . . . . . . . . . . . . . . . . . . . . 12 67 6.3. Data Size Values . . . . . . . . . . . . . . . . . . . . 14 68 7. EBML Element Types . . . . . . . . . . . . . . . . . . . . . 15 69 7.1. Signed Integer Element . . . . . . . . . . . . . . . . . 15 70 7.2. Unsigned Integer Element . . . . . . . . . . . . . . . . 16 71 7.3. Float Element . . . . . . . . . . . . . . . . . . . . . . 16 72 7.4. String Element . . . . . . . . . . . . . . . . . . . . . 16 73 7.5. UTF-8 Element . . . . . . . . . . . . . . . . . . . . . . 16 74 7.6. Date Element . . . . . . . . . . . . . . . . . . . . . . 17 75 7.7. Master Element . . . . . . . . . . . . . . . . . . . . . 17 76 7.8. Binary Element . . . . . . . . . . . . . . . . . . . . . 17 77 8. EBML Document . . . . . . . . . . . . . . . . . . . . . . . . 18 78 8.1. EBML Header . . . . . . . . . . . . . . . . . . . . . . . 18 79 8.2. EBML Body . . . . . . . . . . . . . . . . . . . . . . . . 18 80 9. EBML Stream . . . . . . . . . . . . . . . . . . . . . . . . . 19 81 10. EBML Versioning . . . . . . . . . . . . . . . . . . . . . . . 19 82 10.1. EBML Header Version . . . . . . . . . . . . . . . . . . 19 83 10.2. EBML Document Version . . . . . . . . . . . . . . . . . 19 84 11. Elements semantic . . . . . . . . . . . . . . . . . . . . . . 19 85 11.1. EBML Schema . . . . . . . . . . . . . . . . . . . . . . 19 86 11.1.1. EBML Schema Example . . . . . . . . . . . . . . . . 20 87 11.1.2. Element . . . . . . . . . . . . . . . . 21 88 11.1.3. Attributes . . . . . . . . . . . . . . 21 89 11.1.4. Element . . . . . . . . . . . . . . . . . 22 90 11.1.5. Attributes . . . . . . . . . . . . . . . . 22 91 11.1.6. Element . . . . . . . . . . . . . . 30 92 11.1.7. Attributes . . . . . . . . . . . . . 30 93 11.1.8. Element . . . . . . . . . . . 31 94 11.1.9. Attributes . . . . . . . . . . 31 95 11.1.10. Element . . . . . . . . . . . . . . . 33 96 11.1.11. Element . . . . . . . . . . . . . . . . . . . 33 97 11.1.12. Attributes . . . . . . . . . . . . . . . . . 34 98 11.1.13. Element . . . . . . . . . . . . . . . . 34 99 11.1.14. Attributes . . . . . . . . . . . . . . . 34 100 11.1.15. XML Schema for EBML Schema . . . . . . . . . . . . . 35 101 11.1.16. Identically Recurring Elements . . . . . . . . . . . 38 102 11.1.17. Textual expression of floats . . . . . . . . . . . . 39 103 11.1.18. Note on the use of default attributes to define 104 Mandatory EBML Elements . . . . . . . . . . . . . . . 40 105 11.2. EBML Header Elements . . . . . . . . . . . . . . . . . . 40 106 11.2.1. EBML Element . . . . . . . . . . . . . . . . . . . . 41 107 11.2.2. EBMLVersion Element . . . . . . . . . . . . . . . . 41 108 11.2.3. EBMLReadVersion Element . . . . . . . . . . . . . . 41 109 11.2.4. EBMLMaxIDLength Element . . . . . . . . . . . . . . 42 110 11.2.5. EBMLMaxSizeLength Element . . . . . . . . . . . . . 42 111 11.2.6. DocType Element . . . . . . . . . . . . . . . . . . 43 112 11.2.7. DocTypeVersion Element . . . . . . . . . . . . . . . 43 113 11.2.8. DocTypeReadVersion Element . . . . . . . . . . . . . 44 114 11.2.9. DocTypeExtension Element . . . . . . . . . . . . . . 44 115 11.2.10. DocTypeExtensionName Element . . . . . . . . . . . . 45 116 11.2.11. DocTypeExtensionVersion Element . . . . . . . . . . 45 117 11.3. Global Elements . . . . . . . . . . . . . . . . . . . . 46 118 11.3.1. CRC-32 Element . . . . . . . . . . . . . . . . . . . 46 119 11.3.2. Void Element . . . . . . . . . . . . . . . . . . . . 47 120 12. Considerations for Reading EBML Data . . . . . . . . . . . . 47 121 13. Terminating Elements . . . . . . . . . . . . . . . . . . . . 48 122 14. Guidelines for Updating Elements . . . . . . . . . . . . . . 49 123 14.1. Reducing a Element Data in Size . . . . . . . . . . . . 49 124 14.1.1. Adding a Void Element . . . . . . . . . . . . . . . 49 125 14.1.2. Extending the Element Data Size . . . . . . . . . . 49 126 14.1.3. Terminating Element Data . . . . . . . . . . . . . . 50 127 14.2. Considerations when Updating Elements with Cyclic 128 Redundancy Check (CRC) . . . . . . . . . . . . . . . . . 51 129 15. Backward and Forward Compatibility . . . . . . . . . . . . . 51 130 15.1. Backward Compatibility . . . . . . . . . . . . . . . . . 51 131 15.2. Forward Compatibility . . . . . . . . . . . . . . . . . 52 132 16. Security Considerations . . . . . . . . . . . . . . . . . . . 52 133 17. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 53 134 17.1. EBML Element ID Registry . . . . . . . . . . . . . . . . 53 135 17.2. EBML DocType Registry . . . . . . . . . . . . . . . . . 57 136 18. Normative References . . . . . . . . . . . . . . . . . . . . 57 137 19. Informative References . . . . . . . . . . . . . . . . . . . 59 138 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 59 140 1. Introduction 142 EBML, short for Extensible Binary Meta Language, specifies a binary 143 and octet (byte) aligned format inspired by the principle of XML (a 144 framework for structuring data). 146 The goal of this document is to define a generic, binary, space- 147 efficient format that can be used to define more complex formats 148 using an EBML Schema. EBML is used by the multimedia container, 149 Matroska [Matroska]. The applicability of EBML for other use cases 150 is beyond the scope of this document. 152 The definition of the EBML format recognizes the idea behind HTML and 153 XML as a good one: separate structure and semantics allowing the same 154 structural layer to be used with multiple, possibly widely differing 155 semantic layers. Except for the EBML Header and a few Global 156 Elements this specification does not define particular EBML format 157 semantics; however this specification is intended to define how other 158 EBML-based formats can be defined, such as the audio-video container 159 formats Matroska and WebM [WebM]. 161 EBML uses a simple approach of building Elements upon three pieces of 162 data (tag, length, and value) as this approach is well known, easy to 163 parse, and allows selective data parsing. The EBML structure 164 additionally allows for hierarchical arrangement to support complex 165 structural formats in an efficient manner. 167 A typical EBML file has the following structure: 169 EBML Header (master) 170 + DocType (string) 171 + DocTypeVersion (unsigned integer) 172 EBML Body Root (master) 173 + ElementA (utf-8) 174 + Parent (master) 175 + ElementB (integer) 176 + Parent (master) 177 + ElementB (integer) 179 2. Notation and Conventions 181 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 182 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 183 "OPTIONAL" in this document are to be interpreted as described in BCP 184 14 [RFC2119] [RFC8174] when, and only when, they appear in all 185 capitals, as shown here. 187 This document defines specific terms in order to define the format 188 and application of "EBML". Specific terms are defined below: 190 "EBML": Extensible Binary Meta Language 192 "EBML Document Type": A name provided by an "EBML Schema" to 193 designate a particular implementation of "EBML" for a data format 194 (e.g.: matroska and webm). 196 "EBML Schema": A standardized definition for the structure of an 197 "EBML Document Type". 199 "EBML Document": A datastream comprised of only two components, an 200 "EBML Header" and an "EBML Body". 202 "EBML Reader": A data parser that interprets the semantics of an 203 "EBML Document" and creates a way for programs to use "EBML". 205 "EBML Stream": A file that consists of one or more "EBML Documents" 206 that are concatenated together. 208 "EBML Header": A declaration that provides processing instructions 209 and identification of the "EBML Body". The "EBML Header" is 210 analogous to an XML Declaration [W3C.REC-xml-20081126] (see section 211 2.8 on Prolog and Document Type Declaration). 213 "EBML Body": All data of an "EBML Document" following the "EBML 214 Header". 216 "Variable Size Integer": A compact variable-length binary value which 217 defines its own length. 219 "VINT": Also known as "Variable Size Integer". 221 "EBML Element": A foundation block of data that contains three parts: 222 an "Element ID", an "Element Data Size", and "Element Data". 224 "Element ID": The "Element ID" is a binary value, encoded as a 225 "Variable Size Integer", used to uniquely identify a defined "EBML 226 Element" within a specific "EBML Schema". 228 "Element Data Size": An expression, encoded as a "Variable Size 229 Integer", of the length in octets of "Element Data". 231 "VINTMAX": The maximum possible value that can be stored as "Element 232 Data Size". 234 "Unknown-Sized Element": An "Element" with an unknown "Element Data 235 Size". 237 "Element Data": The value(s) of the "EBML Element" which is 238 identified by its "Element ID" and "Element Data Size". The form of 239 the "Element Data" is defined by this document and the corresponding 240 "EBML Schema" of the Element's "EBML Document Type". 242 "Root Level": The starting level in the hierarchy of an "EBML 243 Document". 245 "Root Element": A mandatory, non-repeating "EBML Element" which 246 occurs at the top level of the path hierarchy within an "EBML Body" 247 and contains all other "EBML Elements" of the "EBML Body", excepting 248 optional "Void Elements". 250 "Top-Level Element": An "EBML Element" defined to only occur as a 251 "Child Element" of the "Root Element". 253 "Master Element": The "Master Element" contains zero, one, or many 254 other "EBML Elements". 256 "Child Element": A "Child Element" is a relative term to describe the 257 "EBML Elements" immediately contained within a "Master Element". 259 "Parent Element": A relative term to describe the "Master Element" 260 which contains a specified element. For any specified "EBML Element" 261 that is not at "Root Level", the "Parent Element" refers to the 262 "Master Element" in which that "EBML Element" is contained. 264 "Descendant Element": A relative term to describe any "EBML Elements" 265 contained within a "Master Element", including any of the "Child 266 Elements" of its "Child Elements", and so on. 268 "Void Element": A "Void Element" is an "Element" used to overwrite 269 data or reserve space within a "Master Element" for later use. 271 "Element Name": The human-readable name of the "EBML Element". 273 "Element Path": The hierarchy of "Parent Element" where the "EBML 274 Element" is expected to be found in the "EBML Body". 276 "Empty Element": An "EBML Element" that has an "Element Data Size" 277 with all "VINT_DATA" bits set to zero, which indicates that the 278 "Element Data" of the "Element" is zero octets in length. 280 3. Structure 282 EBML uses a system of Elements to compose an EBML Document. EBML 283 Elements incorporate three parts: an Element ID, an Element Data 284 Size, and Element Data. The Element Data, which is described by the 285 Element ID, includes either binary data, one or more other EBML 286 Elements, or both. 288 4. Variable Size Integer 290 The Element ID and Element Data Size are both encoded as a Variable 291 Size Integer. The Variable Size Integer is composed of a VINT_WIDTH, 292 VINT_MARKER, and VINT_DATA, in that order. Variable Size Integers 293 MUST left-pad the VINT_DATA value with zero bits so that the whole 294 Variable Size Integer is octet-aligned. Variable Size Integer will 295 be referred to as VINT for shorthand. 297 4.1. VINT_WIDTH 299 Each Variable Size Integer starts with a VINT_WIDTH followed by a 300 VINT_MARKER. VINT_WIDTH is a sequence of zero or more bits of value 301 "0", and is terminated by the VINT_MARKER, which is a single bit of 302 value "1". The total length in bits of both VINT_WIDTH and 303 VINT_MARKER is the total length in octets in of the Variable Size 304 Integer. 306 The single bit "1" starts a Variable Size Integer with a length of 307 one octet. The sequence of bits "01" starts a Variable Size Integer 308 with a length of two octets. "001" starts a Variable Size Integer 309 with a length of three octets, and so on, with each additional 0-bit 310 adding one octet to the length of the Variable Size Integer. 312 4.2. VINT_MARKER 314 The VINT_MARKER serves as a separator between the VINT_WIDTH and 315 VINT_DATA. Each Variable Size Integer MUST contain exactly one 316 VINT_MARKER. The VINT_MARKER is one bit in length and contain a bit 317 with a value of one. The first bit with a value of one within the 318 Variable Size Integer is the VINT_MARKER. 320 4.3. VINT_DATA 322 The VINT_DATA portion of the Variable Size Integer includes all data 323 that follows (but not including) the VINT_MARKER until end of the 324 Variable Size Integer whose length is derived from the VINT_WIDTH. 325 The bits required for the VINT_WIDTH and the VINT_MARKER use one out 326 of every eight bits of the total length of the Variable Size Integer. 327 Thus a Variable Size Integer of 1 octet length supplies 7 bits for 328 VINT_DATA, a 2 octet length supplies 14 bits for VINT_DATA, and a 3 329 octet length supplies 21 bits for VINT_DATA. If the number of bits 330 required for VINT_DATA are less than the bit size of VINT_DATA, then 331 VINT_DATA MUST be zero-padded to the left to a size that fits. The 332 VINT_DATA value MUST be expressed as a big-endian unsigned integer. 334 4.4. VINT Examples 336 Table 1 shows examples of Variable Size Integers with lengths from 1 337 to 5 octets. The Usable Bits column refers to the number of bits 338 that can be used in the VINT_DATA. The Representation column depicts 339 a binary expression of Variable Size Integers where VINT_WIDTH is 340 depicted by "0", the VINT_MARKER as "1", and the VINT_DATA as "x". 342 +--------------+-------------+-------------------------------+ 343 | Octet Length | Usable Bits | Representation | 344 +==============+=============+===============================+ 345 | 1 | 7 | 1xxx xxxx | 346 +--------------+-------------+-------------------------------+ 347 | 2 | 14 | 01xx xxxx xxxx xxxx | 348 +--------------+-------------+-------------------------------+ 349 | 3 | 21 | 001x xxxx xxxx xxxx xxxx xxxx | 350 +--------------+-------------+-------------------------------+ 351 | 4 | 28 | 0001 xxxx xxxx xxxx xxxx xxxx | 352 | | | xxxx xxxx | 353 +--------------+-------------+-------------------------------+ 354 | 5 | 35 | 0000 1xxx xxxx xxxx xxxx xxxx | 355 | | | xxxx xxxx xxxx xxxx | 356 +--------------+-------------+-------------------------------+ 358 Table 1: VINT examples depicting usable bits 360 A Variable Size Integer may be rendered at octet lengths larger than 361 needed to store the data in order to facilitate overwriting it at a 362 later date, e.g. when its final size isn't known in advance. In 363 Table 2 an integer "2" (with a corresponding binary value of 0b10) is 364 shown encoded as different Variable Size Integers with lengths from 365 one octet to four octets. All four encoded examples have identical 366 semantic meaning though the VINT_WIDTH and the padding of the 367 VINT_DATA vary. 369 +---------+--------------+---------------------+--------------------+ 370 | Integer | Octet | As Represented in | As Represented in | 371 | | Length | VINT (binary) | VINT (hexadecimal) | 372 +=========+==============+=====================+====================+ 373 | 2 | 1 | 1000 0010 | 0x82 | 374 +---------+--------------+---------------------+--------------------+ 375 | 2 | 2 | 0100 0000 0000 0010 | 0x4002 | 376 +---------+--------------+---------------------+--------------------+ 377 | 2 | 3 | 0010 0000 0000 0000 | 0x200002 | 378 | | | 0000 0010 | | 379 +---------+--------------+---------------------+--------------------+ 380 | 2 | 4 | 0001 0000 0000 0000 | 0x10000002 | 381 | | | 0000 0000 0000 0010 | | 382 +---------+--------------+---------------------+--------------------+ 384 Table 2: VINT examples depicting the same integer value rendered 385 at different VINT lengths 387 5. Element ID 389 An Element ID is a Variable Size Integer. By default, Element IDs 390 are from one octet to four octets in length, although Element IDs of 391 greater lengths MAY be used if the EBMLMaxIDLength Element of the 392 EBML Header is set to a value greater than four (see Section 11.2.4). 393 The bits of the VINT_DATA component of the Element ID MUST NOT be all 394 "0" values or all "1" values. The VINT_DATA component of the Element 395 ID MUST be encoded at the shortest valid length. For example, an 396 Element ID with binary encoding of "1011 1111" is valid, whereas an 397 Element ID with binary encoding of "0100 0000 0011 1111" stores a 398 semantically equal VINT_DATA but is invalid because a shorter VINT 399 encoding is possible. Additionally, an Element ID with binary 400 encoding of "1111 1111" is invalid since the VINT_DATA section is set 401 to all one values, whereas an Element ID with binary encoding of 402 "0100 0000 0111 1111" stores a semantically equal VINT_DATA and is 403 the shortest possible VINT encoding. 405 Table 3 details these specific examples further: 407 +------------+-------------+----------------+--------------------+ 408 | VINT_WIDTH | VINT_MARKER | VINT_DATA | Element ID Status | 409 +============+=============+================+====================+ 410 | | 1 | 0000000 | Invalid: VINT_DATA | 411 | | | | MUST NOT be set to | 412 | | | | all 0 | 413 +------------+-------------+----------------+--------------------+ 414 | 0 | 1 | 00000000000000 | Invalid: VINT_DATA | 415 | | | | MUST NOT be set to | 416 | | | | all 0 | 417 +------------+-------------+----------------+--------------------+ 418 | | 1 | 0000001 | Valid | 419 +------------+-------------+----------------+--------------------+ 420 | 0 | 1 | 00000000000001 | Invalid: A shorter | 421 | | | | VINT_DATA encoding | 422 | | | | is available. | 423 +------------+-------------+----------------+--------------------+ 424 | | 1 | 0111111 | Valid | 425 +------------+-------------+----------------+--------------------+ 426 | 0 | 1 | 00000000111111 | Invalid: A shorter | 427 | | | | VINT_DATA encoding | 428 | | | | is available. | 429 +------------+-------------+----------------+--------------------+ 430 | | 1 | 1111111 | Invalid: VINT_DATA | 431 | | | | MUST NOT be set to | 432 | | | | all 1 | 433 +------------+-------------+----------------+--------------------+ 434 | 0 | 1 | 00000001111111 | Valid | 435 +------------+-------------+----------------+--------------------+ 437 Table 3: Examples of valid and invalid Element IDs 439 The range and count of possible Element IDs are determined by their 440 octet length. Examples of this are provided in Table 4. 442 +-------------------------+----------------+-----------------+ 443 | Element ID Octet Length | Range of Valid | Number of Valid | 444 | | Element IDs | Element IDs | 445 +=========================+================+=================+ 446 | 1 | 0x81 - 0xFE | 126 | 447 +-------------------------+----------------+-----------------+ 448 | 2 | 0x407F - | 16,256 | 449 | | 0x7FFE | | 450 +-------------------------+----------------+-----------------+ 451 | 3 | 0x203FFF - | 2,080,768 | 452 | | 0x3FFFFE | | 453 +-------------------------+----------------+-----------------+ 454 | 4 | 0x101FFFFF - | 268,338,304 | 455 | | 0x1FFFFFFE | | 456 +-------------------------+----------------+-----------------+ 458 Table 4: Examples of count and range for Element IDs at 459 various octet lengths 461 6. Element Data Size 463 6.1. Data Size Format 465 The Element Data Size expresses the length in octets of Element Data. 466 The Element Data Size itself is encoded as a Variable Size Integer. 467 By default, Element Data Sizes can be encoded in lengths from one 468 octet to eight octets, although Element Data Sizes of greater lengths 469 MAY be used if the octet length of the longest Element Data Size of 470 the EBML Document is declared in the EBMLMaxSizeLength Element of the 471 EBML Header (see Section 11.2.5). Unlike the VINT_DATA of the 472 Element ID, the VINT_DATA component of the Element Data Size is not 473 mandated to be encoded at the shortest valid length. For example, an 474 Element Data Size with binary encoding of 1011 1111 or a binary 475 encoding of 0100 0000 0011 1111 are both valid Element Data Sizes and 476 both store a semantically equal value (both 0b00000000111111 and 477 0b0111111, the VINT_DATA sections of the examples, represent the 478 integer 63). 480 Although an Element ID with all VINT_DATA bits set to zero is 481 invalid, an Element Data Size with all VINT_DATA bits set to zero is 482 allowed for EBML Element Types which do not mandate a non-zero length 483 (see Section 7). An Element Data Size with all VINT_DATA bits set to 484 zero indicates that the Element Data is zero octets in length. Such 485 an EBML Element is referred to as an Empty Element. If an Empty 486 Element has a default value declared then the EBML Reader MUST 487 interpret the value of the Empty Element as the default value. If an 488 Empty Element has no default value declared then the EBML Reader MUST 489 use the value of the Empty Element for the corresponding EBML Element 490 Type of the Element ID, 0 for numbers and an empty string for 491 strings. 493 6.2. Unknown Data Size 495 An Element Data Size with all VINT_DATA bits set to one is reserved 496 as an indicator that the size of the EBML Element is unknown. The 497 only reserved value for the VINT_DATA of Element Data Size is all 498 bits set to one. An EBML Element with an unknown Element Data Size 499 is referred to as an Unknown-Sized Element. Only a Master Element is 500 allowed to be of unknown size, and it can only be so if the 501 unknownsizeallowed attribute of its EBML Schema is set to true (see 502 Section 11.1.5.10). 504 The use of Unknown-Sized Elements allows for an EBML Element to be 505 written and read before the size of the EBML Element is known. 506 Unknown-Sized Elements MUST only be used if the Element Data Size is 507 not known before the Element Data is written, such as in some cases 508 of data streaming. The end of an Unknown-Sized Element is determined 509 by whichever comes first: 511 * Any EBML Element that is a valid Parent Element of the Unknown- 512 Sized Element according to the EBML Schema, Global Elements 513 excluded. 515 * Any valid EBML Element according to the EBML Schema, Global 516 Elements excluded, that is not a Descendant Element of the 517 Unknown-Sized Element but share a common direct parent, such as a 518 Top-Level Element. 520 * Any EBML Element that is a valid Root Element according to the 521 EBML Schema, Global Elements excluded. 523 * The end of the Parent Element with a known size has been reached. 525 * The end of the EBML Document, either when reaching the end of the 526 file or because a new EBML Header started. 528 Consider an Unknown-Sized Element which EBML path is 529 "\root\level1\level2\elt". When reading a new Element ID, assuming 530 the EBML Path of that new Element is valid, here are some possible 531 and impossible ways that this new Element is ending "elt": 533 +------------------------------------+----------------------------+ 534 | EBML Path of new element | Status | 535 +====================================+============================+ 536 | "\root\level1\level2" | Ends the Unknown-Sized | 537 | | Element, as it is a new | 538 | | Parent Element | 539 +------------------------------------+----------------------------+ 540 | "\root\level1" | Ends the Unknown-Sized | 541 | | Element, as it is a new | 542 | | Parent Element | 543 +------------------------------------+----------------------------+ 544 | "\root" | Ends the Unknown-Sized | 545 | | Element, as it is a new | 546 | | Root Element | 547 +------------------------------------+----------------------------+ 548 | "\root2" | Ends the Unknown-Sized | 549 | | Element, as it is a new | 550 | | Root Element | 551 +------------------------------------+----------------------------+ 552 | "\root\level1\level2\other" | Ends the Unknown-Sized | 553 | | Element, as they share the | 554 | | same parent | 555 +------------------------------------+----------------------------+ 556 | "\root\level1\level2\elt" | Ends the Unknown-Sized | 557 | | Element, as they share the | 558 | | same parent | 559 +------------------------------------+----------------------------+ 560 | "\root\level1\level2\elt\inside" | Doesn't end the Unknown- | 561 | | Sized Element, it's a | 562 | | child of "elt" | 563 +------------------------------------+----------------------------+ 564 | "\root\level1\level2\elt\" | Global Element is valid, | 565 | | it's a child of "elt" | 566 +------------------------------------+----------------------------+ 567 | "\root\level1\level2\" | Global Element cannot be | 568 | | assumed to have this path, | 569 | | while parsing "elt" it can | 570 | | only be a child of "elt" | 571 +------------------------------------+----------------------------+ 573 Table 5: Examples of determining the end of an Unknown-Sized 574 Element 576 6.3. Data Size Values 578 For Element Data Sizes encoded at octet lengths from one to eight, 579 Table 6 depicts the range of possible values that can be encoded as 580 an Element Data Size. An Element Data Size with an octet length of 8 581 is able to express a size of 2^56-2 or 72,057,594,037,927,934 octets 582 (or about 72 petabytes). The maximum possible value that can be 583 stored as Element Data Size is referred to as VINTMAX. 585 +--------------+----------------------+ 586 | Octet Length | Possible Value Range | 587 +==============+======================+ 588 | 1 | 0 to 2^7 - 2 | 589 +--------------+----------------------+ 590 | 2 | 0 to 2^14 - 2 | 591 +--------------+----------------------+ 592 | 3 | 0 to 2^21 - 2 | 593 +--------------+----------------------+ 594 | 4 | 0 to 2^28 - 2 | 595 +--------------+----------------------+ 596 | 5 | 0 to 2^35 - 2 | 597 +--------------+----------------------+ 598 | 6 | 0 to 2^42 - 2 | 599 +--------------+----------------------+ 600 | 7 | 0 to 2^49 - 2 | 601 +--------------+----------------------+ 602 | 8 | 0 to 2^56 - 2 | 603 +--------------+----------------------+ 605 Table 6: Possible range of values 606 that can be stored in VINTs by 607 octet length. 609 If the length of Element Data equals 2^(n*7)-1 then the octet length 610 of the Element Data Size MUST be at least n+1. This rule prevents an 611 Element Data Size from being expressed as the unknown size value. 612 Table 7 clarifies this rule by showing a valid and invalid expression 613 of an Element Data Size with a VINT_DATA of 127 (which is equal to 614 2^(1*7)-1) and 16,383 (which is equal to 2^((2*7)-1).) 615 +------------+-------------+-----------------------+--------------+ 616 | VINT_WIDTH | VINT_MARKER | VINT_DATA | Element Data | 617 | | | | Size Status | 618 +============+=============+=======================+==============+ 619 | | 1 | 1111111 | Reserved | 620 | | | | (meaning | 621 | | | | Unknown) | 622 +------------+-------------+-----------------------+--------------+ 623 | 0 | 1 | 00000001111111 | Valid | 624 | | | | (meaning 127 | 625 | | | | octets) | 626 +------------+-------------+-----------------------+--------------+ 627 | 00 | 1 | 000000000000001111111 | Valid | 628 | | | | (meaning 127 | 629 | | | | octets) | 630 +------------+-------------+-----------------------+--------------+ 631 | 0 | 1 | 11111111111111 | Reserved | 632 | | | | (meaning | 633 | | | | Unknown) | 634 +------------+-------------+-----------------------+--------------+ 635 | 00 | 1 | 000000011111111111111 | Valid | 636 | | | | (16,383 | 637 | | | | octets) | 638 +------------+-------------+-----------------------+--------------+ 640 Table 7: Demonstration of VINT_DATA reservation for VINTs of 641 unknown size. 643 7. EBML Element Types 645 EBML Elements are defined by an EBML Schema (see Section 11.1) which 646 MUST declare one of the following EBML Element Types for each EBML 647 Element. An EBML Element Type defines a concept of storing data 648 within an EBML Element that describes such characteristics as length, 649 endianness, and definition. 651 EBML Elements which are defined as a Signed Integer Element, Unsigned 652 Integer Element, Float Element, or Date Element use big endian 653 storage. 655 7.1. Signed Integer Element 657 A Signed Integer Element MUST declare a length from zero to eight 658 octets. If the EBML Element is not defined to have a default value, 659 then a Signed Integer Element with a zero-octet length represents an 660 integer value of zero. 662 A Signed Integer Element stores an integer (meaning that it can be 663 written without a fractional component) which could be negative, 664 positive, or zero. Signed Integers are stored with two's complement 665 notation with the leftmost bit being the sign bit. Because EBML 666 limits Signed Integers to 8 octets in length a Signed Integer Element 667 stores a number from -9,223,372,036,854,775,808 to 668 +9,223,372,036,854,775,807. 670 7.2. Unsigned Integer Element 672 An Unsigned Integer Element MUST declare a length from zero to eight 673 octets. If the EBML Element is not defined to have a default value, 674 then an Unsigned Integer Element with a zero-octet length represents 675 an integer value of zero. 677 An Unsigned Integer Element stores an integer (meaning that it can be 678 written without a fractional component) which could be positive or 679 zero. Because EBML limits Unsigned Integers to 8 octets in length an 680 Unsigned Integer Element stores a number from 0 to 681 18,446,744,073,709,551,615. 683 7.3. Float Element 685 A Float Element MUST declare a length of either zero octet (0 bit), 686 four octets (32 bit) or eight octets (64 bit). If the EBML Element 687 is not defined to have a default value, then a Float Element with a 688 zero-octet length represents a numerical value of zero. 690 A Float Element stores a floating-point number in the 32-bit and 691 64-bit binary interchange format as defined in [IEEE.754.1985]. 693 7.4. String Element 695 A String Element MUST declare a length in octets from zero to 696 VINTMAX. If the EBML Element is not defined to have a default value, 697 then a String Element with a zero-octet length represents an empty 698 string. 700 A String Element MUST either be empty (zero-length) or contain 701 printable ASCII characters [RFC0020] in the range of 0x20 to 0x7E, 702 with an exception made for termination (see Section 13). 704 7.5. UTF-8 Element 706 A UTF-8 Element MUST declare a length in octets from zero to VINTMAX. 707 If the EBML Element is not defined to have a default value, then a 708 UTF-8 Element with a zero-octet length represents an empty string. 710 A UTF-8 Element contains only a valid Unicode string as defined in 711 [RFC3629], with an exception made for termination (see Section 13). 713 7.6. Date Element 715 A Date Element MUST declare a length of either zero octets or eight 716 octets. If the EBML Element is not defined to have a default value, 717 then a Date Element with a zero-octet length represents a timestamp 718 of 2001-01-01T00:00:00.000000000 UTC [RFC3339]. 720 The Date Element stores an integer in the same format as the Signed 721 Integer Element that expresses a point in time referenced in 722 nanoseconds from the precise beginning of the third millennium of the 723 Gregorian Calendar in Coordinated Universal Time (also known as 724 2001-01-01T00:00:00.000000000 UTC). This provides a possible 725 expression of time from 1708-09-11T00:12:44.854775808 UTC to 726 2293-04-11T11:47:16.854775807 UTC. 728 7.7. Master Element 730 A Master Element MUST declare a length in octets from zero to VINTMAX 731 or be of unknown length. See Section 6 for rules that apply to 732 elements of unknown length. 734 The Master Element contains zero or more other elements. EBML 735 Elements contained within a Master Element MUST have the 736 EBMLParentPath of their Element Path equal to the EBMLFullPath of the 737 Master Element Element Path (see Section 11.1.5.2). Element Data 738 stored within Master Elements SHOULD only consist of EBML Elements 739 and SHOULD NOT contain any data that is not part of an EBML Element. 740 The EBML Schema identifies what Element IDs are valid within the 741 Master Elements for that version of the EBML Document Type. Any data 742 contained within a Master Element that is not part of a Child Element 743 MUST be ignored. 745 7.8. Binary Element 747 A Binary Element MUST declare a length in octets from zero to 748 VINTMAX. 750 The contents of a Binary Element should not be interpreted by the 751 EBML Reader. 753 8. EBML Document 755 An EBML Document is composed of only two components, an EBML Header 756 and an EBML Body. An EBML Document MUST start with an EBML Header 757 that declares significant characteristics of the entire EBML Body. 758 An EBML Document consists of EBML Elements and MUST NOT contain any 759 data that is not part of an EBML Element. 761 8.1. EBML Header 763 The EBML Header is a declaration that provides processing 764 instructions and identification of the EBML Body. The EBML Header of 765 an EBML Document is analogous to the XML Declaration of an XML 766 Document. 768 The EBML Header documents the EBML Schema (also known as the EBML 769 DocType) that is used to semantically interpret the structure and 770 meaning of the EBML Document. Additionally the EBML Header documents 771 the versions of both EBML and the EBML Schema that were used to write 772 the EBML Document and the versions required to read the EBML 773 Document. 775 The EBML Header MUST contain a single Master Element with an Element 776 Name of EBML and Element ID of 0x1A45DFA3 (see Section 11.2.1) and 777 any number of additional EBML Elements within it. The EBML Header of 778 an EBML Document that uses an EBMLVersion of 1 MUST only contain EBML 779 Elements that are defined as part of this document. 781 Elements within an EBML Header can be at most 4 octets long, except 782 for the EBML Element with Element Name EBML and Element ID 783 "0x1A45DFA3" (see Section 11.2.1), which can be up to 8 octets long. 785 8.2. EBML Body 787 All data of an EBML Document following the EBML Header is the EBML 788 Body. The end of the EBML Body, as well as the end of the EBML 789 Document that contains the EBML Body, is reached at whichever comes 790 first: the beginning of a new EBML Header at the Root Level or the 791 end of the file. This document defines precisely which EBML Elements 792 are to be used within the EBML Header, but does not name or define 793 which EBML Elements are to be used within the EBML Body. The 794 definition of which EBML Elements are to be used within the EBML Body 795 is defined by an EBML Schema. 797 Within the EBML Body, the maximum octet length allowed for any 798 Element ID is set by the EBMLMaxIDLength Element of the EBML Header 799 and the maximum octet length allowed for any Element Data Size is set 800 by the EBMLMaxSizeLength Element of the EBML Header. 802 9. EBML Stream 804 An EBML Stream is a file that consists of one or more EBML Documents 805 that are concatenated together. An occurrence of a EBML Header at 806 the Root Level marks the beginning of an EBML Document. 808 10. EBML Versioning 810 An EBML Document handles 2 different versions: the version of the 811 EBML Header and the version of the EBML Body. Both versions are 812 meant to be backward compatible. 814 10.1. EBML Header Version 816 The version of the EBML Header is found in EBMLVersion. An EBML 817 parser can read an EBML Header if it can read either the EBMLVersion 818 version or a version equal or higher than the one found in 819 EBMLReadVersion. 821 10.2. EBML Document Version 823 The version of the EBML Body is found in EBMLDocTypeVersion. A 824 parser for the particular DocType format can read the EBML Document 825 if it can read either the EBMLDocTypeVersion version of that format 826 or a version equal or higher than the one found in 827 EBMLDocTypeReadVersion. 829 11. Elements semantic 831 11.1. EBML Schema 833 An EBML Schema is a well-formed XML Document [W3C.REC-xml-20081126] 834 that defines the properties, arrangement, and usage of EBML Elements 835 that compose a specific EBML Document Type. The relationship of an 836 EBML Schema to an EBML Document is analogous to the relationship of 837 an XML Schema [W3C.REC-xmlschema-0-20041028] to an XML Document 838 [W3C.REC-xml-20081126]. An EBML Schema MUST be clearly associated 839 with one or more EBML Document Types. An EBML Document Type is 840 identified by a string stored within the EBML Header in the DocType 841 Element; for example matroska or webm (see Section 11.2.6). The 842 DocType value for an EBML Document Type MUST be unique and 843 persistent. 845 An EBML Schema MUST declare exactly one EBML Element at Root Level 846 (referred to as the Root Element) that occurs exactly once within an 847 EBML Document. The Void Element MAY also occur at Root Level but is 848 not a Root Element (see Section 11.3.2). 850 The EBML Schema MUST document all Elements of the EBML Body. The 851 EBML Schema does not document Global Elements that are defined by 852 this document (namely the Void Element and the CRC-32 Element). 854 The EBML Schema MUST NOT use the Element ID "0x1A45DFA3" which is 855 reserved for the EBML Header for resynchronization purpose. 857 An EBML Schema MAY constrain the use of EBML Header Elements (see 858 Section 11.2) by adding or constraining that Element's "range" 859 attribute. For example, an EBML Schema MAY constrain the 860 EBMLMaxSizeLength to a maximum value of "8" or MAY constrain the 861 EBMLVersion to only support a value of "1". If an EBML Schema adopts 862 the EBML Header Element as-is, then it is not required to document 863 that Element within the EBML Schema. If an EBML Schema constrains 864 the range of an EBML Header Element, then that Element MUST be 865 documented within an "" node of the EBML Schema. This 866 document provides an example of an EBML Schema, see Section 11.1.1. 868 11.1.1. EBML Schema Example 870 871 873 874 877 880 881 883 Container of data and 884 attributes representing one or many files. 885 886 888 889 An attached file. 890 891 892 895 896 Filename of the attached file. 897 899 900 903 904 MIME type of the file. 905 906 907 910 911 Modification timestamp of the file. 912 913 914 916 917 The data of the file. 918 919 920 922 11.1.2. Element 924 Within an EBML Schema, the XPath [W3C.REC-xpath-19991116] of 925 "" element is "/EBMLSchema". 927 As an XML Document, the EBML Schema MUST use "" as the 928 top level element. The "" element can contain 929 "" sub-elements. 931 11.1.3. Attributes 933 Within an EBML Schema the "" element uses the following 934 attributes: 936 11.1.3.1. docType 938 Within an EBML Schema, the XPath of "@docType" attribute is 939 "/EBMLSchema/@docType". 941 The docType lists the official name of the EBML Document Type that is 942 defined by the EBML Schema; for example, "". 945 The docType attribute is REQUIRED within the "" Element. 947 11.1.3.2. version 949 Within an EBML Schema, the XPath of "@version" attribute is 950 "/EBMLSchema/@version". 952 The version lists a non-negative integer that specifies the version 953 of the docType documented by the EBML Schema. Unlike XML Schemas, an 954 EBML Schema documents all versions of a docType's definition rather 955 than using separate EBML Schemas for each version of a docType. EBML 956 Elements may be introduced and deprecated by using the minver and 957 maxver attributes of "". 959 The version attribute is REQUIRED within the "" Element. 961 11.1.4. Element 963 Within an EBML Schema, the XPath of "" element is 964 "/EBMLSchema/element". 966 Each "" defines one EBML Element through the use of several 967 attributes that are defined in Section 11.1.3. EBML Schemas MAY 968 contain additional attributes to extend the semantics but MUST NOT 969 conflict with the definitions of the "" attributes defined 970 within this document. 972 The "" nodes contain a description of the meaning and use of 973 the EBML Element stored within one or more "" sub- 974 elements, followed by optional "" sub-elements, 975 followed by zero or one "" sub-element, followed by 976 optional "" sub-elements. All "" nodes MUST be 977 sub-elements of the "". 979 11.1.5. Attributes 981 Within an EBML Schema the "" uses the following attributes 982 to define an EBML Element: 984 11.1.5.1. name 986 Within an EBML Schema, the XPath of "@name" attribute is 987 "/EBMLSchema/element/@name". 989 The name provides the human-readable name of the EBML Element. The 990 value of the name MUST be in the form of characters "A" to "Z", "a" 991 to "z", "0" to "9", "-" and ".". The first character of the name 992 MUST be in the form of an "A" to "Z", "a" to "z", "0" to "9" 993 character. 995 The name attribute is REQUIRED. 997 11.1.5.2. path 999 Within an EBML Schema, the XPath of "@path" attribute is 1000 "/EBMLSchema/element/@path". 1002 The path defines the allowed storage locations of the EBML Element 1003 within an EBML Document. This path MUST be defined with the full 1004 hierarchy of EBML Elements separated with a "\". The top EBML 1005 Element in the path hierarchy being the first in the value. The 1006 syntax of the path attribute is defined using this Augmented Backus- 1007 Naur Form (ABNF) [RFC5234] with the case sensitive update [RFC7405] 1008 notation: 1010 The path attribute is REQUIRED. 1012 EBMLFullPath = [EBMLParentPath] EBMLElementPath 1013 EBMLParentPath = EBMLFixedParent EBMLLastParent 1014 EBMLFixedParent = *(EBMLPathAtom) 1015 EBMLElementPath = EBMLPathAtom / EBMLPathAtomRecursive 1016 EBMLPathAtom = PathDelimiter EBMLAtomName 1017 EBMLPathAtomRecursive = "(1*(" EBMLPathAtom "))" 1018 EBMLLastParent = EBMLPathAtom / EBMLGlobalParent 1019 EBMLGlobalParent = "(" GlobalParentOccurence "\)" 1020 EBMLAtomName = 1*(EBMLNameChar) 1021 EBMLNameChar = ALPHA / DIGIT / "-" / "." 1022 PathDelimiter = "\" 1023 GlobalParentOccurence = [PathMinOccurrence] "*" [PathMaxOccurrence] 1024 PathMinOccurrence = 1*DIGIT ; no upper limit 1025 PathMaxOccurrence = 1*DIGIT ; no upper limit 1027 The "*", "(" and ")" symbols are interpreted as defined in [RFC5234]. 1029 The EBMLPathAtom part of the EBMLElementPath MUST be equal to the 1030 name attribute of the EBML Schema. 1032 The starting PathDelimiter of the path corresponds to the root of the 1033 EBML Document. 1035 In some cases the EBMLLastParent part of the path is an 1036 EBMLGlobalParent. A path with a EBMLGlobalParent defines a Global 1037 Element; see Section 11.3. Any path that starts with the 1038 EBMLFixedParent of the Global Element and matches the occurrences 1039 found in the GlobalParentOccurence is a valid path for the Global 1040 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 The "@path" value MUST be unique within the EBML Schema. The "@id" 1074 value corresponding to this "@path" MUST NOT be defined for use 1075 within another EBML Element with the same EBMLParentPath as this 1076 "@path". 1078 11.1.5.3. id 1080 Within an EBML Schema, the XPath of "@id" attribute is "/EBMLSchema/ 1081 element/@id". 1083 The Element ID encoded as a Variable Size Integer expressed in 1084 hexadecimal notation prefixed by a 0x that is read and stored in big- 1085 endian order. To reduce the risk of false positives while parsing 1086 EBML Streams, the Element IDs of the Root Element and Top-Level 1087 Elements SHOULD be at least 4 octets in length. Element IDs defined 1088 for use at Root Level or directly under the Root Level MAY use 1089 shorter octet lengths to facilitate padding and optimize edits to 1090 EBML Documents; for instance, the Void Element uses an Element ID 1091 with a one octet length to allow its usage in more writing and 1092 editing scenarios. 1094 The Element ID of any Element found within an EBML Document MUST only 1095 match a single "@path" value of its corresponding EBML Schema, but a 1096 separate instance of that Element ID value defined by the EBML Schema 1097 MAY occur within a different "@path". If more than one Element is 1098 defined to use the same "@id" value, then the "@path" values of those 1099 Elements MUST NOT share the same EBMLParentPath. Elements MUST NOT 1100 be defined to use the same "@id" value if one of their common Parent 1101 Elements could be an Unknown-Size Element. 1103 The id attribute is REQUIRED. 1105 11.1.5.4. minOccurs 1107 Within an EBML Schema, the XPath of "@minOccurs" attribute is 1108 "/EBMLSchema/element/@minOccurs". 1110 The minOccurs is a non-negative integer expressing the minimum 1111 permitted number of occurrences of this EBML Element within its 1112 Parent Element. 1114 Each instance of the Parent Element MUST contain at least this many 1115 instances of this EBML Element. If the EBML Element has an empty 1116 EBMLParentPath then minOccurs refers to constraints on the occurrence 1117 of the EBML Element within the EBML Document. EBML Elements with 1118 minOccurs set to "1" that also have a default value (see 1119 Section 11.1.5.8) declared are not REQUIRED to be stored but are 1120 REQUIRED to be interpreted, see Section 11.1.18. 1122 An EBML Element defined with a minOccurs value greater than zero is 1123 called a Mandatory EBML Element. 1125 The minOccurs attribute is OPTIONAL. If the minOccurs attribute is 1126 not present then that EBML Element has a minOccurs value of 0. 1128 The semantic meaning of minOccurs within an EBML Schema is analogous 1129 to the meaning of minOccurs within an XML Schema. 1131 11.1.5.5. maxOccurs 1133 Within an EBML Schema, the XPath of "@maxOccurs" attribute is 1134 "/EBMLSchema/element/@maxOccurs". 1136 The maxOccurs is a non-negative integer expressing the maximum 1137 permitted number of occurrences of this EBML Element within its 1138 Parent Element. 1140 Each instance of the Parent Element MUST contain at most this many 1141 instances of this EBML Element, including the unwritten mandatory 1142 element with a default value, see Section 11.1.18. If the EBML 1143 Element has an empty EBMLParentPath then maxOccurs refers to 1144 constraints on the occurrence of the EBML Element within the EBML 1145 Document. 1147 The maxOccurs attribute is OPTIONAL. If the maxOccurs attribute is 1148 not present then there is no upper bound for the permitted number of 1149 occurrences of this EBML Element within its Parent Element or within 1150 the EBML Document depending on whether the EBMLParentPath of the EBML 1151 Element is empty or not. 1153 The semantic meaning of maxOccurs within an EBML Schema is analogous 1154 to the meaning of maxOccurs within an XML Schema, when it is not 1155 present it's similar to xml:maxOccurs="unbounded" in an XML Schema. 1157 11.1.5.6. range 1159 Within an EBML Schema, the XPath of "@range" attribute is 1160 "/EBMLSchema/element/@range". 1162 A numerical range for EBML Elements which are of numerical types 1163 (Unsigned Integer, Signed Integer, Float, and Date). If specified 1164 the value of the EBML Element MUST be within the defined range. See 1165 Section 11.1.5.6.1 for rules applied to expression of range values. 1167 The range attribute is OPTIONAL. If the range attribute is not 1168 present then any value legal for the type attribute is valid. 1170 11.1.5.6.1. Expression of range 1172 The range attribute MUST only be used with EBML Elements that are 1173 either signed integer, unsigned integer, float, or date. The 1174 expression defines the upper, lower, exact or excluded value of the 1175 EBML Element and optionally an upper boundary value combined with a 1176 lower boundary. The range expression may contain whitespace (using 1177 the ASCII 0x20 character) for readability but whitespace within a 1178 range expression MUST NOT convey meaning. 1180 To set a fixed value for the range, the value is used as the 1181 attribute value. For example "1234" means the EBML element always 1182 has the value 1234. The value can be prefixed with "not" to indicate 1183 that the fixed value MUST NOT be used for that Element. For example 1184 "not 1234" means the Element can use all values of its type except 1185 1234. 1187 For an exclusive lower boundary the ">" sign is used and the ">=" 1188 sign is used for an inclusive lower boundary. For example ">3" 1189 meaning the Element value MUST be greater than 3 or ">=0x1p+0" 1190 meaning the Element value MUST be greater than or equal to the 1191 floating value 1.0, see Section 11.1.17. 1193 For an exclusive upper boundary the "<" sign is used and the "<=" 1194 sign is used for an inclusive upper boundary. For example "<-2" 1195 meaning the Element value MUST be less than -2 or "<=10" meaning the 1196 Element value MUST be less than or equal to the 10. 1198 The lower and upper bounds can be combined into an expression to form 1199 a closed boundary. The lower boundary coming first followed by the 1200 upper boundary, separated by a comma. For example ">3,<= 20" means 1201 the Element value MUST be greater than 3 and less than or equal to 1202 20. 1204 A special form of lower and upper bounds using the "-" separator is 1205 possible, meaning the Element value MUST be greater than or to the 1206 first value and MUST be less than or equal to the second value. For 1207 example "1-10" is equivalent to ">=1,<=10". If the upper boundary is 1208 negative, only the latter form MUST be used. 1210 11.1.5.7. length 1212 Within an EBML Schema, the XPath of "@length" attribute is 1213 "/EBMLSchema/element/@length". 1215 A value to express the valid length of the Element Data as written 1216 measured in octets. The length provides a constraint in addition to 1217 the Length value of the definition of the corresponding EBML Element 1218 Type. This length MUST be expressed as either a non-negative integer 1219 or a range (see Section 11.1.5.6.1) that consists of only non- 1220 negative integers and valid operators. 1222 The length attribute is OPTIONAL. If the length attribute is not 1223 present for that EBML Element then that EBML Element is only limited 1224 in length by the definition of the associated EBML Element Type. 1226 11.1.5.8. default 1228 Within an EBML Schema, the XPath of "@default" attribute is 1229 "/EBMLSchema/element/@default". 1231 If an Element is mandatory (has a minOccurs value greater than zero) 1232 but not written within its Parent Element or stored as an Empty 1233 Element, then the EBML Reader of the EBML Document MUST semantically 1234 interpret the EBML Element as present with this specified default 1235 value for the EBML Element. An unwritten mandatory Element with a 1236 declared default value is semantically equivalent to that Element if 1237 written with the default value stored as the Element Data. EBML 1238 Elements that are Master Elements MUST NOT declare a default value. 1239 EBML Elements with a minOccurs value greater than 1 MUST NOT declare 1240 a default value. 1242 The default attribute is OPTIONAL. 1244 11.1.5.9. type 1246 Within an EBML Schema, the XPath of "@type" attribute is 1247 "/EBMLSchema/element/@type". 1249 The type MUST be set to one of the following values: "integer" 1250 (signed integer), "uinteger" (unsigned integer), "float", "string", 1251 "date", "utf-8", "master", or "binary". The content of each type is 1252 defined within Section 7. 1254 The type attribute is REQUIRED. 1256 11.1.5.10. unknownsizeallowed 1258 Within an EBML Schema, the XPath of "@unknownsizeallowed" attribute 1259 is "/EBMLSchema/element/@unknownsizeallowed". 1261 A boolean to express if an EBML Element is permitted to be Unknown- 1262 Sized Element (having all VINT_DATA bits of Element Data Size set to 1263 1). EBML Elements that are not Master Elements MUST NOT set 1264 unknownsizeallowed to true. An EBML Element that is defined with an 1265 unknownsizeallowed attribute set to 1 MUST also have the 1266 unknownsizeallowed attribute of its Parent Element set to 1. 1268 An EBML Element with the unknownsizeallowed attribute set to 1 MUST 1269 NOT have its recursive attribute set to 1. 1271 The unknownsizeallowed attribute is OPTIONAL. If the 1272 unknownsizeallowed attribute is not used then that EBML Element is 1273 not allowed to use an unknown Element Data Size. 1275 11.1.5.11. recursive 1277 Within an EBML Schema, the XPath of "@recursive" attribute is 1278 "/EBMLSchema/element/@recursive". 1280 A boolean to express if an EBML Element is permitted to be stored 1281 recursively. In this case the EBML Element MAY be stored within 1282 another EBML Element that has the same Element ID. Which itself can 1283 be stored in an EBML Element that has the same Element ID, and so on. 1284 EBML Elements that are not Master Elements MUST NOT set recursive to 1285 true. 1287 If the path contains an EBMLPathAtomRecursive part then the recursive 1288 value MUST be true and false otherwise. 1290 An EBML Element with the recursive attribute set to 1 MUST NOT have 1291 its unknownsizeallowed attribute set to 1. 1293 The recursive attribute is OPTIONAL. If the recursive attribute is 1294 not present then the EBML Element MUST NOT be used recursively. 1296 11.1.5.12. recurring 1298 Within an EBML Schema, the XPath of "@recurring" attribute is 1299 "/EBMLSchema/element/@recurring". 1301 A boolean to express if an EBML Element is defined as an Identically 1302 Recurring Element or not; see Section 11.1.16. 1304 The recurring attribute is OPTIONAL. If the recurring attribute is 1305 not present then the EBML Element is not an Identically Recurring 1306 Element. 1308 11.1.5.13. minver 1310 Within an EBML Schema, the XPath of "@minver" attribute is 1311 "/EBMLSchema/element/@minver". 1313 The minver (minimum version) attribute stores a non-negative integer 1314 that represents the first version of the docType to support the EBML 1315 Element. 1317 The minver attribute is OPTIONAL. If the minver attribute is not 1318 present, then the EBML Element has a minimum version of "1". 1320 11.1.5.14. maxver 1322 Within an EBML Schema, the XPath of "@maxver" attribute is 1323 "/EBMLSchema/element/@maxver". 1325 The maxver (maximum version) attribute stores a non-negative integer 1326 that represents the last or most recent version of the docType to 1327 support the element. maxver MUST be greater than or equal to minver. 1329 The maxver attribute is OPTIONAL. If the maxver attribute is not 1330 present then the EBML Element has a maximum version equal to the 1331 value stored in the version attribute of "". 1333 11.1.6. Element 1335 Within an EBML Schema, the XPath of "" attribute is 1336 "/EBMLSchema/element/documentation". 1338 The "" element provides additional information about 1339 the EBML Element. Within the "" element the following 1340 XHTML [W3C.SPSD-xhtml-basic-20180327] elements MAY be used: "", 1341 "
", "". 1343 11.1.7. Attributes 1345 11.1.7.1. lang 1347 Within an EBML Schema, the XPath of "@lang" attribute is 1348 "/EBMLSchema/element/documentation/@lang". 1350 A lang attribute which is set to the [RFC5646] value of the language 1351 of the element's documentation. 1353 The lang attribute is OPTIONAL. 1355 11.1.7.2. purpose 1357 Within an EBML Schema, the XPath of "@purpose" attribute is 1358 "/EBMLSchema/element/documentation/@purpose". 1360 A purpose attribute distinguishes the meaning of the documentation. 1361 Values for the "" sub-element's purpose attribute MUST 1362 include one of the values listed in Table 8. 1364 +------------+-------------------------------------------------+ 1365 | value of | definition | 1366 | purpose | | 1367 | attribute | | 1368 +============+=================================================+ 1369 | definition | A 'definition' is recommended for every defined | 1370 | | EBML Element. This documentation explains the | 1371 | | semantic meaning of the EBML Element. | 1372 +------------+-------------------------------------------------+ 1373 | rationale | An explanation about the reason or catalyst for | 1374 | | the definition of the Element. | 1375 +------------+-------------------------------------------------+ 1376 | usage | Recommended practices or guideline for both | 1377 | notes | reading, writing, or interpreting the Element. | 1378 +------------+-------------------------------------------------+ 1379 | references | Informational references to support the | 1380 | | contextualization and understanding of the | 1381 | | value of the Element. | 1382 +------------+-------------------------------------------------+ 1384 Table 8: Definitions of the permitted values for the purpose 1385 attribute of the documentation Element. 1387 The purpose attribute is REQUIRED. 1389 11.1.8. Element 1391 Within an EBML Schema, the XPath of "" attribute 1392 is "/EBMLSchema/element/implementation_note". 1394 In some cases within an EBML Document Type, the attributes of the 1395 "" element are not sufficient to clearly communicate how the 1396 defined EBML Element is intended to be implemented. For instance, 1397 one EBML Element might only be mandatory if another EBML Element is 1398 present, or as another example, the default value of an EBML Element 1399 might derive from a related Element's content. In these cases where 1400 the Element's definition is conditional or advanced implementation 1401 notes are needed, one or many "" elements can be 1402 used to store that information. The "" refer to 1403 a specific attribute of the parent "" as expressed by the 1404 "note_attribute" attribute Section 11.1.9.1. 1406 11.1.9. Attributes 1408 11.1.9.1. note_attribute 1410 Within an EBML Schema, the XPath of "@note_attribute" attribute is 1411 "/EBMLSchema/element/implementation_note/@note_attribute". 1413 The note_attribute attribute references which of the ""'s 1414 attributes that the implementation_note is in regards to. The 1415 note_attribute attribute MUST be set to one of the following values 1416 (corresponding to that attribute of the parent ""): 1417 "minOccurs", "maxOccurs", "range", "length", "default", "minver", or 1418 "maxver". The "" SHALL supersede the parent 1419 ""'s attribute that is named in the "note_attribute" 1420 attribute. An "" SHALL NOT have more than one 1421 "" of the same "note_attribute". 1423 The note_attribute attribute is REQUIRED. 1425 11.1.9.2. Example 1427 The following fragment of an EBML Schema demonstrates how an 1428 "" is used. In this case an EBML Schema 1429 documents a list of items that are described with an optional cost. 1430 The Currency Element uses an "" to say that the 1431 Currency Element is REQUIRED if the Cost Element is set, otherwise 1432 not. 1434 1436 1437 A set of items. 1438 1439 1440 1442 1443 An item. 1444 1445 1446 1448 1449 The cost of the item, if any. 1450 1451 1452 1454 1455 The currency of the item's cost. 1456 1457 1458 Currency MUST be set (minOccurs=1) if the associated Item stores 1459 a Cost, else Currency MAY be unset (minOccurs=0). 1460 1461 1463 11.1.10. Element 1465 Within an EBML Schema, the XPath of "" attribute is 1466 "/EBMLSchema/element/restriction". 1468 The "" element provides information about restrictions 1469 to the allowable values for the EBML Element which are listed in 1470 "" elements. 1472 11.1.11. Element 1474 Within an EBML Schema, the XPath of "" attribute is 1475 "/EBMLSchema/element/restriction/enum". 1477 The "" element stores a list of values allowed for storage in 1478 the EBML Element. The values MUST match the type of the EBML Element 1479 (for example "" cannot be a valid value for a EBML 1480 Element that is defined as an unsigned integer). An "" element 1481 MAY also store "" elements to further describe the 1482 "". 1484 11.1.12. Attributes 1486 11.1.12.1. label 1488 Within an EBML Schema, the XPath of "@label" attribute is 1489 "/EBMLSchema/element/restriction/enum/@label". 1491 The label provides a concise expression for human consumption that 1492 describes what the value of the "" represents. 1494 The label attribute is OPTIONAL. 1496 11.1.12.2. value 1498 Within an EBML Schema, the XPath of "@value" attribute is 1499 "/EBMLSchema/element/restriction/enum/@value". 1501 The value represents data that MAY be stored within the EBML Element. 1503 The value attribute is REQUIRED. 1505 11.1.13. Element 1507 Within an EBML Schema, the XPath of "" attribute is 1508 "/EBMLSchema/element/extension". 1510 The "" element provides an unconstrained element to 1511 contain information about the associated EBML "" which is 1512 undefined by this document but MAY be defined by the associated EBML 1513 Document Type. The "" element MUST contain a "type" 1514 attribute and also MAY contain any other attribute or sub-element as 1515 long as the EBML Schema remains as a well-formed XML Document. All 1516 "" elements MUST be sub-elements of the "". 1518 11.1.14. Attributes 1520 11.1.14.1. type 1522 Within an EBML Schema, the XPath of "@type" attribute is 1523 "/EBMLSchema/element/extension/@type". 1525 The type attribute should reference a name or identifier of the 1526 project or authority associated with the contents of the 1527 "" element. 1529 The type attribute is REQUIRED. 1531 11.1.15. XML Schema for EBML Schema 1533 This following provides an XML Schema [W3C.REC-xmlschema-0-20041028] 1534 for facilitating verification of an EBML Schema to the definition 1535 described in Section 8.1. 1537 1538 1544 1545 1548 1550 1551 1552 1554 1555 1556 1557 1559 1560 1561 1563 1565 1567 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 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 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1640 1641 1642 1644 1645 1647 1648 1649 1651 1652 1653 1654 1656 1657 1658 1660 1661 1662 1663 1665 1666 1667 1669 1671 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1709 11.1.16. Identically Recurring Elements 1711 An Identically Recurring Element is an EBML Element that MAY occur 1712 within its Parent Element more than once but that each recurrence 1713 within that Parent Element MUST be identical both in storage and 1714 semantics. Identically Recurring Elements are permitted to be stored 1715 multiple times within the same Parent Element in order to increase 1716 data resilience and optimize the use of EBML in transmission. For 1717 instance a pertinent Top-Level Element could be periodically resent 1718 within a data stream so that an EBML Reader which starts reading the 1719 stream from the middle could better interpret the contents. 1720 Identically Recurring Elements SHOULD include a CRC-32 Element as a 1721 Child Element; this is especially recommended when EBML is used for 1722 long-term storage or transmission. If a Parent Element contains more 1723 than one copy of an Identically Recurring Element which includes a 1724 CRC-32 Element as a Child Element then the first instance of the 1725 Identically Recurring Element with a valid CRC-32 value should be 1726 used for interpretation. If a Parent Element contains more than one 1727 copy of an Identically Recurring Element which does not contain a 1728 CRC-32 Element or if CRC-32 Elements are present but none are valid 1729 then the first instance of the Identically Recurring Element should 1730 be used for interpretation. 1732 11.1.17. Textual expression of floats 1734 When a float value is represented textually in an EBML Schema, such 1735 as within a default or range value, the float values MUST be 1736 expressed as Hexadecimal Floating-Point Constants as defined in the 1737 C11 standard [ISO.9899.2011] (see section 6.4.4.2 on Floating 1738 Constants). Table 9 provides examples of expressions of float 1739 ranges. 1741 +-------------------+-----------------------------------------+ 1742 | as decimal | as Hexadecimal Floating-Point Constants | 1743 +===================+=========================================+ 1744 | 0.0 | "0x0p+1" | 1745 +-------------------+-----------------------------------------+ 1746 | 0.0-1.0 | "0x0p+1-0x1p+0" | 1747 +-------------------+-----------------------------------------+ 1748 | 1.0-256.0 | "0x1p+0-0x1p+8" | 1749 +-------------------+-----------------------------------------+ 1750 | 0.857421875 | "0x1.b7p-1" | 1751 +-------------------+-----------------------------------------+ 1752 | -1.0--0.857421875 | "-0x1p+0--0x1.b7p-1" | 1753 +-------------------+-----------------------------------------+ 1755 Table 9: Example of floating point values and ranges as 1756 decimal and as Hexadecimal Floating-Point Constants. 1758 Within an expression of a float range, as in an integer range, the - 1759 (hyphen) character is the separator between the minimal and maximum 1760 value permitted by the range. Hexadecimal Floating-Point Constants 1761 also use a - (hyphen) when indicating a negative binary power. 1762 Within a float range, when a - (hyphen) is immediately preceded by a 1763 letter p, then the - (hyphen) is a part of the Hexadecimal Floating- 1764 Point Constant which notes negative binary power. Within a float 1765 range, when a - (hyphen) is not immediately preceded by a letter p, 1766 then the - (hyphen) represents the separator between the minimal and 1767 maximum value permitted by the range. 1769 11.1.18. Note on the use of default attributes to define Mandatory EBML 1770 Elements 1772 If a Mandatory EBML Element has a default value declared by an EBML 1773 Schema and the value of the EBML Element is equal to the declared 1774 default value then that EBML Element is not required to be present 1775 within the EBML Document if its Parent Element is present. In this 1776 case, the default value of the Mandatory EBML Element MUST be read by 1777 the EBML Reader although the EBML Element is not present within its 1778 Parent Element. 1780 If a Mandatory EBML Element has no default value declared by an EBML 1781 Schema and its Parent Element is present then the EBML Element MUST 1782 be present as well. If a Mandatory EBML Element has a default value 1783 declared by an EBML Schema and its Parent Element is present and the 1784 value of the EBML Element is NOT equal to the declared default value 1785 then the EBML Element MUST be present. 1787 Table 10 clarifies if a Mandatory EBML Element MUST be written, 1788 according to if the default value is declared, if the value of the 1789 EBML Element is equal to the declared default value, and if the 1790 Parent Element is used. 1792 +-----------------+-------------+---------------+------------------+ 1793 | Is the default | Is the | Is the Parent | Then is storing | 1794 | value declared? | value equal | Element | the EBML Element | 1795 | | to default? | present? | REQUIRED? | 1796 +=================+=============+===============+==================+ 1797 | Yes | Yes | Yes | No | 1798 +-----------------+-------------+---------------+------------------+ 1799 | Yes | Yes | No | No | 1800 +-----------------+-------------+---------------+------------------+ 1801 | Yes | No | Yes | Yes | 1802 +-----------------+-------------+---------------+------------------+ 1803 | Yes | No | No | No | 1804 +-----------------+-------------+---------------+------------------+ 1805 | No | n/a | Yes | Yes | 1806 +-----------------+-------------+---------------+------------------+ 1807 | No | n/a | No | No | 1808 +-----------------+-------------+---------------+------------------+ 1810 Table 10: Demonstration of the conditional requirements of VINT 1811 Storage. 1813 11.2. EBML Header Elements 1815 This document contains definitions of all EBML Elements of the EBML 1816 Header. 1818 11.2.1. EBML Element 1820 name: EBML 1822 path: "1*1(\EBML)" 1824 id: 0x1A45DFA3 1826 minOccurs: 1 1828 maxOccurs: 1 1830 type: Master Element 1832 description: Set the EBML characteristics of the data to follow. 1833 Each EBML Document has to start with this. 1835 11.2.2. EBMLVersion Element 1837 name: EBMLVersion 1839 path: "1*1(\EBML\EBMLVersion)" 1841 id 0x4286 1843 minOccurs: 1 1845 maxOccurs: 1 1847 range: not 0 1849 default: 1 1851 type: Unsigned Integer 1853 description: The version of EBML specifications used to create the 1854 EBML Document. The version of EBML defined in this document is 1, so 1855 EBMLVersion SHOULD be 1. 1857 11.2.3. EBMLReadVersion Element 1859 name: EBMLReadVersion 1861 path: "1*1(\EBML\EBMLReadVersion)" 1863 id: 0x42F7 1865 minOccurs: 1 1866 maxOccurs: 1 1868 range: 1 1870 default: 1 1872 type: Unsigned Integer 1874 description: The minimum EBML version an EBML Reader has to support 1875 to read this EBML Document. The EBMLReadVersion Element MUST be less 1876 than or equal to EBMLVersion. 1878 11.2.4. EBMLMaxIDLength Element 1880 name: EBMLMaxIDLength 1882 path: "1*1(\EBML\EBMLMaxIDLength)" 1884 id 0x42F2 1886 minOccurs: 1 1888 maxOccurs: 1 1890 range: >=4 1892 default: 4 1894 type: Unsigned Integer 1896 description: The EBMLMaxIDLength Element stores the maximum permitted 1897 length in octets of the Element IDs to be found within the EBML Body. 1898 An EBMLMaxIDLength Element value of four is RECOMMENDED, though 1899 larger values are allowed. 1901 11.2.5. EBMLMaxSizeLength Element 1903 name: EBMLMaxSizeLength 1905 path: "1*1(\EBML\EBMLMaxSizeLength)" 1907 id 0x42F3 1909 minOccurs: 1 1911 maxOccurs: 1 1913 range: not 0 1914 default: 8 1916 type: Unsigned Integer 1918 description: The EBMLMaxSizeLength Element stores the maximum 1919 permitted length in octets of the expressions of all Element Data 1920 Sizes to be found within the EBML Body. The EBMLMaxSizeLength 1921 Element documents an upper bound for the "length" of all Element Data 1922 Size expressions within the EBML Body and not an upper bound for the 1923 "value" of all Element Data Size expressions within the EBML Body. 1924 EBML Elements that have an Element Data Size expression which is 1925 larger in octets than what is expressed by EBMLMaxSizeLength Element 1926 are invalid. 1928 11.2.6. DocType Element 1930 name: DocType 1932 path: "1*1(\EBML\DocType)" 1934 id 0x4282 1936 minOccurs: 1 1938 maxOccurs: 1 1940 length: >0 1942 type: String 1944 description: A string that describes and identifies the content of 1945 the EBML Body that follows this EBML Header. 1947 11.2.7. DocTypeVersion Element 1949 name: DocTypeVersion 1951 path: "1*1(\EBML\DocTypeVersion)" 1953 id 0x4287 1955 minOccurs: 1 1957 maxOccurs: 1 1959 range: not 0 1961 default: 1 1962 type: Unsigned Integer 1964 description: The version of DocType interpreter used to create the 1965 EBML Document. 1967 11.2.8. DocTypeReadVersion Element 1969 name: DocTypeReadVersion 1971 path: "1*1(\EBML\DocTypeReadVersion)" 1973 id 0x4285 1975 minOccurs: 1 1977 maxOccurs: 1 1979 range: not 0 1981 default: 1 1983 type: Unsigned Integer 1985 description: The minimum DocType version an EBML Reader has to 1986 support to read this EBML Document. The value of the 1987 DocTypeReadVersion Element MUST be less than or equal to the value of 1988 the DocTypeVersion Element. 1990 11.2.9. DocTypeExtension Element 1992 name: DocTypeExtension 1994 path: "0*(\EBML\DocTypeExtension)" 1996 id 0x4281 1998 minOccurs: 0 2000 type: Master Element 2002 description: A DocTypeExtension adds extra Elements to the main 2003 DocType+DocTypeVersion tuple it's attached to. An EBML Reader MAY 2004 know these extra Elements and how to use them. A DocTypeExtension 2005 MAY be used to iterate between experimental Elements before they are 2006 integrated in a regular DocTypeVersion. Reading one DocTypeExtension 2007 version of a DocType+DocTypeVersion tuple doesn't imply one should be 2008 able to read upper versions of this DocTypeExtension. 2010 11.2.10. DocTypeExtensionName Element 2012 name: DocTypeExtensionName 2014 path: "1*1(\EBML\DocTypeExtension\Name)" 2016 id 0x4283 2018 minOccurs: 1 2020 maxOccurs: 1 2022 length: >0 2024 type: String 2026 description: The name of the DocTypeExtension to differentiate it 2027 from other DocTypeExtension of the same DocType+DocTypeVersion tuple. 2028 A DocTypeExtensionName value MUST be unique within the EBML Header. 2030 11.2.11. DocTypeExtensionVersion Element 2032 name: DocTypeExtensionVersion 2034 path: "1*1(\EBML\DocTypeExtension\Version)" 2036 id 0x4284 2038 minOccurs: 1 2040 maxOccurs: 1 2042 range: not 0 2044 type: Unsigned Integer 2046 description: The version of the DocTypeExtension. Different 2047 DocTypeExtensionVersion values of the same 2048 DocType+DocTypeVersion+DocTypeExtensionName tuple MAY contain 2049 completely different sets of extra Elements. An EBML Reader MAY 2050 support multiple versions of the same DocTypeExtension, only one or 2051 none. 2053 11.3. Global Elements 2055 EBML allows some special Elements to be found within more than one 2056 parent in an EBML Document or optionally at the Root Level of an EBML 2057 Body. These Elements are called Global Elements. There are 2 Global 2058 Elements that can be found in any EBML Document: the CRC-32 Element 2059 and the Void Element. An EBML Schema MAY add other Global Elements 2060 to the format it defines. These extra elements apply only to the 2061 EBML Body, not the EBML Header. 2063 Global Elements are EBML Elements whose path have a EBMLGlobalParent 2064 as their EBMLLastParent. Because it is the last Parent part of the 2065 path, a Global Element might also have non-EBMLGlobalParent parts in 2066 its path. In this case the Global Element can only be found within 2067 this non-EBMLGlobalParent path, i.e. it's not fully "global". 2069 A Global Element can be found in many Parent Elements, allowing the 2070 same number of occurrences in each Parent where this Element is 2071 found. 2073 11.3.1. CRC-32 Element 2075 name: CRC-32 2077 path: "*1((1*\)\CRC-32)" 2079 id: 0xBF 2081 minOccurs: 0 2083 maxOccurs: 1 2085 length: 4 2087 type: Binary 2089 description: The CRC-32 Element contains a 32-bit Cyclic Redundancy 2090 Check value of all the Element Data of the Parent Element as stored 2091 except for the CRC-32 Element itself. When the CRC-32 Element is 2092 present, the CRC-32 Element MUST be the first ordered EBML Element 2093 within its Parent Element for easier reading. All Top-Level Elements 2094 of an EBML Document that are Master Elements SHOULD include a CRC-32 2095 Element as a Child Element. The CRC in use is the IEEE-CRC-32 2096 algorithm as used in the [ISO.3309.1979] standard and in section 2097 8.1.1.6.2 of [ITU.V42.1994], with initial value of 0xFFFFFFFF. The 2098 CRC value MUST be computed on a little endian bitstream and MUST use 2099 little endian storage. 2101 11.3.2. Void Element 2103 name: Void 2105 path: "*((*\)\Void)" 2107 id: 0xEC 2109 minOccurs: 0 2111 type: Binary 2113 description: Used to void data or to avoid unexpected behaviors when 2114 using damaged data. The content is discarded. Also used to reserve 2115 space in a sub-element for later use. 2117 12. Considerations for Reading EBML Data 2119 The following scenarios describe events to consider when reading EBML 2120 Documents and the recommended design of an EBML Reader. 2122 If a Master Element contains a CRC-32 Element that doesn't validate, 2123 then the EBML Reader MAY ignore all contained data except for 2124 Descendant Elements that contain their own valid CRC-32 Element. 2126 In the following XML representation of a simple, hypothetical EBML 2127 fragment, a Master Element called CONTACT contains two Child 2128 Elements, NAME and ADDRESS. In this example, some data within the 2129 NAME Element had been altered, so that the CRC-32 of the NAME Element 2130 does not validate and thus any Ancestor Element with a CRC-32 would 2131 therefore also no longer validate. However, even though the CONTACT 2132 Element has a CRC-32 that does not validate (because of the changed 2133 data within the NAME Element), the CRC-32 of the ADDRESS Element does 2134 validate and thus the contents and semantics of the ADDRESS Element 2135 MAY be used. 2137 2138 c119a69b 2139 2140 1f59ee2b 2141 invalid data 2142 invalid data 2143 2144
2145 df941cc9 2146 valid data 2147 valid data 2148
2149
2151 If a Master Element contains more occurrences of a Child Master 2152 Element than permitted according to the maxOccurs and recurring 2153 attributes of the definition of that Element then the occurrences in 2154 addition to maxOccurs MAY be ignored. 2156 If a Master Element contains more occurrences of a Child Element than 2157 permitted according to the maxOccurs attribute of the definition of 2158 that Element then all instances of that Element after the first 2159 maxOccur occurrences from the beginning of its Parent Element SHOULD 2160 be ignored. 2162 13. Terminating Elements 2164 Null Octets, which are octets with all bits set to zero, MAY follow 2165 the value of a String Element or UTF-8 Element to serve as a 2166 terminator. An EBML Writer MAY terminate a String Element or UTF-8 2167 Element with Null Octets in order to overwrite a stored value with a 2168 new value of lesser length while maintaining the same Element Data 2169 Size (this can prevent the need to rewrite large portions of an EBML 2170 Document); otherwise the use of Null Octets within a String Element 2171 or UTF-8 Element is NOT RECOMMENDED. An EBML Reader MUST consider 2172 the value of the String Element or UTF-8 Element to be terminated 2173 upon the first read Null Octet and MUST ignore any data following the 2174 first Null Octet within that Element. A string value and a copy of 2175 that string value terminated by one or more Null Octets are 2176 semantically equal. 2178 Table 11 shows examples of semantics and validation for the use of 2179 Null Octets. Values to represent Stored Values and the Semantic 2180 Meaning as represented as hexadecimal values. 2182 +---------------------+---------------------+ 2183 | Stored Value | Semantic Meaning | 2184 +=====================+=====================+ 2185 | 0x65 0x62 0x6D 0x6C | 0x65 0x62 0x6D 0x6C | 2186 +---------------------+---------------------+ 2187 | 0x65 0x62 0x00 0x6C | 0x65 0x62 | 2188 +---------------------+---------------------+ 2189 | 0x65 0x62 0x00 0x00 | 0x65 0x62 | 2190 +---------------------+---------------------+ 2191 | 0x65 0x62 | 0x65 0x62 | 2192 +---------------------+---------------------+ 2194 Table 11: Exmaples of semantics for Null 2195 Octets in VINT_DATA. 2197 14. Guidelines for Updating Elements 2199 An EBML Document can be updated without requiring that the entire 2200 EBML Document be rewritten. These recommendations describe 2201 strategies to change the Element Data of a written EBML Element with 2202 minimal disruption to the rest of the EBML Document. 2204 14.1. Reducing a Element Data in Size 2206 There are three methods to reduce the size of Element Data of a 2207 written EBML Element. 2209 14.1.1. Adding a Void Element 2211 When an EBML Element is changed to reduce its total length by more 2212 than one octet, an EBML Writer SHOULD fill the freed space with a 2213 Void Element. 2215 14.1.2. Extending the Element Data Size 2217 The same value for Element Data Size MAY be written in variable 2218 lengths, so for minor reductions in octet length the Element Data 2219 Size MAY be written to a longer octet length to fill the freed space. 2221 For example, the first row of Table 12 depicts a String Element that 2222 stores an Element ID (3 octets), Element Data Size (1 octet), and 2223 Element Data (4 octets). If the Element Data is changed to reduce 2224 the length by one octet and if the current length of the Element Data 2225 Size is less than its maximum permitted length, then the Element Data 2226 Size of that Element MAY be rewritten to increase its length by one 2227 octet. Thus before and after the change the EBML Element maintains 2228 the same length of 8 octets and data around the Element does not need 2229 to be moved. 2231 +-------------+------------+-------------------+--------------+ 2232 | Status | Element ID | Element Data Size | Element Data | 2233 +=============+============+===================+==============+ 2234 | Before edit | 0x3B4040 | 0x84 | 0x65626D6C | 2235 +-------------+------------+-------------------+--------------+ 2236 | After edit | 0x3B4040 | 0x4003 | 0x6D6B76 | 2237 +-------------+------------+-------------------+--------------+ 2239 Table 12: Example of editing a VINT to reduce VINT_DATA 2240 length by one octet. 2242 This method is RECOMMENDED when the Element Data is reduced by a 2243 single octet; for reductions by two or more octets it is RECOMMENDED 2244 to fill the freed space with a Void Element. 2246 Note that if the Element Data length needs to be rewritten as 2247 shortened by one octet and the Element Data Size could be rewritten 2248 as a shorter VINT then it is RECOMMENDED to rewrite the Element Data 2249 Size as one octet shorter, shorten the Element Data by one octet, and 2250 follow that Element with a Void Element. For example, Table 13 2251 depicts a String Element that stores an Element ID (3 octets), 2252 Element Data Size (2 octets, but could be rewritten in one octet), 2253 and Element Data (3 octets). If the Element Data is to be rewritten 2254 to a two octet length, then another octet can be taken from Element 2255 Data Size so that there is enough space to add a two octet Void 2256 Element. 2258 +--------+------------+-------------------+--------------+---------+ 2259 | Status | Element ID | Element Data Size | Element Data | Void | 2260 | | | | | Element | 2261 +========+============+===================+==============+=========+ 2262 | Before | 0x3B4040 | 0x4003 | 0x6D6B76 | | 2263 +--------+------------+-------------------+--------------+---------+ 2264 | After | 0x3B4040 | 0x82 | 0x6869 | 0xEC80 | 2265 +--------+------------+-------------------+--------------+---------+ 2267 Table 13: Example of editing a VINT to reduce VINT_DATA length 2268 by more than one octet. 2270 14.1.3. Terminating Element Data 2272 For String Elements and UTF-8 Elements the length of Element Data 2273 could be reduced by adding Null Octets to terminate the Element Data 2274 (see Section 13). 2276 In Table 14, a four octets long Element Data is changed to a three 2277 octet long value followed by a Null Octet; the Element Data Size 2278 includes any Null Octets used to terminate Element Data so remains 2279 unchanged. 2281 +-------------+------------+-------------------+--------------+ 2282 | Status | Element ID | Element Data Size | Element Data | 2283 +=============+============+===================+==============+ 2284 | Before edit | 0x3B4040 | 0x84 | 0x65626D6C | 2285 +-------------+------------+-------------------+--------------+ 2286 | After edit | 0x3B4040 | 0x84 | 0x6D6B7600 | 2287 +-------------+------------+-------------------+--------------+ 2289 Table 14: Example of terminating VINT_DATA with a Null 2290 Octet when reducing VINT length during an edit. 2292 Note that this method is NOT RECOMMENDED. For reductions of one 2293 octet, the method for Extending the Element Data Size SHOULD be used. 2294 For reduction by more than one octet, the method for Adding a Void 2295 Element SHOULD be used. 2297 14.2. Considerations when Updating Elements with Cyclic Redundancy 2298 Check (CRC) 2300 If the Element to be changed is a Descendant Element of any Master 2301 Element that contains a CRC-32 Element (see Section 11.3.1) then the 2302 CRC-32 Element MUST be verified before permitting the change. 2303 Additionally the CRC-32 Element value MUST be subsequently updated to 2304 reflect the changed data. 2306 15. Backward and Forward Compatibility 2308 Elements of an EBML format SHOULD be designed with backward and 2309 forward compatibility in mind. 2311 15.1. Backward Compatibility 2313 Backward compatibility of new EBML Elements can be achieved by using 2314 default values for mandatory elements. The default value MUST 2315 represent the state that was assumed for previous versions of the 2316 EBML Schema, without this new EBML Element. If such a state doesn't 2317 make sense for previous versions, then the new EBML Element SHOULD 2318 NOT be mandatory. 2320 Non mandatory EBML Elements can be added in a new EBMLDocTypeVersion. 2321 Since they are not mandatory they won't be found in older versions of 2322 the EBMLDocTypeVersion, just as they might not be found in newer 2323 versions. This causes no compatibility issue. 2325 15.2. Forward Compatibility 2327 EBML Elements MAY be marked as deprecated in a new EBMLDocTypeVersion 2328 using the maxver attribute of the EBML Schema. If such an Element is 2329 found in an EBML Document with newer version of the 2330 EBMLDocTypeVersion it SHOULD be discarded. 2332 16. Security Considerations 2334 EBML itself does not offer any kind of security and does not provide 2335 confidentiality. EBML does not provide any kind of authorization. 2336 EBML only offers marginally useful and effective data integrity 2337 options, such as CRC elements. 2339 Even if the semantic layer offers any kind of encryption, EBML itself 2340 could leak information at both the semantic layer (as declared via 2341 the DocType Element) and within the EBML structure (the presence of 2342 EBML Elements can be derived even with an unknown semantic layer 2343 using a heuristic approach; not without errors, of course, but with a 2344 certain degree of confidence). 2346 An EBML Document that has the following issues may still be handled 2347 by the EBML Reader and the data accepted as such, depending on how 2348 strict the EBML Reader wants to be: 2350 * Invalid Element IDs that are longer than the limit stated in the 2351 EBMLMaxIDLength Element of the EBML Header. 2353 * Invalid Element IDs that are not encoded in the shortest-possible 2354 way. 2356 * Invalid Element Data Size values that are longer than the limit 2357 stated in the EBMLMaxSizeLength Element of the EBML Header. 2359 Element IDs that are unknown to the EBML Reader MAY be accepted as 2360 valid EBML IDs in order to skip such elements. 2362 EBML Elements with a string type may contain extra data after the 2363 first 0x00. These data MUST be discarded according to the Section 13 2364 rules. 2366 An EBML Reader may discard some or all data if the following errors 2367 are found in the EBML Document: 2369 * Invalid Element Data Size values (e.g. extending the length of the 2370 EBML Element beyond the scope of the Parent Element; possibly 2371 triggering access-out-of-bounds issues). 2373 * Very high lengths in order to force out-of-memory situations 2374 resulting in a denial of service, access-out-of-bounds issues etc. 2376 * Missing EBML Elements that are mandatory in a Master Element and 2377 have no declared default value, making the semantic invalid at 2378 that Master Element level. 2380 * Usage of invalid UTF-8 encoding in EBML Elements of UTF-8 type 2381 (e.g. in order to trigger access-out-of-bounds or buffer overflow 2382 issues). 2384 * Usage of invalid data in EBML Elements with a date type, 2385 triggering bogus date accesses. 2387 Side channel attacks could exploit: 2389 * The semantic equivalence of the same string stored in a String 2390 Element or UTF-8 Element with and without zero-bit padding, making 2391 comparison at the semantic level invalid. 2393 * The semantic equivalence of VINT_DATA within Element Data Size 2394 with two different lengths due to left-padding zero bits, making 2395 comparison at the semantic level invalid. 2397 * Data contained within a Master Element which is not itself part of 2398 a Child Element can trigger incorrect parsing behavior in EBML 2399 Readers. 2401 * Extraneous copies of Identically Recurring Element, making parsing 2402 unnecessarily slow to the point of not being usable. 2404 * Copies of Identically Recurring Element within a Parent Element 2405 that contain invalid CRC-32 Elements. EBML Readers not checking 2406 the CRC-32 might use the version of the element with mismatching 2407 CRC-32. 2409 * Use of Void Elements which could be used to hide content or create 2410 bogus resynchronization points seen by some EBML Reader and not 2411 others. 2413 17. IANA Considerations 2415 17.1. EBML Element ID Registry 2417 This document creates a new IANA Registry called "EBML Element ID 2418 Registry". 2420 Element IDs are described in section Element ID. Element IDs are 2421 encoded using the VINT mechanism described in section Section 4 can 2422 be between one and five octets long. Five octet long Element IDs are 2423 possible only if declared in the header. 2425 This IANA Registry only applies to Elements that can be contained in 2426 the EBML Header, thus including Global Elements. Elements only found 2427 in the EBML Body have their own set of independent Element IDs and 2428 are not part of this IANA Registry. 2430 One-octet Element IDs MUST be between 0x81 and 0xFE. These items are 2431 valuable because they are short, and need to be used for commonly 2432 repeated elements. Element IDs are to be allocated within this range 2433 according to the "RFC Required" policy [RFC8126]. 2435 The following one-octet Element IDs are RESERVED: 0xFF and 0x80. 2437 The one-octet range of 0x00 to 0x7F are not valid for use as an 2438 Element ID. 2440 Two-octet Element IDs MUST be between 0x407F and 0x7FFE. Element IDs 2441 are to be allocated within this range according to the "Specification 2442 Required" policy [RFC8126]. 2444 The following two-octet Element IDs are RESERVED: 0x7FFF and 0x4000. 2446 The two-octet ranges of 0x0000 to 0x3FFF and 0x8000 to 0xFFFF are not 2447 valid for use as an Element ID. 2449 Three-octet Element IDs MUST be between 0x203FFF and 0x3FFFFE. 2450 Element IDs are to be allocated within this range according to the 2451 "First Come First Served" policy [RFC8126]. 2453 The following three-octet Element IDs are RESERVED: 0x3FFFFF and 2454 0x200000. 2456 The three-octet ranges of 0x000000 to 0x1FFFFF and 0x400000 to 2457 0xFFFFFF are not valid for use as an Element ID. 2459 Four-octet Element IDs MUST be between 0x101FFFFF and 0x1FFFFFFE. 2460 Four-octet Element IDs are somewhat special in that they are useful 2461 for resynchronizing to major structures in the event of data 2462 corruption or loss. As such four-octet Element IDs are split into 2463 two categories. Four-octet Element IDs whose lower three octets (as 2464 encoded) would make printable 7-bit ASCII values (0x20 to 0x7E, 2465 inclusive) MUST be allocated by the "Specification Required" policy. 2466 Sequential allocation of values is not required: specifications 2467 SHOULD include a specific request, and are encouraged to do early 2468 allocations. 2470 To be clear about the above category: four-octet Element IDs always 2471 start with hex 0x10 to 0x1F, and that octet may be chosen so that the 2472 entire VINT has some desirable property, such as a specific CRC. The 2473 other three octets, when ALL having values between 0x20 (32, ASCII 2474 Space) and 0x7E (126, ASCII "~"), fall into this category. 2476 Other four-octet Element IDs may be allocated by the "First Come 2477 First Served" policy. 2479 The following four-octet Element IDs are RESERVED: 0x1FFFFFFF and 2480 0x10000000. 2482 The four-octet ranges of 0x00000000 to 0x0FFFFFFF and 0x20000000 to 2483 0xFFFFFFFF are not valid for use as an Element ID. 2485 Five-octet Element IDs (values from 0x080FFFFFFF to 0x0FFFFFFFFE) are 2486 RESERVED according to the "Experimental Use" policy [RFC8126]: they 2487 may be used by anyone at any time, but there is no coordination. 2489 ID Values found in this document are assigned as initial values as 2490 follows: 2492 +------------+-------------------------+-----------------+ 2493 | Element ID | Element Name | Reference | 2494 +============+=========================+=================+ 2495 | 0x1A45DFA3 | EBML | Described in | 2496 | | | Section 11.2.1 | 2497 +------------+-------------------------+-----------------+ 2498 | 0x4286 | EBMLVersion | Described in | 2499 | | | Section 11.2.2 | 2500 +------------+-------------------------+-----------------+ 2501 | 0x42F7 | EBMLReadVersion | Described in | 2502 | | | Section 11.2.3 | 2503 +------------+-------------------------+-----------------+ 2504 | 0x42F2 | EBMLMaxIDLength | Described in | 2505 | | | Section 11.2.4 | 2506 +------------+-------------------------+-----------------+ 2507 | 0x42F3 | EBMLMaxSizeLength | Described in | 2508 | | | Section 11.2.5 | 2509 +------------+-------------------------+-----------------+ 2510 | 0x4282 | DocType | Described in | 2511 | | | Section 11.2.6 | 2512 +------------+-------------------------+-----------------+ 2513 | 0x4287 | DocTypeVersion | Described in | 2514 | | | Section 11.2.7 | 2515 +------------+-------------------------+-----------------+ 2516 | 0x4285 | DocTypeReadVersion | Described in | 2517 | | | Section 11.2.8 | 2518 +------------+-------------------------+-----------------+ 2519 | 0x4281 | DocTypeExtension | Described in | 2520 | | | Section 11.2.9 | 2521 +------------+-------------------------+-----------------+ 2522 | 0x4283 | DocTypeExtensionName | Described in | 2523 | | | Section 11.2.10 | 2524 +------------+-------------------------+-----------------+ 2525 | 0x4284 | DocTypeExtensionVersion | Described in | 2526 | | | Section 11.2.11 | 2527 +------------+-------------------------+-----------------+ 2528 | 0xBF | CRC-32 | Described in | 2529 | | | Section 11.3.1 | 2530 +------------+-------------------------+-----------------+ 2531 | 0xEC | Void | Described in | 2532 | | | Section 11.3.2 | 2533 +------------+-------------------------+-----------------+ 2535 Table 15: IDs and Names for EBML Elements assigned by 2536 this document. 2538 17.2. EBML DocType Registry 2540 This document creates a new IANA Registry called "EBML DocType 2541 Registry". 2543 To register a new DocType in this registry one needs a DocType name, 2544 a Description of the DocType, a Change Controller (IESG or email of 2545 registrant) and an optional Reference to a document describing the 2546 DocType. 2548 DocType values are described in Section 11.1.3.1. DocTypes are ASCII 2549 strings, defined in Section 7.4, which label the official name of the 2550 EBML Document Type. The strings may be allocated according to the 2551 "First Come First Served" policy. 2553 The use of ASCII corresponds to the types and code already in use, 2554 the value is not meant to be visible to the user. 2556 DocType string values of "matroska" and "webm" are RESERVED to the 2557 IETF for future use. These can be assigned via the "IESG Approval" 2558 or "RFC Required" policies [RFC8126]. 2560 18. Normative References 2562 [ITU.V42.1994] 2563 International Telecommunications Union, "Error-correcting 2564 Procedures for DCEs Using Asynchronous-to-Synchronous 2565 Conversion", 1994. 2567 [RFC0020] Cerf, V., "ASCII format for network interchange", STD 80, 2568 RFC 20, DOI 10.17487/RFC0020, October 1969, 2569 . 2571 [RFC7405] Kyzivat, P., "Case-Sensitive String Support in ABNF", 2572 RFC 7405, DOI 10.17487/RFC7405, December 2014, 2573 . 2575 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 2576 Writing an IANA Considerations Section in RFCs", BCP 26, 2577 RFC 8126, DOI 10.17487/RFC8126, June 2017, 2578 . 2580 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2581 Requirement Levels", BCP 14, RFC 2119, 2582 DOI 10.17487/RFC2119, March 1997, 2583 . 2585 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2586 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2587 May 2017, . 2589 [W3C.REC-xml-20081126] 2590 Bray, T., Paoli, J., Sperberg-McQueen, M., Maler, E., and 2591 F. Yergeau, "Extensible Markup Language (XML) 1.0 (Fifth 2592 Edition)", World Wide Web Consortium Recommendation REC- 2593 xml-20081126, 26 November 2008, 2594 . 2596 [IEEE.754.1985] 2597 Institute of Electrical and Electronics Engineers, 2598 "Standard for Binary Floating-Point Arithmetic", August 2599 1985. 2601 [RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: 2602 Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002, 2603 . 2605 [W3C.SPSD-xhtml-basic-20180327] 2606 McCarron, S., "XHTML(tm) Basic 1.1 - Second Edition", 27 2607 March 2018. 2609 [ISO.3309.1979] 2610 International Organization for Standardization, "Data 2611 communication - High-level data link control procedures - 2612 Frame structure", 1979. 2614 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 2615 10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November 2616 2003, . 2618 [W3C.REC-xmlschema-0-20041028] 2619 Fallside, D. and P. Walmsley, "XML Schema Part 0: Primer 2620 Second Edition", World Wide Web Consortium Recommendation 2621 REC-xmlschema-0-20041028, 28 October 2004, 2622 . 2624 [RFC5646] Phillips, A., Ed. and M. Davis, Ed., "Tags for Identifying 2625 Languages", BCP 47, RFC 5646, DOI 10.17487/RFC5646, 2626 September 2009, . 2628 [ISO.9899.2011] 2629 International Organization for Standardization, 2630 "Programming languages - C", 2011. 2632 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 2633 Specifications: ABNF", STD 68, RFC 5234, 2634 DOI 10.17487/RFC5234, January 2008, 2635 . 2637 19. Informative References 2639 [Matroska] IETF, "Matroska Specifications", 2019, 2640 . 2643 [WebM] The WebM Project, "WebM Container Guidelines", November 2644 2017, . 2646 [W3C.REC-xpath-19991116] 2647 Clark, J. and S. DeRose, "XML Path Language (XPath) 2648 Version 1.0", World Wide Web Consortium Recommendation 2649 REC-xpath-19991116, 16 November 1999, 2650 . 2652 Authors' Addresses 2654 Steve Lhomme 2656 Email: slhomme@matroska.org 2658 Dave Rice 2660 Email: dave@dericed.com 2662 Moritz Bunkus 2664 Email: moritz@bunkus.org