Expand description
TTML document structure — W3C TTML2 §3 (element syntax).
This module defines the full element tree for a TTML2 document. Each element
type captures all attributes listed in its syntax box (see ttml2-syntax.md §3)
plus any namespace-qualified attributes in the TT Style Namespaces, TT Metadata
Namespace, and TT Parameter Namespace.
Parsing is done via roxmltree; the parsed document tree is a fully typed
Rust structure that does NOT contain the original XML text (no raw-passthrough).
Structs§
- Body
Element <body>element — TTML2 §8.1.3.- BrElement
<br>element — TTML2 §8.1.7.- DivElement
<div>element — TTML2 §8.1.4.- Document
- A parsed TTML document.
- Ebuttm
Element - Generic EBU-TT-M element (like
<ebuttm:documentMetadata>). - Ebuttm
Text Element - Text-only EBU-TT-M element (like
<ebuttm:conformsToStandard>). - Head
Element <head>element — TTML2 §8.1.2.- Image
Element - An
<image>element — TTML2 §9.1.5 / IMSC 1.1 §9.4.4. - Initial
Element <initial>element — TTML2 §10.1.1.- Ittm
AltText Element <ittm:altText>— IMSC 1.1 §7.8.4.- Layout
Element <layout>container — TTML2 §11.1.1.- Metadata
Element - A
<metadata>element — TTML2 §14.1.1. - PElement
<p>element — TTML2 §8.1.5.- Region
Element <region>element — TTML2 §11.1.2.- SetElement
<set>element — TTML2 §13.1.3.- Span
Element <span>element — TTML2 §8.1.6.- Style
Attributes - All 52 TTML2 style properties (and IMSC extensions) collected in one struct.
- Style
Element <style>element — TTML2 §10.1.2.- Styling
Element <styling>container — TTML2 §10.1.3.- TtElement
- The root
<tt>element — TTML2 §8.1.1. - TtmAgent
Element <ttm:agent>— TTML2 §14.1.3.- TtmItem
Element <ttm:item>— TTML2 §14.1.6.- TtmName
Element <ttm:name>— TTML2 §14.1.7.- TtmText
Element - A text-only metadata element (
ttm:title,ttm:desc,ttm:copyright). - XmlDeclaration
- Parsed XML declaration.
Enums§
- Animation
Child - Animation children (in body, div, p, span, region).
- Inline
Content - Inline content within
<p>and<span>. - Metadata
Child - Metadata children.
- XmlSpace
xml:spacevalues.
Constants§
- IMSC1_
IMAGE_ PROFILE - IMSC 1.0/1.0.1 Image Profile designator.
- IMSC1_
TEXT_ PROFILE - IMSC 1.0/1.0.1 Text Profile designator.
- IMSC11_
IMAGE_ PROFILE - IMSC 1.1 Image Profile designator — IMSC 1.1 §9.1.
- IMSC11_
TEXT_ PROFILE - IMSC 1.1 Text Profile designator — IMSC 1.1 §8.1.
- NS_
EBUTTM - EBU-TT Metadata namespace:
urn:ebu:tt:metadata - NS_
EBUTTS - EBU-TT Styling namespace:
urn:ebu:tt:style - NS_ITTM
- IMSC Metadata namespace:
http://www.w3.org/ns/ttml/profile/imsc1#metadata - NS_ITTP
- IMSC Parameter namespace:
http://www.w3.org/ns/ttml/profile/imsc1#parameter - NS_ITTS
- IMSC Styling namespace:
http://www.w3.org/ns/ttml/profile/imsc1#styling - NS_
SMPTE - SMPTE-TT Extension namespace:
http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt - NS_TT
- TTML namespace:
http://www.w3.org/ns/ttml - NS_TTA
- TT Audio Style namespace:
http://www.w3.org/ns/ttml#audio - NS_TTM
- TT Metadata namespace:
http://www.w3.org/ns/ttml#metadata - NS_TTP
- TT Parameter namespace:
http://www.w3.org/ns/ttml#parameter - NS_TTS
- TT Style namespace:
http://www.w3.org/ns/ttml#styling - NS_
TT_ FEATURE - TT Feature namespace:
http://www.w3.org/ns/ttml/feature/ - NS_
TT_ PROFILE - TT Profile namespace:
http://www.w3.org/ns/ttml/profile/ - NS_XML
- XML namespace:
http://www.w3.org/XML/1998/namespace