Skip to content

Commit

Permalink
Merge pull request #310 from cellar-wg/id-uniqueness
Browse files Browse the repository at this point in the history
add statement about uniqueness of id and path within an ebml schema
  • Loading branch information
dericed authored Dec 22, 2019
2 parents 59afed0 + 03504c0 commit e01d715
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions specification.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -414,12 +414,16 @@ If the path contains an EBMLPathAtomRecursive part, the EBML Element can occur w

As an example, a `path` of `1*(\Segment\Info)` means the element Info is found inside the Segment elements at least once and with no maximum iteration. An element SeekHead with path `0*2(\Segment\SeekHead)` may not be found at all in its Segment parent, once or twice but no more than that.

The `@path` value MUST be unique within the EBML Schema. The `@id` value corresponding to this `@path` MUST NOT be defined for use within another EBML Element with the same EBMLParentPath as this `@path`.

#### id

Within an EBML Schema, the XPath of `@id` attribute is `/EBMLSchema/element/@id`.

The Element ID encoded as a Variable Size Integer expressed in hexadecimal notation prefixed by a 0x that is read and stored in big-endian order. To reduce the risk of false positives while parsing EBML Streams, the Element IDs of the Root Element and Top-Level Elements SHOULD be at least 4 octets in length. Element IDs defined for use at Root Level or directly under the Root Level MAY use shorter octet lengths to facilitate padding and optimize edits to EBML Documents; for instance, the Void Element uses an Element ID with a one octet length to allow its usage in more writing and editing scenarios.

The Element ID of any Element found within an EBML Document MUST only match a single `@path` value of its corresponding EBML Schema, but a separate instance of that Element ID value defined by the EBML Schema MAY occur within a different `@path`. If more than one Element is defined to use the same `@id` value, then the `@path` values of those Elements MUST NOT share the same EBMLParentPath. Elements MUST NOT be defined to use the same `@id` value if one of their common Parent Elements could be an Unknown-Size Element.

The id attribute is REQUIRED.

#### minOccurs
Expand Down

0 comments on commit e01d715

Please sign in to comment.