W3C

Timed Text (TT) Authoring Format 1.0 – Distribution Format Exchange Profile (DFXP)

W3C Candidate Recommendation 16 November 2006

This version:
http://www.w3.org/TR/2006/CR-ttaf1-dfxp-20061116/
Latest version:
http://www.w3.org/TR/ttaf1-dfxp/
Previous version:
http://www.w3.org/TR/2006/WD-ttaf1-dfxp-20060427/
Editor:
Glenn Adams, Extensible Formatting Systems, Inc. (XFSI)
Contributing Authors:
Mike Dolan, Invited Expert
Geoff Freed, WGBH National Center for Accessible Media
Sean Hayes, Microsoft
Erik Hodge, RealNetworks
David Kirby, British Broadcasting Corporation (BBC)
Thierry Michel, W3C
Dave Singer, Apple Computer

Abstract

This document specifies the distribution format exchange profile (DFXP) of the timed text authoring format (TT AF) in terms of a vocabulary and semantics thereof.

The timed text authoring format is a content type that represents timed text media for the purpose of interchange among authoring systems. Timed text is textual information that is intrinsically or extrinsically associated with timing information.

The Distribution Format Exchange Profile is intended to be used for the purpose of transcoding or exchanging timed text information among legacy distribution content formats presently in use for subtitling and captioning functions.

In addition to being used for interchange among legacy distribution content formats, DFXP content may be used directly as a distribution format, for example, providing a standard content format to reference from a <text> or <textstream> media object element in a [SMIL 2.1] document.

Status of this Document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.

This is the 16 November 2006 Candidate Recommendation of the Timed Text (TT) Authoring Format 1.0 – Distribution Format Exchange Profile (DFXP). W3C publishes a Candidate Recommendation to indicate that the document is believed to be stable and to encourage implementation by the developer community. The Timed Text (TT) Working Group expects to request that the Director advance this document to Proposed Recommendation once the Working Group has, for each test in the DFXP 1.0 Test Suite, demonstrated support by two interoperable implementations. The Working Group, working closely with the developer community, expects to show these implementations by 16 February 2007. This estimate is based in part on the preliminary DFXP Interoperability Implementation Report. The Working Group does not plan to request to advance to Proposed Recommendation prior to 16 January 2007.

This is a W3C Candidate Recommendation. The second Last Call Working Draft for this specification resulted in a number of Last Call comments which have all been addressed by the working group; a list of all Last Call comments can be found in the Second Last Call Comments List. The list of changes made since the last public Working Draft is available in M.2 Changes from Second Last Call Working Draft to Candidate Recommendation.

During the first Last Call period of this specification, there were unsatisfied comments that the working group was unable to resolve in a manner that satisfied the commenter(s). The status of these comments has not changed during the second Last Call period, as the working group continues to stand by its original responses. See also the First Last Call Disposition of Comments for a complete discussion.

The dynamic flow processing feature, as specified by the tts:dynamicFlow styling attribute vocabulary, see also B Dynamic Flow Processing Model, has been determined to be at risk, and is expected to be given the greatest scrutiny in the implementation report.

Comments on this document should be sent to the email list public-tt@w3.org, which is the public mailing list of Timed Text Working Group (list archives). To subscribe, send an email to public-tt-request@w3.org with the word subscribe in the subject line.

This document has been produced by the Timed Text (TT) Working Group as part of the W3C Synchronized Multimedia Activity, following the procedures set out for the W3C Process. The authors of this document are listed in the header of this document.

This document is governed by the 24 January 2002 CPP as amended by the W3C Patent Policy Transition Procedure. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.

Publication as a Candidate Recommendation does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.

Table of Contents

1 Introduction
    1.1 System Model
    1.2 Document Example
2 Definitions
    2.1 Acronyms
    2.2 Terminology
    2.3 Documentation Conventions
3 Conformance
    3.1 Content Conformance
    3.2 Processor Conformance
    3.3 Claims
4 Document Types
    4.1 DFXP Content
5 Vocabulary
    5.1 Namespaces
    5.2 Profiles
    5.3 Catalog
        5.3.1 Core Catalog
        5.3.2 Extension Catalog
6 Parameters
    6.1 Element Vocabulary
    6.2 Attribute Vocabulary
        6.2.1 ttp:cellResolution
        6.2.2 ttp:clockMode
        6.2.3 ttp:frameRate
        6.2.4 ttp:frameRateMultiplier
        6.2.5 ttp:markerMode
        6.2.6 ttp:pixelAspectRatio
        6.2.7 ttp:profile
        6.2.8 ttp:smpteMode
        6.2.9 ttp:subFrameRate
        6.2.10 ttp:tickRate
        6.2.11 ttp:timeBase
7 Content
    7.1 Element Vocabulary
        7.1.1 tt
        7.1.2 head
        7.1.3 body
        7.1.4 div
        7.1.5 p
        7.1.6 span
        7.1.7 br
    7.2 Attribute Vocabulary
        7.2.1 xml:id
        7.2.2 xml:lang
        7.2.3 xml:space
8 Styling
    8.1 Element Vocabulary
        8.1.1 styling
        8.1.2 style
    8.2 Attribute Vocabulary
        8.2.1 style
        8.2.2 tts:backgroundColor
        8.2.3 tts:color
        8.2.4 tts:direction
        8.2.5 tts:display
        8.2.6 tts:displayAlign
        8.2.7 tts:dynamicFlow
        8.2.8 tts:extent
        8.2.9 tts:fontFamily
        8.2.10 tts:fontSize
        8.2.11 tts:fontStyle
        8.2.12 tts:fontWeight
        8.2.13 tts:lineHeight
        8.2.14 tts:opacity
        8.2.15 tts:origin
        8.2.16 tts:overflow
        8.2.17 tts:padding
        8.2.18 tts:showBackground
        8.2.19 tts:textAlign
        8.2.20 tts:textDecoration
        8.2.21 tts:textOutline
        8.2.22 tts:unicodeBidi
        8.2.23 tts:visibility
        8.2.24 tts:wrapOption
        8.2.25 tts:writingMode
        8.2.26 tts:zIndex
    8.3 Style Value Expressions
        8.3.1 <alpha>
        8.3.2 <color>
        8.3.3 <digit>
        8.3.4 <duration>
        8.3.5 <familyName>
        8.3.6 <genericFamilyName>
        8.3.7 <flowFunction>
        8.3.8 <flowIntervalFunction>
        8.3.9 <hexDigit>
        8.3.10 <integer>
        8.3.11 <length>
        8.3.12 <namedColor>
        8.3.13 <quotedString>
        8.3.14 <string>
    8.4 Style Association
        8.4.1 Inline Styling
        8.4.2 Referential Styling
        8.4.3 Chained Referential Styling
    8.5 Style Inheritance
        8.5.1 Content Style Inheritance
        8.5.2 Region Style Inheritance
9 Layout
    9.1 Element Vocabulary
        9.1.1 layout
        9.1.2 region
    9.2 Attribute Vocabulary
        9.2.1 region
    9.3 Region Layout and Presentation
        9.3.1 Synchronic Region Construction
        9.3.2 Synchronic Flow Processing
        9.3.3 Elaborated Example
    9.4 Line Layout
10 Timing
    10.1 Element Vocabulary
    10.2 Attribute Vocabulary
        10.2.1 begin
        10.2.2 end
        10.2.3 dur
        10.2.4 timeContainer
    10.3 Time Value Expressions
        10.3.1 <timeExpression>
    10.4 Time Intervals
11 Animation
    11.1 Element Vocabulary
        11.1.1 set
    11.2 Attribute Vocabulary
12 Metadata
    12.1 Element Vocabulary
        12.1.1 metadata
        12.1.2 ttm:title
        12.1.3 ttm:desc
        12.1.4 ttm:copyright
        12.1.5 ttm:agent
        12.1.6 ttm:name
        12.1.7 ttm:actor
    12.2 Attribute Vocabulary
        12.2.1 ttm:agent
        12.2.2 ttm:role

Appendices

A Reduced XML Infoset
    A.1 Document Information Item
    A.2 Element Information Item
    A.3 Attribute Information Item
    A.4 Character Information Item
B Dynamic Flow Processing Model
    B.1 Introduction
    B.2 Flow Buffer
    B.3 Flow Interval Timing Calculation
        B.3.1 Computed Fill Timing Interval
        B.3.2 Computed Clear Timing Interval
    B.4 Flow Operations
        B.4.1 Fill Operation
        B.4.2 Reflow Operation
        B.4.3 Clear Operation
    B.5 Flow Timers
        B.5.1 Fill Timer
        B.5.2 Clear Timer
C Schemas
    C.1 Relax NG Schema
        C.1.1 Driver
        C.1.2 Modules
            C.1.2.1 Animation Module
            C.1.2.2 Classes Module
            C.1.2.3 Content Module
            C.1.2.4 Core Attributes Module
            C.1.2.5 Data Types Module
            C.1.2.6 Document Module
            C.1.2.7 Header Module
            C.1.2.8 Layout Module
            C.1.2.9 Metadata Module
            C.1.2.10 Metadata Items Module
            C.1.2.11 Metadata Attributes Module
            C.1.2.12 Parameter Attributes Module
            C.1.2.13 Styling Attributes Module
            C.1.2.14 Styling Module
            C.1.2.15 Timing Attributes Module
    C.2 XML Schema Definition (XSD) Schema
        C.2.1 Driver
        C.2.2 Modules
            C.2.2.1 Animation Module
            C.2.2.2 Content Module
            C.2.2.3 Core Attributes Module
            C.2.2.4 Data Types Module
            C.2.2.5 Document Module
            C.2.2.6 Header Module
            C.2.2.7 Layout Module
            C.2.2.8 Metadata Module
            C.2.2.9 Metadata Items Module
            C.2.2.10 Metadata Attributes Module
            C.2.2.11 Parameter Attributes Module
            C.2.2.12 Styling Attributes Module
            C.2.2.13 Styling Module
            C.2.2.14 Timing Attributes Module
            C.2.2.15 XML Attributes Module
D Media Type Registration
E References
F Other References (Non-Normative)
G Sample Code (Non-Normative)
    G.1 Reduced XML Infoset (RXI) – RXI.SCM
    G.2 Abstract Document Instance (ADI) – ADI.SCM
    G.3 Time Interval Resolver (TIR) – TIR.SCM
    G.4 Flow Object Transformer (FOX) – FOX.SCM
    G.5 Dynamic Text Flow Processor (DTF) – DTF.SCM
    G.6 Sample Compile, Load, and Run Session
H Requirements (Non-Normative)
I Vocabulary Derivation (Non-Normative)
    I.1 Element Derivation
    I.2 Attribute Derivation
J QA Framework Compliance (Non-Normative)
    J.1 Requirements
    J.2 Guidelines
K Streaming DFXP Content (Non-Normative)
L Acknowledgments (Non-Normative)
M Change History (Non-Normative)
    M.1 Changes from First to Second Last Call Working Draft
    M.2 Changes from Second Last Call Working Draft to Candidate Recommendation


1 Introduction

Unless specified otherwise, this section and its sub-sections are non-normative.

The Timed Text Authoring Format (TT AF) Distribution Format Exchange Profile (DFXP) provides a standardized representation of a particular subset of textual information with which stylistic, layout, and timing semantics are associated by an author or an authoring system for the purpose of interchange and potential presentation.

DFXP is expressly designed to meet only a limited set of requirements established by [TTAF1-REQ], and summarized in H Requirements. In particular, only those requirements which service the need of performing interchange with existing, legacy distribution systems are satisfied.

In addition to being used for interchange among legacy distribution content formats, DFXP content may be used directly as a distribution format, providing, for example, a standard content format to reference from a <text> or <textstream> media object element in a [SMIL 2.1] document. Certain properties of DFXP support streamability of content, as described in K Streaming DFXP Content.

Note:

While DFXP was not expressly designed for direct (embedded) integration into a SMIL document instance, such integration is not precluded.

Note:

In some contexts of use, it may be appropriate to employ animated content to depict sign language representations of the same content as expressed by a Timed Text document instance. This use case is not explicitly addressed by DFXP mechanisms, but may be addressed by some external multimedia integration technology, such as SMIL.

1.1 System Model

Use of DFXP is intended to function in a wider context of Timed Text Authoring and Distribution mechanisms that are based upon a system model, depicted in Figure 1 – System Model, wherein the timed text authoring format serves as a bidirectional interchange format among a heterogeneous collection of authoring systems, and as a unidirectional interchange format to a heterogeneous collection of distribution formats after undergoing transcoding or compilation to the target distribution formats as required, and where one particular distribution format is DFXP.

Figure 1 – System Model
System Model

1.2 Document Example

A DFXP document instance consists of a tt document element that contains a header and a body, where the header specifies document level metadata, styling definitions and layout definitions, and the body specifies text content intermixed with references to style and layout information and inline timing information.

Example Fragment – DFXP Document Structure
<tt xml:lang="" xmlns="http://www.w3.org/2006/10/ttaf1">
  <head>
    <metadata/>
    <styling/>
    <layout/>
  </head>
  <body/>
</tt>

Document level metadata may specify a document title, description, and copyright information. In addition, arbitrary metadata drawn from other namespaces may be specified.

Example Fragment – DFXP Metadata
<metadata xmlns:ttm="http://www.w3.org/2006/10/ttaf1#metadata">
  <ttm:title>Timed Text DFXP Example</ttm:title>
  <ttm:copyright>The Authors (c) 2006</ttm:copyright>
</metadata>

Styling information may be specified in the form of style specification definitions that are referenced by layout and content information.

In Example Fragment – DFXP Styling, four style sets of specifications are defined, with one set serving as a collection of default styles.

Example Fragment – DFXP Styling
<styling xmlns:tts="http://www.w3.org/2006/10/ttaf1#style">
  <!-- s1 specifies default color, font, and text alignment -->
  <style xml:id="s1"
    tts:color="white"
    tts:fontFamily="proportionalSansSerif"
    tts:fontSize="22px"
    tts:textAlign="center"
  />
  <!-- alternative using yellow text but otherwise the same as style s1 -->
  <style xml:id="s2" style="s1" tts:color="yellow"/>
  <!-- a style based on s1 but justified to the right -->
  <style xml:id="s1Right" style="s1" tts:textAlign="end" />     
  <!-- a style based on s2 but justified to the left -->
  <style xml:id="s2Left" style="s2" tts:textAlign="start" />
</styling>

Layout information defines one or more regions into which content is intended to be presented. A region definition may reference one or more sets of style specifications in order to permit content flowed in the region to inherit from these styles. In Example Fragment – DFXP Layout, the region definition makes reference to style specification s1 which allows all content flowed into the region to inherit from the region's styles (in the case that a style is not already explicitly specified on content or inherited via the content hierarchy.)

Example Fragment – DFXP Layout
<layout xmlns:tts="http://www.w3.org/2006/10/ttaf1#style">
  <region xml:id="subtitleArea"
    style="s1"
    tts:extent="560px 62px"
    tts:padding="5px 3px"
    tts:backgroundColor="black"
    tts:displayAlign="after"
  />
</layout>  

The content of a DFXP document instance is expressed in its body, which is organized in terms of block and inline text elements. The hierarchical organization of content elements serves a primary role in determining both spatial and temporal relationships. For example, in Example Fragment – DFXP Body, each paragraph (p element) is flowed into its target region in the specified lexical order; furthermore, the active time interval of each paragraph is timed in accordance to its parent or sibling according to the applicable time containment semantics — in this case, the division parent is interpreted as a parallel time container.

Example Fragment – DFXP Body
<body region="subtitleArea">
  <div>
    <p xml:id="subtitle1" begin="0.76s" end="3.45s">
      It seems a paradox, does it not,
    </p>
    <p xml:id="subtitle2" begin="5.0s" end="10.0s">
      that the image formed on<br/>
      the Retina should be inverted?
    </p>
    <p xml:id="subtitle3" begin="10.0s" end="16.0s" style="s2">
      It is puzzling, why is it<br/>
      we do not see things upside-down?
    </p>
    <p xml:id="subtitle4" begin="17.2s" end="23.0s">
      You have never heard the Theory,<br/>
      then, that the Brain also is inverted?
    </p>
    <p xml:id="subtitle5" begin="23.0s" end="27.0s" style="s2">
      No indeed! What a beautiful fact!
    </p>
    <p xml:id="subtitle6a" begin="28.0s" end="34.6s" style="s2Left">
      But how is it proved?
    </p>
    <p xml:id="subtitle6b" begin="28.0s" end="34.6s" style="s1Right">
      Thus: what we call
    </p>
    <p xml:id="subtitle7" begin="34.6s" end="45.0s" style="s1Right">
      the vertex of the Brain<br/>
      is really its base
    </p>
    <p xml:id="subtitle8" begin="45.0s" end="52.0s" style="s1Right">
      and what we call its base<br/>
      is really its vertex,
    </p>
    <p xml:id="subtitle9a" begin="53.5s" end="58.7s">
      it is simply a question of nomenclature.
    </p>
    <p xml:id="subtitle9b" begin="53.5s" end="58.7s" style="s2">
      How truly delightful!
    </p>
  </div>    
</body>

The first subtitle Subtitle 1 – Time Interval [0.76, 3.45) is presented during the time interval 0.76 to 3.45 seconds. In this example, the default metric for time expressions is seconds since no metric is specified in the expressions. This subtitle inherits its font family, font size, foreground color, and text alignment from the region into which it is presented. Since no region is explicitly specified on the paragraph, the nearest ancestor that specifies a region determines the region. Note also that content is presented at the bottom (after edge) of the containing region due to the tts:displayAlign="after" being specified on the region definition.

Note:

The notation "[X,Y]" denotes a closed interval from X to Y, including X and Y; "[X,Y)" denotes a right half-open interval from X to Y, including X but not including Y; "(X,Y]" denotes a left half-open interval from X to Y, not including X but including Y; "(X,Y)" denotes an open interval from X to Y, not including X or Y.

Subtitle 1 – Time Interval [0.76, 3.45)
Subtitle 1

The second subtitle continues with the default style, except that it contains two lines of text with an intervening author-specified line break. Note the effects of the use of tts:textAlign="center" to specify the paragraph's alignment in the inline progression direction.

Subtitle 2 – Time Interval [5.0, 10.0)
Subtitle 2

The third subtitle continues, using a variant style which overrides the default style's foreground color with a different color.

Subtitle 3 – Time Interval [10.0, 16.0)
Subtitle 3

The fourth subtitle reverts to the default style.

Subtitle 4 – Time Interval [17.2, 23.0)
Subtitle 4

The fifth subtitle continues, again using a variant style which overrides the default style's foreground color with a different color.

Subtitle 5 – Time Interval [23.0, 27.0)
Subtitle 5

During the next active time interval, two distinct subtitles are simultaneously active, with the paragraph expressing each subtitle using a different style that overrides color and paragraph text alignment of the default style. Note that the flow order is determined by the lexical order of elements as they appear in the content hierarchy.

Subtitles 6a and 6b – Time Interval [28.0, 34.6)
Subtitles 6a and 6b

The next subtitle is specified in a similar manner using a style override to give a paragraph right (end) justified in the inline progression direction.

Subtitle 7 – Time Interval [34.6, 45.0)
Subtitles 7a and 7b

The eighth subtitle uses the same style override as the previous subtitle in order to maintain the right (end) justification of the paragraph.

Subtitle 8 – Time Interval [47.3, 49.0)
Subtitle 8

During the final (ninth) active time interval, two distinct subtitles are again simultaneously active, but with a different style applied to the second paragraph to override the default color. Note that the flow order is determined by the lexical order of elements as they appear in the content hierarchy.

Subtitles 9a and 9b – Time Interval [53.5, 58.7)
Subtitles 9a and 9b

The examples shown above demonstrate the primary types of information that may be authored using DFXP: metadata, styling, layout, timing, and content. In typical cases, styling and layout information are separately specified in a document instance. Content information is expressed in a hierarchical fashion that embodies the organization of both spatial (flow) and timing information. Content makes direct or indirect references to styling and layout information and may specify inline overrides to styling.

2 Definitions

2.1 Acronyms

DFXP

Distribution Format Exchange Profile

TT

Timed Text

TT AS

Timed Text Authoring System

TT AF

Timed Text Authoring Format

TT WG

Timed Text Working Group

2.2 Terminology

Abstract Document Instance

An instance of an abstract data set as represented by a Reduced XML Infoset.

Abstract Document Type

A set of constraints that defines a class of XML Information Sets [XML InfoSet].

Attribute Information Item

Each specified or defaulted attribute of an XML document corresponds with an attribute information item as defined by [XML InfoSet], §2.3.

Character Information Item

Each data character appearing in an XML document corresponds with a character information item as defined by [XML InfoSet], §2.6.

Content Region

A logical region into which rendered content is placed when modeling or performing presentation processing.

Element Information Item

Each element appearing in an XML document corresponds with an element information item as defined by [XML InfoSet], §2.2.

Exchange Profile

A profile (subset) of the TT AF that serves a set of needs for content exchange.

Region

A logical construct that models authorial intention regarding desired or potential presentation processing, and which is represented as a rectangular area of a presentation surface into which content is composed and rendered during presentation processing.

Reduced XML Infoset

An XML Information Set [XML InfoSet] that satisfieds the constraints specify by A Reduced XML Infoset.

Root Container Region

A logical region that establishes a coordinate system into which content regions are placed and optionally clipped.

Timed Text

Textual information that is intrinsically or extrinsically associated with timing information.

Timed Text Authoring Format

A content type that represents timed text media for the purpose of interchange among authoring systems.

Timed Text Authoring System

A content authoring system capable of importing and exporting timed text authoring format content.

2.3 Documentation Conventions

Within normative prose in this specification, the words may, should, and must are defined as follows:

may

Conforming documents and/or TT AF processors are permitted to, but need not behave as described.

should

Conforming documents and/or TT AF processors are strongly recommended to, but need not behave as described.

must

Conforming documents and/or TT AF processors are required to behave as described; otherwise, they are in error.

All normative syntactic definitions of XML representations and other related terms are depicted with a light orange background color and labeled as "XML Representation" or "Syntax Representation", such as in the following:

XML Representation – Element Information Item: example
<example
  count = integer
  size = (large|medium|small) : medium>
  Content: (all | any*)
</example>

In an XML representation, bold-face attribute names (e.g. count above) indicate a required attribute information item, and the rest are optional. Where an attribute information item has an enumerated type definition, the values are shown separated by vertical bars, as for size above; if there is a default value, it is shown following a colon. Where an attribute information item has a built-in simple type definition defined in [XML Schema Part 2], a hyperlink to its definition therein is given.

The allowed content of the information item is shown as a grammar fragment, using the Kleene operators ?, * and +. Each element name therein is a hyperlink to its own illustration.

All content of this specification that is not explicitly marked as non-normative is considered to be normative. If a section or appendix header contains the the expression "Non-Normative", then the entirety of the section or appendix is considered non-normative.

All paragraphs marked as a Note are considered non-normative.

Example code fragments are depicted with a light blue-green background color and labeled as "Example Fragment", such as in the following:

Example Fragment – Sample
<tt xml:lang="" xmlns="http://www.w3.org/2006/10/ttaf1">
  <head>
    <metadata/>
    <styling/>
    <layout/>
  </head>
  <body/>
</tt>

3 Conformance

This section specifies the general conformance requirements for TT AF content and processors.

3.1 Content Conformance

A TT AF document instance conforms to this specification if the following criteria are satisfied:

  1. When transporting a document instance in a context in which a MIME Media Type [MIME] identifies the content type of the interchanged document instance, then the specified media type is application/ttaf+xml in conformance with [XML Media Types] § 7, with which an optional profile parameter may appear, the value of which conforms to the values defined by 5.2 Profiles.

  2. The document instance is or can be represented as a Reduced XML Infoset as defined by A Reduced XML Infoset.

  3. The Reduced XML Infoset that corresponds to the document instance is or can be associated with one of the TT AF Abstract Document Types defined by 4 Document Types.

  4. The Reduced XML Infoset that corresponds to the document instance is a Valid Abstract Document Instance of the associated Abstract Document Type.

  5. The Reduced XML Infoset satisfies all additional mandatory syntactic and semantic constraints defined by this specification. In addition, this Infoset should satisfy the web content accessibility guidelines specified by [WCAG].

3.2 Processor Conformance

A TT AF processor conforms to this specification if the following criteria are satisfied:

  1. The processor provides at least one mechanism for notionally instantiating a Reduced XML Infoset representation of a conformant TT AF document instance.

  2. If a process does or can perform validation of a candidate TT AF document instance, then it provides at least one mechanism to implicitly or explicitly associate the Reduced XML Infoset representation of a conformant TT AF document instance with one of the TT AF Abstract Document Types defined by 4 Document Types.

  3. The processor does not a priori reject or abort the processing of a conformant TT AF document instance.

  4. The processor supports all mandatory processing semantics defined by this specification.

  5. If the processor claims to support presentation processing in order to produce a rendition of TT AF content on a visual medium, then it must implement the region and line layout semantics defined by 9.3 Region Layout and Presentation and 9.4 Line Layout, respectively. In addition, the processor should satisfy the user agent accessibility guidelines specified by [UAAG].

  6. If the processor supports some optional processing semantics defined by this specification, then it does so in a manner consistent with the defined semantics.

3.3 Claims

Any claim of compliance with respect to TT AF content or processor conformance must make reference to an implementation compliance statement (ICS).

An implementation compliance statement must identify all mandatory and optional features of this specification that are satisfied by the content or processor implementation. In particular, the statement must identify the utilized or supported TT AF vocabulary profile(s) as defined by 5.2 Profiles, and, if a subset or superset profile is used or supported, then what features are excluded or included in the subset or superset profile.

A TT AF document instance for which a compliance claim is made must specify a ttp:profile attribute on its root element as defined by 6.2.7 ttp:profile.

4 Document Types

This section defines the following TT AF Abstract Document Types:

Each abstract document type consists of the following constraints:

An Abstract Document Instance may be assessed in terms of validity, and is considered to be a Valid Abstract Document Instance if it satisfies the following condition: if after

  1. pruning all element information items whose names are not members of the collection of element types defined by the associated abstract document type, then

  2. pruning character information item children from any remaining element in case that all character children of the element denote XML whitespace characters and the element's type is defined as empty in the associated Abstract Document Type, and then

  3. pruning all attribute information items having expanded names such that the namespace URI of the expanded names are not listed in Table 1 – Namespaces,

then the document element is one of the document element types permitted by the associated abstract document type, the descendants of the document element satisfy their respective element type's content specifications, all required attributes are present, and the declared value of each attribute satisfies the type declared by the associated abstract document type.

Note:

While a conformant processor may not a priori reject a conformant document instance, a given document instance may be constrained by the author or authoring tool to satisfy a more restrictive definition of validity.

4.1 DFXP Content

DFXP Content is an abstract document type of the Timed Text Authoring Format intended to be used for interchange among distribution systems. This document type is defined in terms of the element and attribute vocabulary specified in 5 Vocabulary.

This specification defines two types of normative schemas that may be used to validate a subset of conformant DFXP document instances:

The (root) document element of a DFXP document instance must be a tt element, as defined by 7.1.1 tt.

5 Vocabulary

This section defines the namespaces, profiles, and vocabulary (as an element an attribute catalog) of the Timed Text Authoring Format (TT AF) as follows:

5.1 Namespaces

The Timed Text Authoring Format (TT AF) employs a number of namespaces for elements and certain global attributes. The following table specifies this set of namespaces and indicates the default prefix used within this specification and the normative URI that denotes each namespace.

Note:

In a specific document instance, it is not required that the default prefixes shown below are used. Any prefix or namespace binding that satisfies the constraints of XML Namespaces may be used that is associated with the specified namespace URI.

Table 1 – Namespaces
Name Prefix Value
TT tt: http://www.w3.org/2006/10/ttaf1
TT Parameter ttp: http://www.w3.org/2006/10/ttaf1#parameter
TT Style tts: http://www.w3.org/2006/10/ttaf1#style
TT Style Extensions ttsx: http://www.w3.org/2006/10/ttaf1#style-extension
TT Metadata ttm: http://www.w3.org/2006/10/ttaf1#metadata
TT Metadata Extensions ttmx: http://www.w3.org/2006/10/ttaf1#metadata-extension

Note:

If a reference to an element type is used in this specification and the name of the element type is not namespace qualified, then the TT Namespace applies.

5.2 Profiles

The Timed Text Authoring Format (TT AF) employs a number of profiles of its vocabulary and associated semantics. The following table specifies this set of profiles and indicates a normative name for each profile.

Table 2 – Profiles
Name Value
DFXP http://www.w3.org/2006/10/ttaf1#profile-dfxp

A convention is defined for use by content authors to indicate use of a subtractive or additive delta to a predefined profile by using an optional sub-profile suffix of a profile URI: if a sub-profile is subtractive (results in a proper subset), then the sub-profile is expressed as "-token"; if additive (results in a proper superset), then it is expressed as "+token", where token expresses an author determined sub-profile that adheres to the xsd:NCName data type defined in [XML Schema Part 2], §3.3.7.

All tokens used in a sub-profile suffix that do not start with the prefix x- are reserved for future standardization.

The profile of a document instance is specified using a ttp:profile attribute as defined by 6.2.7 ttp:profile.

Note:

A TT AF authoring system may indicate the profile of TT AF used in a document instance by specifying a ttp:profile attribute. A TT AF content processor may make use of this profile value to associate a document instance with a schema or processing functions.

An example of an author defined "tiny" subtractive sub-profile of DFXP is shown below in Example Fragment – DFXP Subtractive Profile.

Example Fragment – DFXP Subtractive Profile
<tt
  ttp:profile="http://www.w3.org/2006/10/ttaf1#profile-dfxp-x-tiny"
  xml:lang=""
  xmlns="http://www.w3.org/2006/10/ttaf1"
  xmlns:ttp="http://www.w3.org/2006/10/ttaf1#parameter">
 ...
</tt>

Note:

Because the above example is an author defined sub-profile (as opposed to a future W3C defined profile), the sub-profile token contains the prefix x-.

5.3 Catalog

The vocabulary of the Timed Text Authoring Format (TT AF) is defined in the following major catalogs (divisions of vocabulary):

The core catalog defines the baseline, core vocabulary of the TT AF, and, in particular, the vocabulary of DFXP. The extensions catalog serves as a placeholder for extensions to the core vocabulary defined by DFXP.

5.3.1 Core Catalog

The core vocabulary catalog is intended to satisfy the needs of DFXP while providing a baseline vocabulary for future profiles. This vocabulary is divided into distinct categories, specified in detail in the following sections:

The core element vocabulary specified for use with a TT AF document instance is enumerated in Table 3 – Element Vocabulary.

Table 3 – Element Vocabulary
Module Elements
Animation set
Content body, div, p, span, br
Document tt
Head head
Layout layout, region
Metadata metadata
Metadata Items ttm:actor, ttm:agent, ttm:copyright, ttm:desc, ttm:name, ttm:title
Styling styling, style

Element vocabulary groups that are used in defining content models for TT AF element types are enumerated in Table 4 – Element Vocabulary Groups.

Table 4 – Element Vocabulary Groups
Group Elements
Animation.class set
Block.class div | p
Inline.class span | br | #PCDATA
Metadata.class metadata | ttm:agent | ttm:copyright | ttm:desc | ttm:title

The attribute vocabulary specified for use with the core vocabulary catalog is enumerated in Table 5 – Attribute Vocabulary.

Table 5 – Attribute Vocabulary
Module Attributes
Core Attributes xml:id, xml:lang, xml:space
Layout region
Metadata Attributes ttm:agent, ttm:role
Parameter Attributes ttp:cellResolution, ttp:clockMode, ttp:frameRate, ttp:frameRateMultipler, ttp:markerMode, ttp:pixelAspectRatio, ttp:profile, ttp:smpteMode, ttp:subFrameRate, ttp:tickRate, ttp:timeBase
Styling style
Styling Attributes tts:backgroundColor, tts:color, tts:direction, tts:display, tts:displayAlign, tts:dynamicFlow, tts:extent, tts:fontFamily, tts:fontSize, tts:fontStyle, tts:fontWeight, tts:lineHeight, tts:opacity, tts:origin, tts:overflow, tts:padding, tts:showBackground, tts:textAlign, tts:textDecoration, tts:textOutline, tts:unicodeBidi, tts:visibility, tts:wrapOption, tts:writingMode, tts:zIndex
Timing Attributes begin, dur, end, timeContainer

Note:

All vocabulary defined by the TT AF consistently makes use of the so-called lowerCamelCase naming convention. In some cases, this results in the change of a name when the name was based upon another specification that used a different naming convention.

5.3.2 Extension Catalog

The extension vocabulary catalog is intended for use by future profiles of the TT AF.

In this version of this specification, no standardized extension vocabulary is defined. Two namespaces are specifically reserved by Table 1 – Namespaces for metadata and style extension vocabulary:

  • TT Style Extensions

  • TT Metadata Extensions

In addition to standardized extension vocabulary, a conforming TT AF document instance may contain arbitrary namespace qualified elements that reside in any namespace other than those namespaces defined for use with this specification. Furthermore, a conforming TT AF document instance may contain arbitrary namespace qualified attributes on TT AF defined vocabulary where such attributes reside in any namespace other than those defined for use with this specification.

6 Parameters

This section specifies the parameters matter of the core vocabulary catalog, where parameters are to be understood as information that is either (1) essential or (2) of significant importance for the purpose of interpreting the semantics of other types of information expressed by core vocabulary items or for establishing a processing context by means of which TT AF content can be related to an external environment.

6.1 Element Vocabulary

No parameters related element vocabulary is defined for use in the core vocabulary catalog.

6.2 Attribute Vocabulary

The following attributes are defined in the TT Parameter Namespace.

Unless explicitly stated otherwise, linear white-space (LWSP) may appear between tokens of a value of a TT Parameter.

6.2.1 ttp:cellResolution

The ttp:cellResolution attribute may be used by an author to express the number of horizontal and vertical cells into which the root container region area is divided for the purpose of expressing presentation semantics in terms of a uniform grid.

If specified, the value of this attribute must adhere to the following syntax:

Syntax Representation – ttp:cellResolution
ttp:cellResolution
  : columns rows                            // columns != 0; rows != 0
columns | rows
  : <digit>+

If not specified, the number of columns and rows must be considered to be 32 and 15, respectively. If specified, then columns or rows must not be zero (0).

Note:

The choice of values 32 and 15 are based on this being the maximum number of columns and rows defined by [CEA-608-C].

A ttp:cellResolution attribute is considered to be significant only when specified on the tt element.

Note:

The use of a uniform grid is employed only for the purpose of measuring lengths and expressing coordinates. In particular, it is not assumed that the presentation of text or the alignment of individual glyph areas is coordinated with this grid. Such alignment is possible, but requires the use of a monospaced font and a font size whose EM square exactly matches the cell size.

6.2.2 ttp:clockMode

The ttp:clockMode attribute is used to specify the interpretation of time expressions as real-time time coordinates when operating with time base of clock as defined by 6.2.11 ttp:timeBase.

Note:

See 10.3 Time Value Expressions for the specification of time expression syntax.

If specified, the value of this attribute must adhere to the following syntax:

Syntax Representation – ttp:clockMode
ttp:clockMode
  : "local"
  | "gps"
  | "utc"

If the time base, defined by 6.2.11 ttp:timeBase, is designated as clock, then this parameter applies as follows: if the parameter's value is local, then time expressions are interpreted as local wall-clock time coordinates; if utc, then time expressions are interpreted as UTC time coordinates [UTC]; if gps, then time expressions are interpreted as GPS time coordinates [GPS].

Note:

The primary difference between GPS time and UTC time is that GPS time is not adjusted for leap seconds, while UTC time is adjusted as follows: UTC = TAI (Temp Atomique International) + leap seconds accumulated since 1972. TAI is maintained by the Bureau International des Poids et Mesures (BIPM) in Sevres, France. The GPS system time is steered to a Master Clock (MC) at the US Naval Observatory which is kept within a close but unspecified tolerance of TAI.

If not specified, the value of this parameter must be considered to be utc.

A ttp:clockMode attribute is considered to be significant only when specified on the tt element.

6.2.3 ttp:frameRate

The ttp:frameRate attribute is used to specify the frame rate of a related media object or the intrinsic frame rate of a document instance in case it is intended to function as an independent media object.

If specified, the value of this attribute must adhere to the following syntax:

Syntax Representation – ttp:frameRate
ttp:frameRate
  : <digit>+                                // value > 0

The frame rate that applies to a document instance is used to interpret time expressions that are expressed in frames as defined by 10.3.1 <timeExpression>.

A frame is interpreted as a division of a second of media time, such that if the frame rate is specified as F, then a second of media time is divided into F intervals of equal duration, where each interval is labeled as frame f, with f ∈ [0…F−1].

If not specified, the frame rate must be considered to be equal to some application defined frame rate, or if no application defined frame rate applies, then thirty (30) frames per second. If specified, then the frame rate must be greater than zero (0).

A ttp:frameRate attribute is considered to be significant only when specified on the tt element.

6.2.4 ttp:frameRateMultiplier

The ttp:frameRateMultiplier attribute is used to specify a multiplier to be applied to the frame rate specified by a ttp:frameRate attribute in order to compute the effective frame rate.

If specified, the value of this attribute must adhere to the following syntax:

Syntax Representation – ttp:frameRateMultiplier
ttp:frameRateMultiplier
  : numerator ( ":" denominator )?          // denominator != 0
numerator | denominator
  : <digit>+

A frame rate multiplier is used when the desired frame rate cannot be expressed as an integral number of frames per second.

If not specified, the frame rate multiplier must be considered to be equal to one (1:1). If a denominator is specified, then it must not be zero (0).

A ttp:frameRateMultiplier attribute is considered to be significant only when specified on the tt element.

Note:

The frame rate multiplier used for synchronizing with NTSC [SMPTE 170M] formatted video objects at 30 frames per second is nominally 1000:1001. The nominal frame rate of NTSC video is defined as the chrominance sub-carrier frequency of 3,579,545.45…Hz (= 5.0MHz × 63/88) times the ratio 2/455 divided by the number of horizontal lines per frame of 525, which yields a frame rate of 29.970029970029… (= 30 × 1000/1001) frames per second. Other frame rate multipliers apply to different regions of usage and video format standards.

Note:

Except in the case of PAL/M, the frame rate multiplier used for synchronizing with PAL formatted video objects at 25 frames per second is nominally 1:1.

6.2.5 ttp:markerMode

The ttp:markerMode attribute is used to specify constraints on the interpretation and use of time expressions that correspond with [SMPTE 12M] time coordinates when operating with time base of smpte as defined by 6.2.11 ttp:timeBase.

If specified, the value of this attribute must adhere to the following syntax:

Syntax Representation – ttp:markerMode
ttp:markerMode
  : "continuous"
  | "discontinuous"

If the time base, defined by 6.2.11 ttp:timeBase, is designated as smpte, then this parameter applies as follows: if the parameter's value is continuous, then [SMPTE 12M] time coordinates may be assumed to be linear and either monotonically increasing or decreasing; however, if discontinuous, then any assumption must not be made regarding linearity or monotonicity of time coordinates.

If not specified, the value of this parameter must be considered to be continuous.

A ttp:markerMode attribute is considered to be significant only when specified on the tt element.

If a value of discontinuous applies, then time expressions must not be converted to either media time or real time coordinates, arithmetical operators (addition, multiplication) are not defined on time expressions, and, consequently, any expression of a duration must be ignored.

Note:

When operating with smpte time base and discontinuous marker mode, there is no effective time coordinate space; rather, all time expressions are interpreted as labeled synchronization events (markers), where some external synchronization context emits these events, which, when they correspond with time expressions that denote the same label, cause a temporal interval to begin or end accordingly.

An additional side-effect of operating in discontinuous mode is that time expressions of children have no necessary relationship with time expressions of their temporal container; that is, temporal containers and children of these containers are temporally activated and inactivated independently based on the occurrence of a labeled synchronization (marker) event.

Note:

The notion of marker discontinuity as captured by this parameter is logically independent from the method used to count frames as expressed by the ttp:smpteMode parameter. In particular, even if the ttp:smpteMode parameter is specified as dropNTSC or dropPAL, the marker mode may be specified as continuous, even in the presence of frame count discontinuities induced by the frame counting method, unless there were some other non-linearity or discontinuity in marker labeling, for example, two consecutive frames labeled as 10:00:00:00 and 10:00:01:00.

6.2.6 ttp:pixelAspectRatio

The ttp:pixelAspectRatio attribute may be used by a content author to express the aspect ratio of non-square pixels in the production of content that makes use of pixel coordinates.

If specified, the value of this attribute must adhere to the following syntax:

Syntax Representation – ttp:pixelAspectRatio
ttp:pixelAspectRatio
  : width ":" height                        // width != 0; height != 0
width | height
  : <digit>+

If not specified, then square pixels (i.e., aspect ratio 1:1) must be assumed to apply. If specified, then width or height must not be zero.

A ttp:pixelAspectRatio attribute is considered to be significant only when specified on the tt element.

Note:

This parameter may be used by a content transcoder or translator in order to convert pixel measurements between different pixel aspect ratios while still maintaining authorial layout intentions.

6.2.7 ttp:profile

The ttp:profile attribute may be used by a content author to express the profile of the Timed Text Authoring Format (TT AF) used in a document instance.

If specified, the value of this attribute must adhere to the xsd:anyURI data type defined by [XML Schema Part 2], §3.2.17, and, further, must specify a profile URI as defined by 5.2 Profiles.

If not specified, then the Distribution Format Exchange Profile (DFXP) must be assumed to apply.

A ttp:profile attribute is considered to be significant only when specified on the tt element.

6.2.8 ttp:smpteMode

The ttp:smpteMode attribute is used to specify constraints on the interpretation and use of frame counts that correspond with [SMPTE 12M] time coordinates when operating with time base of smpte as defined by 6.2.11 ttp:timeBase.

If specified, the value of this attribute must adhere to the following syntax:

Syntax Representation – ttp:smpteMode
ttp:smpteMode
  : "dropNTSC"
  | "dropPAL"
  | "nonDrop"

If the time base, defined by 6.2.11 ttp:timeBase, is designated as smpte, then this parameter applies as follows: if the parameter's value is nonDrop, then, within any given second of a time expression, frames count from 0 to N−1, where N is the value specified by the ttp:frameRate parameter, but while ignoring any value specified by the ttp:frameRateMultiplier parameter.

Note:

When operating in nonDrop mode, a second of a time expression may or may not be equal to a second of real time during normal (1x speed) forward playback. If the ttp:frameRateMultiplier parameter is specified and is not equal to 1:1, then a second of a time expression will either be shorter or longer than a second of elapsed play in real time.

If this parameter's value is dropNTSC, then, within any given second of a time expression except the second 00, frames count from 0 to N−1, where N is the value specified by the ttp:frameRate parameter, but while ignoring any value specified by the ttp:frameRateMultiplier parameter. If the second of a time expression is 00 and the minute of the time expression is not 00, 10, 20, 30, 40, or 50, then frame codes 00 and 01 are dropped during that second; otherwise, these frame codes are not dropped.

Note:

For example, when operating in dropNTSC mode with ttp:frameRate of 30, a discontinuity in frame count occurs between consecutive frames as shown in the following sequence of time expressions: 01:08:59:28, 01:08:59:29, 01:09:00:02, 01:09:00:03.

If this parameter's value is dropPAL, then, within any given second of a time expression except the second 00, frames count from 0 to N−1, where N is the value specified by the ttp:frameRate parameter, but while ignoring any value specified by the ttp:frameRateMultiplier parameter. If the second of a time expression is 00 and the minute of the time expression is even but not 00, 20, or 40, then frame codes 00 through 03 are dropped during that second; otherwise, these frame codes are not dropped.

Note:

For example, when operating in dropPAL mode with ttp:frameRate of 30, a discontinuity in frame count occurs between consecutive frames as shown in the following sequence of time expressions: 01:09:59:28, 01:09:59:29, 01:10:00:04, 01:10:00:04.

Note:

The dropPAL mode is also known as the M/PAL or PAL (M) drop-frame code, which uses PAL modulation with the NTSC frame rate of ~29.97 frames/second. The M/PAL system is used primarily in Brazil.

If not specified, then nonDrop must be assumed to apply.

A ttp:smpteMode attribute is considered to be significant only when specified on the tt element.

6.2.9 ttp:subFrameRate

The ttp:subFrameRate attribute is used to specify the sub-frame rate of a related media object or the intrinsic sub-frame rate of a document instance in case it is intended to function as an independent media object.

If specified, the value of this attribute must adhere to the following syntax:

Syntax Representation – ttp:subFrameRate
ttp:subFrameRate
  : <digit>+                                // value > 0

The sub-frame rate that applies to a document instance is used to interpret time expressions that are expressed in sub-frames as defined by 10.3.1 <timeExpression>.

A sub-frame is interpreted as a division of a frame of media time, such that if the sub-frame rate is specified as S, then a frame of media time is divided into S intervals of equal duration, where each interval is labeled as sub-frame s, with s ∈ [0…S−1].

If not specified, the sub-frame rate must be considered to be equal to one (1). If specified, then the sub-frame rate must be greater than zero (0).

A ttp:subFrameRate attribute is considered to be significant only when specified on the tt element.

Note:

The sub-frame is sometimes referred to as a field in the context of synchronization with an interlaced video media object.

6.2.10 ttp:tickRate

The ttp:tickRate attribute is used to specify the tick rate of a related media object or the intrinsic tick rate of content of a document instance in case it is intended to function as an independent media object.

If specified, the value of this attribute must adhere to the following syntax:

Syntax Representation – ttp:tickRate
ttp:tickRate
  : <digit>+                                // value > 0

The tick rate that applies to a document instance is used to interpret time expressions that are expressed in ticks by using the t metric as defined by 10.3.1 <timeExpression>.

A tick is interpreted as an integral division of a second of media time, such that if the tick rate is specified as T, then a second of media time is divided into T intervals of equal duration, where each interval is labeled as tick t, with t ∈ [0…T−1].

If not specified, then if a frame rate is specified, the tick rate must be considered to be the effective frame rate multiplied by the sub-frame rate (i.e., ticks are interpreted as sub-frames); or, if no frame rate is specified, the tick rate must be considered to be one (1) tick per second of media time. If specified, then the tick rate must not be zero (0).

Note:

There is no predefined relationship between ticks and frames or sub-frames. Ticks are an arbitrary division of seconds that permit use of fixed point arithmetic rather than fractional (and potentially inexact) expressions of seconds.

A ttp:tickRate attribute is considered to be significant only when specified on the tt element.

6.2.11 ttp:timeBase

The ttp:timeBase attribute is used to specify the temporal coordinate system by means of which time expressions are interpreted in a document instance.

If specified, the value of this attribute must adhere to the following syntax:

Syntax Representation – ttp:timeBase
ttp:timeBase
  : "media"
  | "smpte"
  | "clock"

If the time base is designated as media, then a time expression denotes a coordinate in some media object's time line, where the media object may be an external media object with which the content of a document instance is to be synchronized, or it may be the content of a document instance itself in a case where the timed text content is intended to establish an independent time line.

Note:

When using a media time base, if that time base is paused or scaled positively or negatively, then it is expected that the presentation of associated Timed Text content will be similarly paused, accelerated, or decelerated, respectively. The means for controlling an external media time base is outside the scope of this specification.

If the time base is designated as smpte, then a time expression denotes a [SMPTE 12M] time coordinate with which the content of a document instance is to be synchronized. In this case, the value of the ttp:markerMode and ttp:smpteMode parameters apply, as defined by 6.2.5 ttp:markerMode and 6.2.8 ttp:smpteMode, respectively

If the time base is designated as clock, then the time expression denotes a coordinate in some real-world time line as established by some real-time clock, such as the local wall-clock time or UTC (Coordinated Universal Time) or GPS (Global Positioning System) time lines.

If not specified, the default time base must be considered to be media.

A ttp:timeBase attribute is considered to be significant only when specified on the tt element.

When operating with either media or smpte time bases, a diachronic presentation of a document instance may be subject to transformations of the controlling time line, such as temporal reversal, dilation (expansion), or constriction (compression); however, when operating with the clock time base, no transformations are permitted, and diacrhonic presentation proceeds on a linear, monotonically increasing time line based on the passage of real time.

Note:

Due to there being only one time base parameter that applies to a given document instance, the interpretation of time expressions is uniform throughout the document instance.

7 Content

This section specifies the content matter of the core vocabulary catalog.

7.1 Element Vocabulary

The following elements specify the structure and principal content aspects of a document instance:

7.1.1 tt

The tt element serves as the root, document element of a document instance.

The tt element accepts as its children zero or one head element followed by zero or one body element.

XML Representation – Element Information Item: tt
<tt
  xml:id = ID
  xml:lang = string
  xml:space = (default|preserve) : default
  {any attribute in TT Parameter namespace ...}
  {any attribute not in default or any TT namespace ...}>
  Content: head?, body?
</tt>

The temporal beginning and ending of a document instance represented by a tt element is defined in relationship with some external application or presentation context. The temporal interval defined by these points is referred to subsequently as the external time interval.

A document instance has an implicit duration that is equal to the implicit duration of the body element of the document, if present, or zero, if not present.

An xml:lang attribute must be specified on the tt element. If the attribute value is empty, it signifies that there is no default language that applies to the text contained within the document instance.

If no xml:space attribute is specified upon the tt element, then it must be considered as if the attribute had been specified with a value of default.

7.1.2 head

The head element is a container element used to group header matter, including metadata, styling, and layout information.

The head element accepts as its children zero or more elements in the Metadata.class element group, followed by zero or one styling element, followed by zero or one layout element.

Any metadata specified by children in the Metadata.class element group applies semantically to the document instance as a whole, and not just the head element.

A styling child element is used to specify style constructs that are referenced from other style constructs, by layout constructs, and by content elements.

A layout child element is used to specify layout constructs that are referenced by content elements.

XML Representation – Element Information Item: head
<head
  xml:id = ID
  xml:lang = string
  xml:space = (default|preserve)>
  Content: Metadata.class*, styling?, layout?
</head>

To the extent that time semantics apply to the content of the head element, the implied time interval of this element is defined to be coterminous with the external time interval.

7.1.3 body

The body element functions as a logical container and a temporal structuring element for a sequence of textual content units represented as logical divisions.

The body element accepts as its children zero or more elements in the Metadata.class element group, followed by zero or more elements in the Animation.class element group, followed by zero or more div elements.

Any metadata specified by children in the Metadata.class element group applies semantically to the body element and its descendants as a whole.

Any animation elements specified by children in the Animation.class element group apply semantically to the body element.

XML Representation – Element Information Item: body
<body
  begin = <timeExpression>
  dur = <timeExpression>
  end = <timeExpression>
  region = IDREF
  style = IDREFS
  timeContainer = (par|seq)
  xml:id = ID
  xml:lang = string
  xml:space = (default|preserve)
  {any attribute in TT Metadata namespace ...}
  {any attribute in TT Style namespace ...}
  {any attribute not in default or any TT namespace ...}>
  Content: Metadata.class*, Animation.class*, div*
</body>

An author may specify a temporal interval for a body element using the begin, dur, and end attributes. If the begin point of this interval remains unspecified, then the begin point is interpreted as the begin point of the external time interval. Similarly, if the end point of this interval remains unspecified, then the end point is interpreted as the end point of the external time interval.

Note:

A TT AF document instance referenced from a SMIL presentation is expected to follow the same timing rules as apply to other SMIL media objects.

If relative begin or end times are specified on the body element, then these times are resolved by reference to the begin and end time of the external time interval.

If the external time interval is shorter than the computed duration of the body element, then the active time interval of a document instance is truncated to the active end point of the external time interval.

If no timeContainer attribute is specified, then a body element must be interpreted as having sequential time containment semantics.

If the tts:extent attribute is specified on the body element, then it specifies the spatial extent of the root container region in which content regions are located and presented. If no tts:extent attribute is specified, then the spatial extent of the root container region is considered to be determined by the external authoring or presentation context.

An author may associate a set of style properties with a body element by means of either the style attribute or inline style attributes or a combination thereof.

Note:

Style properties that are associated with a body element in a document instance are available for style inheritance by descendant content elements such as div, p, and span.

The declared value of an inline style attribute on a body element must not be inherit.

7.1.4 div

The div element functions as a logical container and a temporal structuring element for a sequence of textual content units represented as logical paragraphs.

Note:

When rendered on a continuous (non-paged) visual presentation medium, a div element is expected to generate a single block area that contains zero or more child block areas generated by the div element's child p elements.

If the single block area generated by a div element does not contain any child areas, then it is not expected to be presented.

The div element accepts as its children zero or more elements in the Metadata.class element group, followed by zero or more elements in the Animation.class element group, followed by zero or more p elements.

Note:

The core vocabulary intentionally does not support nested divisions in order to reduce the complexity of the profile to match that of the legacy distribution formats with which the core vocabulary was designed to interoperate.

Any metadata specified by children in the Metadata.class element group applies semantically to the div element and its descendants as a whole.

Any animation elements specified by children in the Animation.class element group apply semantically to the div element.

XML Representation – Element Information Item: div
<div
  begin = <timeExpression>
  dur = <timeExpression>
  end = <timeExpression>
  region = IDREF
  style = IDREFS
  timeContainer = (par|seq)
  xml:id = ID
  xml:lang = string
  xml:space = (default|preserve)
  {any attribute in TT Metadata namespace ...}
  {any attribute in TT Style namespace ...}
  {any attribute not in default or any TT namespace ...}>
  Content: Metadata.class*, Animation.class*, Block.class*
</div>

If no timeContainer attribute is specified, then a div element must be interpreted as having parallel time containment semantics.

An author may associate a set of style properties with a div element by means of either the style attribute or inline style attributes or a combination thereof.

Note:

Style properties that are associated to a div element in a document instance are available for style inheritance by descendant content elements such as p and span.

7.1.5 p

A p element represents a logical paragraph, serving as a transition between block level and inline level formatting semantics.

The p element accepts as its children zero or more elements in the Metadata.class element group, followed by zero or more elements in the Animation.class element group, followed by zero or more span element, br element, or text nodes interpreted as anonymous spans.

Any metadata specified by children in the Metadata.class element group applies semantically to the p element and its descendants as a whole.

Any animation elements specified by children in the Animation.class element group apply semantically to the p element.

XML Representation – Element Information Item: p
<p
  begin = <timeExpression>
  dur = <timeExpression>
  end = <timeExpression>
  region = IDREF
  style = IDREFS
  timeContainer = (par|seq)
  xml:id = ID
  xml:lang = string
  xml:space = (default|preserve)
  {any attribute in TT Metadata namespace ...}
  {any attribute in TT Style namespace ...}
  {any attribute not in default or any TT namespace ...}>
  Content: Metadata.class*, Animation.class*, Inline.class*
</p>

If a sequence of children of a p element consists solely of character information items, then that sequence must be considered to be an anonymous span for the purpose of applying style properties that apply to span elements.

7.1.6 span

The span element functions as a logical container and a temporal structuring element for a sequence of textual content units having inline level formatting semantics.

When presented on a visual medium, a span element is intended to generate a sequence of inline areas, each containing one or more glyph areas.

The span element accepts as its children zero or more elements in the Metadata.class element group, followed by zero or more elements in the Animation.class element group, followed by zero or more br element or text nodes interpreted as anonymous spans.

Note:

The core vocabulary intentionally does not support nested spans in order to reduce the complexity of the profile to match that of the legacy distribution formats with which the core vocabulary was designed to interoperate.

Any metadata specified by children in the Metadata.class element group applies semantically to the span element and its descendants as a whole.

Any animation elements specified by children in the Animation.class element group apply semantically to the span element.

XML Representation – Element Information Item: span
<span
  begin = <timeExpression>
  dur = <timeExpression>
  end = <timeExpression>
  region = IDREF
  style = IDREFS
  timeContainer = (par|seq)
  xml:id = ID
  xml:lang = string
  xml:space = (default|preserve)
  {any attribute in TT Metadata namespace ...}
  {any attribute in TT Style namespace ...}
  {any attribute not in default or any TT namespace ...}>
  Content: Metadata.class*, Animation.class*, Inline.class*
</span>

7.1.7 br

The br element denotes an explicit line break.

XML Representation – Element Information Item: br
<br
  style = IDREFS
  xml:id = ID
  xml:lang = string
  xml:space = (default|preserve)
  {any attribute in TT Metadata namespace ...}
  {any attribute in TT Style namespace ...}
  {any attribute not in default or any TT namespace ...}>
  Content: Metadata.class*, Animation.class*
</br>

When presented on a visual medium, the presence of a br element must be interpreted as a forced line break.

Note:

The visual presentation of a br element is intended to produce the same effect as the ASCII control code CR followed by the control code NL when presented on a teletype device. Therefore, two br elements in sequence will produce a different effect than a single br element.

7.2 Attribute Vocabulary

This section defines the following common attributes used with many or all element types in the core vocabulary catalog:

7.2.1 xml:id

The xml:id attribute is used as defined by [XML ID].

The xml:id attribute may be used with any element in the core vocabulary catalog.

7.2.2 xml:lang

The xml:lang attribute is used as defined by [XML 1.1], §2.12, Language Identification.

The xml:lang attribute must be specified on the tt element and may be specified by an instance of any other element type in the core vocabulary catalog.

7.2.3 xml:space

The xml:space attribute is used as defined by [XML 1.1], §2.10, White Space Handling.

The xml:space attribute may be used with any element in the core vocabulary catalog.

The semantics of the value default are fixed to mean that when performing presentation processing of a document instance as described by 9.3.2 Synchronic Flow Processing, processing must occur as if the following properties were specified on the affected elements of the intermediate XSL-FO document:

  • suppress-at-line-break="auto"

  • linefeed-treatment="treat-as-space"

  • white-space-collapse="true"

  • white-space-treatment="ignore-if-surrounding-linefeed"

Similarly, the semantics of the value preserve are fixed to mean that when performing presentation processing, processing must occur as if the following properties were specified on the affected elements of the intermediate XSL-FO document:

  • suppress-at-line-break="retain"

  • linefeed-treatment="preserve"

  • white-space-collapse="false"

  • white-space-treatment="preserve"

When performing other types of processing intended to eventually result in a visual presentation by means other than those described in this specification, the semantics of space collapsing and preservation as described above should be respected. For other types of processing, the treatment of the xml:space attribute is processor dependent, but should respect the semantics described above if possible.

8 Styling

This section specifies the styling matter of the core vocabulary catalog, where styling is to be understood as a separable layer of information that applies to content and that denotes authorial intentions about the presentation of that content.

No normative use of an <?xml-stylesheet ... ?> processing instruction is defined by this specification.

8.1 Element Vocabulary

The following elements specify the structure and principal styling aspects of a document instance:

8.1.1 styling

The styling element is a container element used to group styling matter, including metadata that applies to styling matter.

The styling element accepts as its children zero or more elements in the Metadata.class element group, followed by zero or more style elements.

XML Representation – Element Information Item: styling
<styling
  xml:id = ID
  xml:lang = string
  xml:space = (default|preserve)
  {any attribute not in default or any TT namespace ...}>
  Content: Metadata.class*, style*
</styling>

To the extent that time semantics apply to the content of the styling element, the implied time interval of this element is defined to be coterminous with the external time interval.

8.1.2 style

The style element is used to define a single style specification or a set of style specifications.

The style element accepts as its children zero or more metadata elements.

XML Representation – Element Information Item: style
<style
  style = IDREFS
  xml:id = ID
  xml:lang = string
  xml:space = (default|preserve)
  {any attribute in TT Style namespace ...}
  {any attribute in TT Style Extension namespace ...}
  {any attribute not in default or any TT namespace ...}>
  Content: Metadata.class*
</style>

The declared value of an inline style attribute on a style element must not be inherit.

A style element is considered to define a computed style specification set, where the set is determined using the following ordered rules:

  1. If a style attribute is specified on the style element, then the set must be initialized so as to include each style specification contained in the computed style specification set of each element referenced by the style attribute. If the same named style property is specified by more than one such referenced computed style specification set, then the value of the named style property in following referenced sets takes precedence over the value of the named style property in prior referenced sets, where following and prior are determined according to the order of the referenced ID in the IDREFS value of the style attribute.

  2. If the style element specifies an attribute from the TT Style Namespace or TT Style Extension Namespace, then each style specification defined by that attribute either overrides an existing style specification already contained within the set or augments the set with a new style specification according to whether or not the named style property of the style specification matches the named style property of an existing style specification already included in the set.

Two named style properties are considered to match if their expanded names match, where expanded name is defined by [XML Namespaces 1.1], §2.1, and the expanded name of a named style property is the expanded name of the attribute that specifies the named style property.

If a style element appears as a descendant of a region element, then the style element must be ignored for the purpose of computing referential styles as defined by 8.4.2 Referential Styling and 8.4.3 Chained Referential Styling.

8.2 Attribute Vocabulary

This section defines the 8.2.1 style attribute used with both style definition elements as well as content elements.

In addition, this section specifies the following attributes in the TT Style Namespace for use with style definition elements, certain layout elements, and content elements that support inline style specifications:

Unless explicitly stated otherwise, linear white-space (LWSP) may appear between tokens of a value of a TT Style Property.

Note:

This specification makes use of lowerCamelCased local names for style attributes that are based upon like-named properties defined by [XSL 1.0]. This convention is likewise extended to token values of such properties.

Note:

A style property may be expressed as a specified attribute on any content element type independently of whether the property applies to that element type. This capability permits the expression of an inheritable style property on ancestor elements to which the property property does not apply.

8.2.1 style

The style attribute is used to reference one or more style elements each of which define a computed style specification set.

The style attribute may be specified by an instance of the following element types:

Note:

See the specific element type definitions that permit use of the style attribute for further information on its semantics.

8.2.2 tts:backgroundColor

The tts:backgroundColor attribute is used to specify a style property that defines the background color of a region or an area generated by content flowed into a region.

This attribute may be specified by any style specification element or content element that permits use of attributes in the TT Style Namespace; however, this attribute applies as a style property only to those element types indicated in the following table.

Values: <color> | inherit
Initial: transparent
Applies to: body, div, p, region, span
Inherited: no
Percentages: N/A
Animatable: discrete

The tts:backgroundColor style is illustrated by the following example.

Example Fragment – Background Color
<region xml:id="r1">
  <style tts:extent="306px 114px"/>
  <style tts:backgroundColor="red"/>
  <style tts:color="white"/>
  <style tts:displayAlign="after"/>
  <style tts:padding="3px 40px"/>
</region>
...
<p region="r1" tts:backgroundColor="purple" tts:textAlign="center">
  Twinkle, twinkle, little bat!<br/>
  How <span tts:backgroundColor="green">I wonder</span> where you're at!
</p>

Example Rendition – Background Color
TT AF backgroundColor style property

Note:

The semantics of the style property represented by this attribute are based upon that defined by [XSL 1.0], § 7.7.2.

8.2.3 tts:color

The tts:color attribute is used to specify a style property that defines the foreground color of marks associated with an area generated by content flowed into a region.

This attribute may be specified by any style specification element or content element that permits use of attributes in the TT Style Namespace; however, this attribute applies as a style property only to those element types indicated in the following table.

Values: <color> | inherit
Initial: transparent
Applies to: span
Inherited: yes
Percentages: N/A
Animatable: discrete

Note:

For the purpose of determining applicability of this style property, each character child of a p element is considered to be enclosed in an anonymous span.

The tts:color style is illustrated by the following example.

Example Fragment – Color
<region xml:id="r1">
  <style tts:backgroundColor="black"/>
  <style tts:color="white"/>
  <style tts:displayAlign="after"/>
  <style tts:textAlign="center"/>
</region>
...
<p region="r1">
  In spring, when woods are <span tts:color="green">getting green</span>,<br/>
  I'll try and tell you what I mean.
</p>

Example Rendition – Color
DFXP color style property

Note:

The semantics of the style property represented by this attribute are based upon that defined by [XSL 1.0], § 7.17.1.

8.2.4 tts:direction

The tts:direction attribute is used to specify a style property that defines the directionality of an embedding or override according to the Unicode bidirectional algorithm.

This attribute may be specified by any style specification element or content element that permits use of attributes in the TT Style Namespace; however, this attribute applies as a style property only to those element types indicated in the following table.

Values: ltr | rtl | inherit
Initial: ltr
Applies to: p, span
Inherited: yes
Percentages: N/A
Animatable: none

The tts:direction style is illustrated by the following example.

Example Fragment – Direction
<region xml:id="r1">
  <style tts:extent="265px 84px"/>
  <style tts:padding="5px"/>
  <style tts:backgroundColor="black"/>
  <style tts:color="white"/>
  <style tts:displayAlign="after"/>
  <style tts:textAlign="center"/>
</region>
...
<p region="r1">
  Little birds are playing<br/>
  Bagpipes on the shore,<br/>
  <span tts:unicodeBidi="bidiOverride" tts:direction="rtl">where the tourists snore.</span>
</p>

Example Rendition – Direction
DFXP direction style property

Note:

The semantics of the style property represented by this attribute are based upon that defined by [XSL 1.0], § 7.27.1.

8.2.5 tts:display

The tts:display attribute is used to specify a style property that defines whether an element is a candidate for layout and composition in a region.

This attribute may be specified by any style specification element or content element that permits use of attributes in the TT Style Namespace; however, this attribute applies as a style property only to those element types indicated in the following table.

Values: auto | none | inherit
Initial: auto
Applies to: body, div, p, span
Inherited: no
Percentages: N/A
Animatable: discrete

If the value of this attribute is auto, then the affected element is a candidate for region layout and presentation; however, if the value is none, then the affected element and its descendants must be considered ineligible for region layout and presentation.

The tts:display style is illustrated by the following example.

Example Fragment – Display
<region xml:id="r1">
  <style tts:extent="369px 119px"/>
  <style tts:backgroundColor="black"/>
  <style tts:color="white"/>
  <style tts:displayAlign="before"/>
  <style tts:textAlign="start"/>
</region>
...
<div region="r1">
  <p dur="5s">
    [[[
    <span tts:display="none">
      <set begin="1s" dur="1s" tts:display="auto"/>
      Beautiful soup,
    </span>
    <span tts:display="none">
      <set begin="2s" dur="1s" tts:display="auto"/>
      so rich and green,
    </span>
    <span tts:display="none">
      <set begin="3s" dur="1s" tts:display="auto"/>
      waiting in a hot tureen!
    </span>
    ]]]
  </p>
</div>

Example Rendition – Display
DFXP display style property - [0,1)
DFXP display style property - [1,2)
DFXP display style property - [2,3)
DFXP display style property - [3,4)
DFXP display style property - [4,5)

Note:

The semantics of the style property represented by this attribute are based upon that defined by [CSS2], § 9.2.5.

8.2.6 tts:displayAlign

The tts:displayAlign attribute is used to specify a style property that defines the alignment of block areas in the block progression direction.

This attribute may be specified by any style specification element or content element that permits use of attributes in the TT Style Namespace; however, this attribute applies as a style property only to those element types indicated in the following table.

Values: before | center | after | inherit
Initial: before
Applies to: region
Inherited: yes
Percentages: N/A
Animatable: none

The tts:displayAlign style is illustrated by the following example.

Example Fragment – Display Align
<region xml:id="r1">
  <style tts:extent="128px 66px"/>
  <style tts:origin="0px 0px"/>
  <style tts:backgroundColor="black"/>
  <style tts:color="white"/>
  <style tts:displayAlign="before"/>
  <style tts:textAlign="start"/>
</region>
<region xml:id="r2">
  <style tts:extent="192px 66px"/>
  <style tts:origin="128px 66px"/>
  <style tts:backgroundColor="green"/>
  <style tts:color="white"/>
  <style tts:displayAlign="after"/>
  <style tts:textAlign="start"/>
</region>
<region xml:id="r3">
  <style tts:extent="128px 66px"/>
  <style tts:origin="0px 132px"/>
  <style tts:backgroundColor="black"/>
  <style tts:color="white"/>
  <style tts:displayAlign="before"/>
  <style tts:textAlign="start"/>
</region>
<region xml:id="r4">
  <style tts:extent="192px 66px"/>
  <style tts:origin="128px 198px"/>
  <style tts:backgroundColor="green"/>
  <style tts:color="white"/>
  <style tts:displayAlign="after"/>
  <style tts:textAlign="start"/>
</region>
...
<div>
  <p region="r1">I sent a message to the fish:</p>
  <p region="r2">I told them<br/> "This is what I wish."</p>
  <p region="r3">The little fishes of the sea,</p>
  <p region="r4">They sent an<br/> answer back to me.</p>
</div>

Example Rendition – Display Align
DFXP displayAlign style property

Note:

The semantics of the style property represented by this attribute are based upon that defined by [XSL 1.0], § 7.13.4.

8.2.7 tts:dynamicFlow

The tts:dynamicFlow attribute is used to specify a style property that defines how to dynamically flow content into and out of a region over some time interval.

This style property applies only to a region when the tts:overflow property for that region has the value scroll.

This attribute may be specified by any style specification element or content element that permits use of attributes in the TT Style Namespace; however, this attribute applies as a style property only to those element types indicated in the following table.

Values: none | <flowFunction>+ <flowIntervalFunction>*
Initial: none
Applies to: region
Inherited: no
Percentages: N/A
Animatable: none

If the value of this attribute is none, then no dynamic flow semantics apply.

If the value of this attribute contains a single <flowFunction>, then that flow function applies equally to fill into, reflow within, and clear from dynamic flow operations.

If a reflow within() flow function is specified, but no clear out() flow function is specified, or vice-versa, then the function applies equally to both reflow within and clear from dynamic flow operations.

If either intra() or inter() <flowIntervalFunction> is not specified, then the auto value for the missing <flowIntervalFunction> applies.

The normative processing model for dynamic flow behavior is specified in B Dynamic Flow Processing Model.

The tts:dynamicFlow style is illustrated by the following example, and depicted in an SVG Animation.

Example Fragment – Dynamic Flow
<region xml:id="r1">
  <style tts:extent="140px 70px"/>
  <style tts:displayAlign="after"/>
  <style tts:backgroundColor="transparent"/>
  <style tts:fontFamily="proportionalSansSerif"/>
  <style tts:fontSize="18px"/>
  <style tts:overflow="scroll"/>
  <style tts:dynamicFlow="in(word,jump) out(line,smooth) inter(3s)"/>
</region>
...
<p region="r1">
  <span tts:backgroundColor="black" tts:color="white">
    Five o'clock tea!<br/>
    Ever to thee,<br/>
    Faithful I'll be,<br/>
    Five o'clock tea!<br/>
    <br/>
    <br/>
    <br/>
  </span>
</p>

Example Rendition – Dynamic Flow – Discrete Frames
DFXP dynamic flow style property - frame 0 DFXP dynamic flow style property - frame 1 DFXP dynamic flow style property - frame 2 DFXP dynamic flow style property - frame 3
DFXP dynamic flow style property - frame 4 DFXP dynamic flow style property - frame 5 DFXP dynamic flow style property - frame 6 DFXP dynamic flow style property - frame 7
DFXP dynamic flow style property - frame 8 DFXP dynamic flow style property - frame 9 DFXP dynamic flow style property - frame 10 DFXP dynamic flow style property - frame 11
DFXP dynamic flow style property - frame 12 DFXP dynamic flow style property - frame 13 DFXP dynamic flow style property - frame 14 DFXP dynamic flow style property - frame 15

8.2.8 tts:extent

The tts:extent attribute is used to specify the width and height of a region area (which may be the root container region).

This attribute may be specified by any style specification element or content element that permits use of attributes in the TT Style Namespace; however, this attribute applies as a style property only to those element types indicated in the following table.

Values: auto | <length> <length> | inherit
Initial: auto
Applies to: body, region
Inherited: no
Percentages: relative to width and height of root container region
Animatable: none

If the value of this attribute consists of two <length> specifications, then they must be interpreted as width and height, where the first specification is the width, and the second specification is the height.

If the value of this attribute is auto, then the initial value of the style property must be considered to be the same as the root container extent. The root container extent is determined either by a tts:extent specified on the body element, if present, or by the external authoring context, if not present. In the former case, if the width and height is expressed in terms of two <length> specifications, then these specifications must be expressed as non-percentage, definite lengths using pixel units.

The tts:extent style is illustrated by the following example.

Example Fragment – Extent
<region xml:id="r1">
  <style tts:extent="330px 122px"/>
  <style tts:backgroundColor="black"/>
  <style tts:color="white"/>
  <style tts:displayAlign="after"/>
  <style tts:textAlign="center"/>
</region>
...
<p region="r1">
  'Tis the voice of the Lobster:<br/>
  I heard him declare,<br/>
  "You have baked me too brown,<br/>
  I must sugar my hair."
</p>

Example Rendition – Extent
DFXP extent style property

8.2.9 tts:fontFamily

The tts:fontFamily attribute is used to specify a style property that defines the font family from which glyphs are selected for glyph areas generated by content flowed into a region.

This attribute may be specified by any style specification element or content element that permits use of attributes in the TT Style Namespace; however, this attribute applies as a style property only to those element types indicated in the following table.

Values: (<familyName> | <genericFamilyName>) (","  (<familyName> | <genericFamilyName>))* | inherit
Initial: default
Applies to: span
Inherited: yes
Percentages: N/A
Animatable: discrete

Note:

For the purpose of determining applicability of this style property, each character child of a p element is considered to be enclosed in an anonymous span.

Note:

The initial value, default, is a generic font family name, and is further described in 8.3.6 <genericFamilyName> below.

The tts:fontFamily style is illustrated by the following example.

Example Fragment – Font Family
<region xml:id="r1">
  <style tts:extent="474px 146px"/>
  <style tts:backgroundColor="black"/>
  <style tts:color="white"/>
  <style tts:displayAlign="center"/>
  <style tts:textAlign="start"/>
  <style tts:fontFamily="proportionalSansSerif"/>
</region>
...
<div region="r1">
  <p>
    "The time has come," the Walrus said,<br/>
    "to talk of many things:
  </p>
  <p tts:textAlign="end" tts:fontFamily="monospaceSerif">
    Of shoes, and ships, and sealing wax,<br/>
    Of cabbages and kings,
  </p>
  <p>
    And why the sea is boiling hot,<br/>
    and whether pigs have wings."
  </p>
</div>

Example Rendition – Font Family
DFXP fontFamily style property

Note:

The semantics of the style property represented by this attribute are based upon that defined by [XSL 1.0], § 7.8.2.

8.2.10 tts:fontSize

The tts:fontSize attribute is used to specify a style property that defines the font size for glyphs that are selected for glyph areas generated by content flowed into a region, where font size is interpreted as a scaling transform to the font's design EM square.

This attribute may be specified by any style specification element or content element that permits use of attributes in the TT Style Namespace; however, this attribute applies as a style property only to those element types indicated in the following table.

Values: <length> <length>? | inherit
Initial: 1c
Applies to: span
Inherited: yes
Percentages: relative to parent element's font size
Animatable: discrete

If a single <length> value is specified, then this length applies equally to horizontal and vertical scaling of a glyph's EM square; if two <length> values are specified, then the first expresses the horizontal scaling and the second expresses vertical scaling.

Note:

Use of independent horizontal and vertical font sizes is expected to be used with cell based metrics in order to denote fonts that are two rows in height and one column in width.

If horizontal and vertical sizes are expressed independently, then the metrics of the <length> values must be the same.

The <length> value(s) used to express font size must be non-negative.

Note:

For the purpose of determining applicability of this style property, each character child of a p element is considered to be enclosed in an anonymous span.

The tts:fontSize style is illustrated by the following example.

Example Fragment – Font Size
<region xml:id="r1">
  <style tts:extent="299px 97px"/>
  <style tts:backgroundColor="black"/>
  <style tts:color="white"/>
  <style tts:displayAlign="center"/>
  <style tts:textAlign="center"/>
  <style tts:fontFamily="proportionalSansSerif"/>
  <style tts:fontSize="18px"/>
</region>
...
<p region="r1">
  Then fill up the glasses<br/>
  with treacle and ink,<br/>
  Or anything else<br/>
  that is <span tts:fontSize="24px">pleasant</span> to drink.
</p>

Example Rendition – Font Size
DFXP fontSize style property

Note:

The semantics of the style property represented by this attribute are based upon that defined by [XSL 1.0], § 7.8.4.

8.2.11 tts:fontStyle

The tts:fontStyle attribute is used to specify a style property that defines the font style to apply to glyphs that are selected for glyph areas generated by content flowed into a region, where the mapping from font style value to specific font face or style parameterization is not determined by this specification.

This attribute may be specified by any style specification element or content element that permits use of attributes in the TT Style Namespace; however, this attribute applies as a style property only to those element types indicated in the following table.

Values: normal | italic | oblique | reverseOblique | inherit
Initial: normal
Applies to: span
Inherited: yes
Percentages: N/A
Animatable: discrete

Note:

For the purpose of determining applicability of this style property, each character child of a p element is considered to be enclosed in an anonymous span.

Use of values oblique and reverseOblique denote a shear and reverse shear transformation (at an unspecified angle) in the inline progression dimension. A conformant processor may perform such a transform on a font in order to satisfy this authorial intent for the purpose of presentation processing. If a specified font style is not available or a shear or reverse shear transformation is not supported, then the processor must interpret the font style as if the value normal were specified for the purpose of presentation processing.

The tts:fontStyle style is illustrated by the following example.

Example Fragment – Font Style
<region xml:id="r1">
  <style tts:extent="331px 84px"/>
  <style tts:backgroundColor="black"/>
  <style tts:color="white"/>
  <style tts:displayAlign="after"/>
  <style tts:textAlign="center"/>
  <style tts:fontFamily="proportionalSansSerif"/>
</region>
...
<p region="r1">
  In autumn, when the leaves are brown,<br/>
  Take pen and ink, and <span tts:fontStyle="italic">write it down.</span>
</p>

Example Rendition – Font Style
DFXP fontStyle style property

Note:

The semantics of the style property represented by this attribute are based upon that defined by [XSL 1.0], § 7.8.7.

8.2.12 tts:fontWeight

The tts:fontWeight attribute is used to specify a style property that defines the font weight to apply to glyphs that are selected for glyph areas generated by content flowed into a region, where the mapping from font weight value to specific font face or weight parameterization is not determined by this specification.

This attribute may be specified by any style specification element or content element that permits use of attributes in the TT Style Namespace; however, this attribute applies as a style property only to those element types indicated in the following table.

Values: normal | bold | inherit
Initial: normal
Applies to: span
Inherited: yes
Percentages: N/A
Animatable: discrete

Note:

For the purpose of determining applicability of this style property, each character child of a p element is considered to be enclosed in an anonymous span.

If a specified font weight is not available, then a conformant processor must interpret the font weight as if the value normal were specified for the purpose of presentation processing.

The tts:fontWeight style is illustrated by the following example.

Example Fragment – Font Weight
<region xml:id="r1">
  <style tts:extent="376px 95px"/>
  <style tts:backgroundColor="black"/>
  <style tts:color="white"/>
  <style tts:displayAlign="center"/>
  <style tts:textAlign="center"/>
  <style tts:fontFamily="proportionalSansSerif"/>
</region>
...
<p region="r1">
  They told me you had been to her,<br/>
  <span tts:fontWeight="bold">and mentioned me to him:</span><br/>
  She gave me a good character<br/>
  <span tts:fontWeight="bold">but said I could not swim.</span>
</p>

Example Rendition – Font Weight
DFXP fontWeight style property

Note:

The semantics of the style property represented by this attribute are based upon that defined by [XSL 1.0], § 7.8.9.

8.2.13 tts:lineHeight

The tts:lineHeight attribute is used to specify a style property that defines the inter-baseline separation between line areas generated by content flowed into a region.

This attribute may be specified by any style specification element or content element that permits use of attributes in the TT Style Namespace; however, this attribute applies as a style property only to those element types indicated in the following table.

Values: normal | <length> | inherit
Initial: normal
Applies to: p
Inherited: yes
Percentages: relative to this element's font size
Animatable: discrete

If the value of this attribute is normal, then the initial value of the style property must be considered to be the same as the largest font size that applies to any child element.

If specified as a <length>, then the length must be non-negative.

The tts:lineHeight style is illustrated by the following example.

Example Fragment – Line Height
<region xml:id="r1">
  <style tts:extent="255px 190px"/>
  <style tts:backgroundColor="black"/>
  <style tts:color="white"/>
  <style tts:displayAlign="center"/>
  <style tts:textAlign="start"/>
  <style tts:fontFamily="proportionalSansSerif"/>
  <style tts:fontSize="16px"/>
  <style tts:lineHeight="32px"/>
</region>
...
<p region="r1">
  He thought he saw an elephant,<br/>
  That practised on a fife:<br/>
  He looked again, and found it was<br/>
  A letter from his wife.<br/>
  "At length I realise," he said,<br/>
  "The bitterness of Life.
"</p>

Example Rendition – Line Height
DFXP lineHeight style property

Note:

The semantics of the style property represented by this attribute are based upon that defined by [XSL 1.0], § 7.15.4.

8.2.14 tts:opacity

The tts:opacity attribute is used to specify a style property that defines the opacity (or transparency) of marks associated with a region (such as a region's background color) or marks associated with areas generated by a given content element to which opacity applies.

When presented onto a visual medium, the opacity of the affacted element is applied uniformly and on a linear scale to all marks produced by the affected element (and its descendants).

This attribute may be specified by any style specification element or content element that permits use of attributes in the TT Style Namespace; however, this attribute applies as a style property only to those element types indicated in the following table.

Values: <alpha> | inherit
Initial: 1.0
Applies to: region
Inherited: no
Percentages: N/A
Animatable: discrete

An <alpha> value greater than 1.0 must be considered equivalent to an <alpha> value of 1.0.

The tts:opacity style is illustrated by the following example.

Example Fragment – Opacity
<region xml:id="r1" dur="5s">
  <set begin="0s" dur="1s" tts:opacity="1.00"/>
  <set begin="1s" dur="1s" tts:opacity="0.75"/>
  <set begin="2s" dur="1s" tts:opacity="0.50"/>
  <set begin="3s" dur="1s" tts:opacity="0.25"/>
  <set begin="4s" dur="1s" tts:opacity="0.00"/>
  <style tts:extent="304px 77px"/>
  <style tts:backgroundColor="black"/>
  <style tts:color="white"/>
  <style tts:displayAlign="after"/>
  <style tts:textAlign="center"/>
</region>
...
<p region="r1">
  The sun was shining on the sea
</p>

Example Rendition – Opacity
DFXP opacity style property - [0,1)
DFXP opacity style property - [1,2)
DFXP opacity style property - [2,3)
DFXP opacity style property - [3,4)
DFXP opacity style property - [4,5)

Note:

The semantics of the style property represented by this attribute are based upon that defined by [CSS3 Color], § 3.2.

8.2.15 tts:origin

The tts:origin attribute is used to specify the x and y coordinates of the origin of a region area with respect to the origin of the root container extent, if specified, or the external authoring context, if not specified.

This attribute may be specified by any style specification element or content element that permits use of attributes in the TT Style Namespace; however, this attribute applies as a style property only to those element types indicated in the following table.

Values: auto | <length> <length> | inherit
Initial: auto
Applies to: region
Inherited: no
Percentages: relative to width and height of root container region
Animatable: none

If the value of this attribute consists of two <length> specifications, then they must be interpreted as x and y coordinates, where the first specification is the x coordinate, and the second specification is the y coordinate.

If the value of this attribute is auto, then the initial value of the style property must be considered to be the same as the root container origin. The root container origin is determined by the external authoring context.

The tts:origin style is illustrated by the following example.

Example Fragment – Origin
<region xml:id="r1">
  <style tts:origin="40px 40px"/>
  <style tts:extent="308px 92px"/>
  <style tts:backgroundColor="black"/>
  <style tts:color="white"/>
  <style tts:displayAlign="center"/>
  <style tts:textAlign="center"/>
</region>
...
<p region="r1">
  "To dine!" she shrieked in dragon-wrath.<br/>
  "To swallow wines all foam and froth!<br/>
   To simper at a table-cloth!"
</p>

Example Rendition – Origin
DFXP origin style property

8.2.16 tts:overflow

The tts:overflow attribute is used to specify a style property that defines whether a region area is clipped or not if the descendant areas of the region overflow its extent.

This attribute may be specified by any style specification element or content element that permits use of attributes in the TT Style Namespace; however, this attribute applies as a style property only to those element types indicated in the following table.

Values: visible | hidden | scroll | inherit
Initial: hidden
Applies to: region
Inherited: no
Percentages: N/A
Animatable: none

If the value of this attribute is visible, then content should not be clipped outside of the affected region, and region composition and layout must be performed as if the region's width and height were infinite, but with a well-defined origin. If the value is hidden, then content should be clipped outside of the affected region.

Note:

Unless a manual line break element br is used by the content author, a paragraph of a given region will generate no more than one line area in that region if the value of the tts:overflow style that applies to the region is visible and if the applicable tts:wrapOption style is noWrap.

If the value of this attribute is scroll, then content is dynamically flowed into and out of the affected region according to the values of the tts:dynamicFlow style property; in this case, the semantics of the tts:dynamicFlow apply whether or not the affected region has overflowed.

The tts:overflow style is illustrated by the following example.

Example Fragment – Overflow
<region xml:id="r1">
  <style tts:extent="232px 40px"/>
  <style tts:origin="0px 0px"/>
  <style tts:backgroundColor="black"/>
  <style tts:color="red"/>
  <style tts:displayAlign="before"/>
  <style tts:textAlign="start"/>
  <style tts:fontFamily="proportionalSansSerif"/>
  <style tts:fontSize="18px"/>
  <style tts:wrapOption="noWrap"/>
  <style tts:overflow="visible"/>
</region>
<region xml:id="r2">
  <style tts:extent="232px 40px"/>
  <style tts:origin="0px 43px"/>
  <style tts:backgroundColor="black"/>
  <style tts:color="red"/>
  <style tts:displayAlign="before"/>
  <style tts:textAlign="start"/>
  <style tts:fontFamily="proportionalSansSerif"/>
  <style tts:fontSize="18px"/>
  <style tts:wrapOption="noWrap"/>
  <style tts:overflow="hidden"/>
</region>
...
<p region="r1">
  "But wait a bit," the Oysters cried,<br/>
  "Before we have our chat;
</p>
<p region="r2">
  For some of us are out of breath,<br/>
  And all of us are fat!"
</p>

Example Rendition – Overflow
DFXP overflow style property

Note:

In the above example, the tts:noWrap is set to noWrap to prevent automatic line wrapping (breaking); if this were not specified, then overflow would occur in the block progression direction as opposed to the inline progression direction.

Note:

The semantics of the style property represented by this attribute are based upon that defined by [XSL 1.0], § 7.20.2.

8.2.17 tts:padding

The tts:padding attribute is used to specify padding (or inset) space on all sides of a region area or a content area produced by a content element.

This attribute may be specified by any style specification element or content element that permits use of attributes in the TT Style Namespace; however, this attribute applies as a style property only to those element types indicated in the following table.

Values: <length> | <length> <length> | <length> <length> <length> | <length> <length> <length> <length> | inherit
Initial: 0
Applies to: region
Inherited: no
Percentages: relative to width and height of region
Animatable: discrete

If the value of this attribute consists of one <length> specification, then that length applies to all edges of the affected areas. If the value consists of two <length> specifications, then the first applies to the before and after edges, and the second applies to the start and end edges. If three <length> specifications are provided, then the first applies to the before edge, the second applies to the start and end edges, and the third applies to the after edge. If four <length> specifications are provided, then they apply to before, end, after, and start edges, respectively.

The tts:padding style is illustrated by the following example.

Example Fragment – Padding
<region xml:id="r1">
  <style tts:extent="446px 104px"/>
  <style tts:backgroundColor="black"/>
  <style tts:color="white"/>
  <style tts:displayAlign="after"/>
  <style tts:textAlign="center"/>
  <style tts:padding="10px 40px"/>
</region>
...
<p region="r1" tts:backgroundColor="red">
  Just the place for a Snark! I have said it twice:<br/>
  That alone should encourage the crew.<br/>
  Just the place for a Snark! I have said it thrice:<br/>
  What I tell you three times is true.
</p>

When rendering an area to which padding applies, the background color that applies to the area is rendered into the padded portion of the area.

Example Rendition – Padding
DFXP padding style property

Note:

The semantics of the style property represented by this attribute are based upon that defined by [XSL 1.0], § 7.29.15, except that individual shorthand values map to writing mode relative padding values as defined by [XSL 1.0], § 7.7.31, 7.7.32, 7.7.33, and 7.7.34.

8.2.18 tts:showBackground

The tts:showBackground attribute is used to specify constraints on when the background color of a region is intended to be presented.

This attribute may be specified by any style specification element or content element that permits use of attributes in the TT Style Namespace; however, this attribute applies as a style property only to those element types indicated in the following table.

Values: always | whenActive | inherit
Initial: always
Applies to: region
Inherited: no
Percentages: N/A
Animatable: discrete

If the value of this attribute is always, then the background color of a region is always rendered when performing presentation processing on a visual medium; if the value is whenActive, then the background color of a region is rendered only when some content is selected into the region.

The tts:showBackground style is illustrated by the following example.

Example Fragment – Show Background
<region xml:id="r1">
  <style tts:origin="0px 0px"/>
  <style tts:extent="265px 100px"/>
  <style tts:backgroundColor="black"/>
  <style tts:showBackground="always"/>
  <style tts:color="white"/>
  <style tts:displayAlign="before"/>
  <style tts:textAlign="start"/>
</region>
<region xml:id="r2">
  <style tts:origin="205px 60px"/>
  <style tts:extent="290px 100px"/>
  <style tts:backgroundColor="red"/>
  <style tts:color="white"/>
  <style tts:displayAlign="before"/>
  <style tts:textAlign="end"/>
  <style tts:showBackground="whenActive"/>
</region>

Note:

The semantics of the style property represented by this attribute are based upon that defined by [SMIL 2.1], § 5.3.1.

8.2.19 tts:textAlign

The tts:textAlign attribute is used to specify a style property that defines how inline areas are aligned within a containing block area in the inline progression direction.

This attribute may be specified by any style specification element or content element that permits use of attributes in the TT Style Namespace; however, this attribute applies as a style property only to those element types indicated in the following table.

Values: left | center | right | start | end | inherit
Initial: start
Applies to: p
Inherited: yes
Percentages: N/A
Animatable: discrete

The tts:textAlign style is illustrated by the following example.

Example Fragment – Text Align
<region xml:id="r1">
  <style tts:extent="355px 43px"/>
  <style tts:origin="0px 0px"/>
  <style tts:backgroundColor="black"/>
  <style tts:color="white"/>
  <style tts:textAlign="start"/>
</region>
<region xml:id="r2">
  <style tts:extent="355px 43px"/>
  <style tts:origin="0px 47px"/>
  <style tts:backgroundColor="black"/>
  <style tts:color="white"/>
  <style tts:textAlign="end"/>
</region>
...
<p region="r1">
  Beware the Jabberwock, my son!<br/>
  The jaws that bite, the claws that catch!
</p>
<p region="r2">
  Beware the Jubjub bird, and shun<br/>
  The frumious Bandersnatch!
</p>

Example Rendition – Text Align
DFXP textAlign style property

Note:

The semantics of the style property represented by this attribute are based upon that defined by [XSL 1.0], § 7.15.9.

8.2.20 tts:textDecoration

The tts:textDecoration attribute is used to specify a style property that defines a text decoration effect to apply to glyph areas or other inline areas that are generated by content flowed into a region.

This attribute may be specified by any style specification element or content element that permits use of attributes in the TT Style Namespace; however, this attribute applies as a style property only to those element types indicated in the following table.

Values: none | [ [ underline | noUnderline ] || [ throughline | noThroughline ] || [ overline | noOverline ] ] | inherit
Initial: none
Applies to: body, div, p, region, span
Inherited: no, but see prose of [XSL 1.0], § 7.16.4
Percentages: N/A
Animatable: discrete

The tts:textDecoration style is illustrated by the following example.

Example Fragment – Text Decoration
<region xml:id="r1">
  <style tts:extent="385px 82px"/>
  <style tts:origin="0px 0px"/>
  <style tts:backgroundColor="black"/>
  <style tts:color="white"/>
  <style tts:padding="5px 2px"/>
  <style tts:textDecoration="underline"/>
</region>
...
<p region="r1">
  The sea was wet<span tts:textDecoration="noUnderline"> as </span>wet<span 
  tts:textDecoration="noUnderline">
        could be,<br/>
        The sand was dry as dry.<br/>
        <span tts:textDecoration="lineThrough">There weren't any</span>
        You
        <span tts:textDecoration="lineThrough">couldn't</span>
        could not see a cloud<br/>
        Because no cloud was in the sky.
  </span>
</p>

Example Rendition – Text Decoration
DFXP textDecoration style property

Note:

The semantics of the style property represented by this attribute are based upon that defined by [XSL 1.0], § 7.16.4.

8.2.21 tts:textOutline

The tts:textOutline attribute is used to specify a style property that defines a text outline effect to apply to glyphs that are selected for glyph areas generated by content flowed into a region.

This attribute may be specified by any style specification element or content element that permits use of attributes in the TT Style Namespace; however, this attribute applies as a style property only to those element types indicated in the following table.

Values: none | <color>? <length> <length>? | inherit
Initial: none
Applies to: span
Inherited: no
Percentages: relative to this element's font size
Animatable: discrete

Note:

For the purpose of determining applicability of this style property, each character child of a p element is considered to be enclosed in an anonymous span.

The value of this attribute consists of an optional <color> term followed by one or two <length> terms. If a color term is present, then it denotes the outline color; if no color term is present, the computed value of the tts:color applies. The first length term denotes the outline thickness and the second length term, if present, indicates the blur radius.

The tts:textOutline style is illustrated by the following example.

Example Fragment – Text Outline
<region xml:id="r1">
  <style tts:backgroundColor="transparent"/>
  <style tts:color="yellow"/>
  <style tts:textOutline="black 2px 0px"/>
  <style tts:fontFamily="proportionalSansSerif"/>
  <style tts:fontSize="24px"/>
</region>
...
<p>
  How doth the little crocodile<br/>
  Improve its shining tail,<br/>
  And pour the waters of the Nile<br/>
  On every golden scale!<br/>
  How cheerfully he seems to grin,<br/>
  How neatly spreads his claws,<br/>
  And welcomes little fishes in,<br/>
  With gently smiling jaws!
</p>

Example Rendition – Text Outline
backgroundColor style property

8.2.22 tts:unicodeBidi

The tts:unicodeBidi attribute is used to specify a style property that defines a directional embedding or override according to the Unicode bidirectional algorithm.

This attribute may be specified by any style specification element or content element that permits use of attributes in the TT Style Namespace; however, this attribute applies as a style property only to those element types indicated in the following table.

Values: normal | embed | bidiOverride | inherit
Initial: normal
Applies to: p, span
Inherited: no
Percentages: N/A
Animatable: none

The tts:unicodeBidi style is illustrated by the following example.

Example Fragment – Unicode Bidirectionality
<region xml:id="r1">
  <style tts:extent="265px 84px"/>
  <style tts:padding="5px"/>
  <style tts:backgroundColor="black"/>
  <style tts:color="white"/>
  <style tts:displayAlign="after"/>
  <style tts:textAlign="center"/>
</region>
...
<p region="r1">
  Little birds are playing<br/>
  Bagpipes on the shore,<br/>
  <span tts:unicodeBidi="bidiOverride" tts:direction="rtl">where the tourists snore.</span>
</p>

Example Rendition – Unicode Bidirectionality
DFXP unicodeBidi style property

Note:

The semantics of the style property represented by this attribute are based upon that defined by [XSL 1.0], § 7.27.6.

8.2.23 tts:visibility

The tts:visibility attribute is used to specify a style property that defines whether generated areas are visible or not when rendered on a visual presentation medium.

This attribute may be specified by any style specification element or content element that permits use of attributes in the TT Style Namespace; however, this attribute applies as a style property only to those element types indicated in the following table.

Values: visible | hidden | inherit
Initial: visible
Applies to: body, div, p, region, span
Animatable: discrete
Animatable: discrete

The tts:visibility style has no affect on content layout or composition, but merely determines whether composed content is visible or not.

The tts:visibility style is illustrated by the following example.

Example Fragment – Visibility
<region xml:id="r1">
  <style tts:extent="398px 121px"/>
  <style tts:backgroundColor="black"/>
  <style tts:color="white"/>
  <style/>
</region>
...
<p region="r1" dur="4s">
  <span tts:visibility="hidden">
    <set begin="1s" tts:visibility="visible"/>
    Curiouser
  </span>
  <span tts:visibility="hidden">
    <set begin="2s" tts:visibility="visible"/>
    and
  </span>
  <span tts:visibility="hidden">
    <set begin="3s" tts:visibility="visible"/>
    curiouser!
  </span>
</p>

Example Rendition – Visibility
DFXP visibility style property - [0,1)
DFXP visibility style property - [1,2)
DFXP visibility style property - [2,3)
DFXP visibility style property - [3,4)

Note:

The semantics of the style property represented by this attribute are based upon that defined by [XSL 1.0], § 7.28.8.

8.2.24 tts:wrapOption

The tts:wrapOption attribute is used to specify a style property that defines whether or not automatic line wrapping (breaking) applies within the context of the affected element.

This attribute may be specified by any style specification element or content element that permits use of attributes in the TT Style Namespace; however, this attribute applies as a style property only to those element types indicated in the following table.

Values: wrap | noWrap | inherit
Initial: wrap
Applies to: span
Inherited: yes
Percentages: N/A
Animatable: discrete

For the purpose of determining applicability of this style property, each character child of a p element is considered to be enclosed in an anonymous span.

The tts:wrapOption style is illustrated by the following example.

Example Fragment – Wrap Option
<region xml:id="r1">
  <style tts:extent="192px 117px"/>
  <style tts:backgroundColor="black"/>
  <style tts:color="white"/>
  <style tts:displayAlign="after"/>
  <style tts:overflow="hidden"/>
  <style tts:wrapOption="noWrap"/>
</region>
...
<p>
  I'll tell thee everything I can:<br/>
  There's little to relate.<br/>
  I saw an aged aged man,<br/>
  A-sitting on a gate."
</p>

Example Rendition – Wrap Option
DFXP wrapOption style property

Note:

The semantics of the style property represented by this attribute are based upon that defined by [XSL 1.0], § 7.15.13.

8.2.25 tts:writingMode

The tts:writingMode attribute is used to specify a style property that defines the block and inline progression directions to be used for the purpose of stacking block and inline areas within a region area.

This attribute may be specified by any style specification element or content element that permits use of attributes in the TT Style Namespace; however, this attribute applies as a style property only to those element types indicated in the following table.

Values: lrtb | rltb | tbrl | tblr | lr | rl | tb | inherit
Initial: lrtb
Applies to: region
Inherited: no
Percentages: N/A
Animatable: none

The tts:writingMode style is illustrated by the following example.

Example Fragment – Writing Mode
<region xml:id="r1">
  <style tts:extent="50px 570px"/>
  <style tts:origin="0px 0px"/>
  <style tts:padding="10px 3px"/>
  <style tts:backgroundColor="black"/>
  <style tts:color="white"/>
  <style tts:writingMode="tbrl"/>
</region>
<region xml:id="r2">
  <style tts:extent="310px 50px"/>
  <style tts:origin="70px 120px"/>
  <style tts:padding="10px 3px"/>
  <style tts:backgroundColor="black"/>
  <style tts:color="white"/>
  <style tts:writingMode="rltb"/>
</region>
...
<p region="r1">
  I sometimes dig for buttered rolls,<br/>
  Or set limed twigs for crabs:
</p>
<p region="r2" tts:direction="rtl" tts:unicodeBidi="bidiOverride">
  I sometimes search the grassy knolls for the wheels of Hansom-cabs.
</p>

Example Rendition – Writing Mode
DFXP writingMode style property

Note:

In the second paragraph in the above example that targets region r2, the tts:unicodeBidi and tts:direction properties are set to bidiOverride and rtl, respectively, in order to override the normally left-to-right directionality of characters in the Latin script.

Note:

The semantics of the style property represented by this attribute are based upon that defined by [XSL 1.0], § 7.27.7.

8.2.26 tts:zIndex

The tts:zIndex attribute is used to specify a style property that defines the front-to-back ordering of region areas in the case that they overlap.

This attribute may be specified by any style specification element or content element that permits use of attributes in the TT Style Namespace; however, this attribute applies as a style property only to those element types indicated in the following table.

Values: auto | <integer> | inherit
Initial: auto
Applies to: region
Inherited: no
Percentages: N/A
Animatable: discrete

If two areas are associated with the same Z-index value, then, if those areas overlap in space, the area(s) generated by lexically subsequent elements must be rendered over area(s) generated by lexically prior elements, where lexical order is defined as the postorder traversal of a document instance.

The semantics of the value auto are those defined by [XSL 1.0], § 7.28.9, where the tt element is considered to establish the root stacking context.

The tts:zIndex style is illustrated by the following example.

Example Fragment – Z Index
<region xml:id="r1">
  <style tts:origin="0px 0px"/>
  <style tts:extent="400px 100px"/>
  <style tts:padding="5px"/>
  <style tts:backgroundColor="black"/>
  <style tts:color="white"/>
  <style tts:zIndex="0"/>
</region>
<region xml:id="r2">
  <style tts:origin="100px 60px"/>
  <style tts:extent="400px 100px"/>
  <style tts:padding="5px"/>
  <style tts:backgroundColor="red"/>
  <style tts:color="white"/>
  <style tts:textAlign="end"/>
  <style tts:zIndex="1"/>
</region>
<region xml:id="r3">
  <style tts:origin="0px 120px"/>
  <style tts:extent="400px 100px"/>
  <style tts:padding="5px"/>
  <style tts:backgroundColor="black"/>
  <style tts:color="white"/>
  <style tts:zIndex="2"/>
</region>
<region xml:id="r4">
  <style tts:origin="100px 180px"/>
  <style tts:extent="400px 100px"/>
  <style tts:padding="5px"/>
  <style tts:backgroundColor="red"/>
  <style tts:color="white"/>
  <style tts:textAlign="end"/>
  <style tts:zIndex="3"/>
</region>
...
<p region="r1">
  I passed by his garden, and marked, with one eye,<br/>
  How the Owl and the Panther were sharing a pie.
</p>
<p region="r2">
  The Panther took pie-crust, and gravy, and meat,<br/>
  While the Owl had the dish as its share of the treat.
</p>
<p region="r3">
  When the pie was all finished, the Owl, as a boon,<br/>
  Was kindly permitted to pocket the spoon:
</p>
<p region="r4">
  While the Panther received knife and fork<br/>
  with a growl,<br/>
  And concluded the banquet by...
</p>

Example Rendition – Z Index
DFXP zIndex style property

Note:

The semantics of the style property represented by this attribute are based upon that defined by [XSL 1.0], § 7.28.9.

8.3 Style Value Expressions

Style property values include the use of the following expressions:

8.3.1 <alpha>

An <alpha> expression is used to express an opacity value, where 0 means fully transparent and 1 means fully opaque.

Syntax Representation – <alpha>
<alpha>
  : float

In the above syntax representation, the syntactic element float must adhere to the lexical representation defined by [XML Schema Part 2] § 3.2.4.1.

8.3.2 <color>

A <color> expression is used to specify a named color, exact RGB color triple, or exact RGBA color tuple, where the alpha component, if expressed, is maximum (255) at 100% opacity and minimum (0) at 0% opacity, and where the applicable color space is defined by [SRGB].

Syntax Representation – <color>
<color>
  : "#" rrggbb
  | "#" rrggbbaa
  | "rgb" "(" r-value "," g-value "," b-value ")"
  | "rgba" "(" r-value "," g-value "," b-value "," a-value ")"
  | <namedColor>
rrggbb
  :  <hexDigit>{6}
rrggbbaa
  :  <hexDigit>{8}
r-value | g-value | b-value | a-value
  : component-value
component-value
  : non-negative-integer                    // valid range: [0,255]
non-negative-integer
  : <digit>+

When expressing RGB component values, these values are considered to not be premultiplied by alpha.

For the purpose of performing presentation processing such that non-opaque or non-transparent alpha or opacity values apply, then the semantics of compositing functions are defined with respect to the use of the [SRGB] color space for both inputs and outputs of the composition function.

Note:

The use of [SRGB] for the stated semantics of composition is not mean to prevent an actual processor from using some other color space either for internal or external purposes. For example, a presentation processor may ultimately convert the SRGB values used here to the YUV color space for rendition on a television device.

8.3.3 <digit>

A <digit> is used to express integers and other types of numbers or tokens.

Syntax Representation – <digit>
<digit>
  : "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"

8.3.4 <duration>

A <duration> expression is used to express a temporal duration value.

Syntax Representation – <duration>
<duration>
  : <digit> ( "." <digit>+ )? metric
metric
  : "s"                 // seconds
  | "ms"                // milliseconds
  | "f"                 // frames
  | "t"                 // ticks

It is an error to omit the metric component of a duration.

When operating with smpte time base and discontinuous mode, a duration expression must be considered to denote a duration in (local) real-time, independently of the governing time base.

8.3.5 <familyName>

A <familyName> expression specifies a font family name.

If the name contains a whitespace or quotation delimiter character, then it must be expressed as a <quotedString>.

Syntax Representation – <familyName>
<familyName>
  : <string>
  | <quotedString>

8.3.6 <genericFamilyName>

A <genericFamilyName> expression specifies a font family using a general token that indicates a class of font families.

The resolution of a generic family name to a concrete font instance is considered to be implementation dependent, both in the case of content authoring and content interpretation.

Syntax Representation – <genericFamilyName>
<genericFamilyName>
  : "default"
  | "monospace"
  | "sansSerif"
  | "serif"
  | "monospaceSansSerif"
  | "monospaceSerif"
  | "proportionalSansSerif"
  | "proportionalSerif"

The mapping between a generic (font) family name and an actual font is not determined by this specification; however, the distinction of monospace versus proportional and serif versus sans-serif should be maintained if possible when performing presentation.

If a generic (font) family name of monospace is specified, then it may be interpreted as equivalent to either monospaceSansSerif or monospaceSerif. The generic family names sansSerif and serif are to be interpreted as equivalent to proportionalSansSerif and proportionalSerif, respectively.

8.3.7 <flowFunction>

A <flowFunction> expression specifies a unit of content to be dynamic flowed into, within, and from a region according to an optional dynamic flow style, flow transition effect, and flow transition effect style.

Syntax Representation – <flowFunction>
<flowFunction>
  : "in(" flowArguments ")"
  | "within(" flowArguments ")"
  | "out(" flowArguments ")"
flowArguments
  : flowUnit [ "," flowStyle [ "," flowTransition [ "," flowTransitionStyle ]]]
flowUnit
  : "pixel"
  | "glyph"
  | "inline"
  | "line"
  | "block"
  | "character"
  | "word"
  | extensionToken
flowStyle
  : "jump"
  | "smooth"
  | "fade"
  | extensionToken
flowTransition
  : "barWipe"
  | extensionToken
flowTransitionStyle
  : "leftToRight"
  | "topToBottom"
  | extensionToken
extensionToken
  : "x-" <token>

Dynamic flow can be specified independently for flowing content into its region, flowing it within its region, and flowing it out of its region. These three phases of dynamic flow are specified using the in(), within(), and out() flow functions respectively.

Dynamic flow occurs on the basis of specific visual or semantic content units. In the case of pixel, glyph, inline, line, and block, the unit of dynamic flow is based upon a visually rendered construct (pixel or glyph) or upon an area of the area tree produced by formatting the affected content. In the case of character and word, the unit of dynamic flow is based upon a semantic unit associated with one or more visually rendered or area units.

The dynamic flow unit word must be interpreted as being dependent upon the language or writing system of the affected content. If the language or writing system is unknown or unspecified, then word is interpreted as follows:

  1. If the affected content consists solely or mostly of Unified CJK Ideographic characters or of characters of another Unicode character block that are afforded similar treatment to that of Unified CJK Ideographic characters, then word is to be interpreted as if character were specified.

  2. Otherwise, word is to be interpreted as denoting a sequence of one or more characters that are not interpreted as an XML whitespace character.

When a flow unit is flowed into, within, or out of its region, the manner by which the unit is flowed is controlled by the optional flowStyle argument of the relevant flow function. If the flow style is specified as jump, or if no flow style is specified, then the flow unit is instantaneously transitioned into, within, or out of the region. If the flow style is smooth, then the flow unit is smoothly transitioned by means of pixel based exposure, movement, or hiding, respectively. If the flow style is fade, then the flow unit is faded into or out of the region by continuously incrementing or decrementing the alpha component of the affected content.

In addition to the primary flow style, an optional flow transition effect and flow transition effect style may be specified, in which case the transition effect is additively (and simultaneously) applied to the primary flow style transition.

For the permitted values of flowTransition and flowTransitionStyle, the semantics specified by [SMIL 2.1], § 12.8, apply.

8.3.8 <flowIntervalFunction>

A <flowIntervalFunction> expression specifies an interval or duration that affects dynamic flow timing behavior.

Syntax Representation – <flowIntervalFunction>
<flowIntervalFunction>
  : "intra(" flowIntervalArguments ")"
  | "inter(" flowIntervalArguments ")"
flowIntervalArguments
  : "auto"
  | <duration>
  | flowIntervalRate
flowIntervalRate
  : <digit>+ ( "." <digit>+ )?

The intra() flow interval function is used to determine the computed fill interval state parameter for performing dynamic flow processing, which expresses the duration of time between fill timer events, as specified by B.5.1 Fill Timer, which in turn, limits the dynamic flowed content fill rate.

The inter() flow interval function is used to determine the computed clear interval state parameter for performing dynamic flow processing, which expresses the duration of time between clear timer events, as specified by B.5.2 Clear Timer, which in turn, limits the dynamic flowed content retention period.

If a <duration> is specified as an argument to a flow interval function, then it is considered to represent a definite duration. If a flow interval rate is specified as an argument to a flow interval function, then it is considered to represent a definite rate in units per second, where the applicable unit is determined in the context of whether the rate is used with an intra() or inter() flow interval function.

The computed fill and clear interval values are defined by B.3 Flow Interval Timing Calculation.

8.3.9 <hexDigit>

A <hexDigit> is used to express integers and other types of numbers or tokens that employ base 16 arithmetic.

For the purpose of parsing, no distinction must be made between lower and upper case.

Syntax Representation – <hexDigit>
<hexDigit>
  : <digit>
  | "a" | "b" | "c" | "d" | "e" | "f"
  | "A" | "B" | "C" | "D" | "E" | "F"

8.3.10 <integer>

An <integer> expression is used to express an arbitrary, signed integral value.

Syntax Representation – <integer>
<integer>
  : ( "+" | "-" )? <digit>+

8.3.11 <length>

A <length> expression is used to express either a coordinate component of point in a cartesian space or a distance between two points in a cartesian space.

Syntax Representation – <length>
<length>
  : scalar
  | percentage
scalar
  : number units
percentage
  : number "%"
sign
  : "+" | "-"
number
  : sign? non-negative-number
non-negative-number
  : non-negative-integer
  | non-negative-real
non-negative-integer
  : <digit>+
non-negative-real
  : <digit>* "." <digit>+
units
  : "px"
  | "em"
  | "c"                                     // abbreviation of "cell"

It is an error to omit the units component of a scalar length value.

The semantics of the unit of measure px (pixel) are as defined by [XSL 1.0], § 5.9.13.

When specified relative to a font whose size is expressed as a single length measure or as two length measures of equal length, the unit of measure em is considered to be identical to that defined by [XSL 1.0], § 5.9.13; however, when specified relative to a font whose size is expressed as two length measures of non-equal lengths, then one em is equal to the inline progression dimension of the anisomorphically scaled font when used to specify lengths in the inline progression direction and equal to the block progression dimension of the scaled font when used to specify lengths in the block progression direction.

The semantics of the unit of measure c (cell) are defined by the parameter 6.2.1 ttp:cellResolution.

8.3.12 <namedColor>

A <namedColor> is used to express an RGBA color with a convenient name, and where the applicable color space is defined by [SRGB].

For the purpose of parsing, no distinction must be made between lower and upper case.

Syntax Representation – <namedColor>
<namedColor>
  : "transparent"                           // #00000000
  | "black"                                 // #000000ff
  | "silver"                                // #c0c0c0ff
  | "gray"                                  // #808080ff
  | "white"                                 // #ffffffff
  | "maroon"                                // #800000ff
  | "red"                                   // #ff0000ff
  | "purple"                                // #800080ff
  | "fuchsia"                               // #ff00ffff
  | "magenta"                               // #ff00ffff (= fuchsia)
  | "green"                                 // #008000ff
  | "lime"                                  // #00ff00ff
  | "olive"                                 // #808000ff
  | "yellow"                                // #ffff00ff
  | "navy"                                  // #000080ff
  | "blue"                                  // #0000ffff
  | "teal"                                  // #008080ff
  | "aqua"                                  // #00ffffff
  | "cyan"                                  // #00ffffff (= aqua)

Note:

Except for transparent, the set of named colors specified above constitutes a proper subset of the set of named colors specified by [SVG 1.1], § 4.2.

8.3.13 <quotedString>

A <quotedString> is used to express a delimited string that may contain a whitespace or a quotation delimiter character. Two types of quotation delimiters are provided in order to accommodate strings that contain the other delimiter.

Syntax Representation – <quotedString>
<quotedString>
  : "\"" ( char - { "\"" } )* "\""
  | "\'" ( char - { "\'" } )* "\'"

In the above syntax representation, the syntactic element char must adhere to production [2] Char as defined by [XML 1.1] § 2.2.

8.3.14 <string>

A <string> expression consists of a sequence of characters where no character is a whitespace or quotation delimiter character.

Syntax Representation – <string>
<string>
  : ( char - { S | "\"" | "\'" } )+

In the above syntax representation, the syntactic element char must adhere to production [2] Char as defined by [XML 1.1] § 2.2, while the syntactic element S must adhere to production [3] S as defined by [XML 1.1] § 2.3.

8.4 Style Association

Style matter may be associated with content matter in a number of ways:

  • inline styling

  • referential styling

  • chained referential styling

8.4.1 Inline Styling

Style properties may be expressed in an inline manner by direct specification of an attribute from the TT Style Namespace or TT Style Extension Namespace on the affected element. When expressed in this manner, the association of style information is referred to as inline styling.

Style properties associated by inline styling are afforded a higher priority than all other forms of style association.

Example – Inline Styling
<p tts:color="white">White 1 <span tts:color="yellow">Yellow</span> White 2</p>

Note:

In the above example, the two text fragments "White 1 " and " White 2", which are interpreted as anonymous spans, are not associated with a color style property; rather, they inherit their color style from their parent p element as described in 8.5.1 Content Style Inheritance below.

8.4.2 Referential Styling

Style properties may be expressed in an out-of-line manner and referenced by the affected element using the style attribute. When expressed in this manner, the association of style information is referred to as referential styling.

If a style attribute specifies multiple references, then those references are evaluated in the specified order, and that order applies to resolution of the value of a style property in the case that it is specified along multiple reference paths.

Note:

The use of referential styling encourages the reuse of style specifications while sacrificing locality of reference.

Note:

A single content element may be associated with style properties by a hybrid mixture of inline and referential styling, in which case inline styling is given priority as described above by 8.4.1 Inline Styling.

Example – Referential Styling
<style xml:id="s1" tts:color="white"/>
<style xml:id="s2" tts:color="yellow"/>
...
<p style="s1">White 1 <span style="s2">Yellow</span> White 2</p>

Note:

In the above example, the two text fragments "White 1 " and " White 2", which are interpreted as anonymous spans, are not associated with a color style property; rather, they inherit their color style from their parent p element as described in 8.5.1 Content Style Inheritance below.

8.4.3 Chained Referential Styling

Style properties may be expressed in an out-of-line manner and may themselves reference other out-of-line style properties, thus creating a chain of references starting at the affected element. When expressed in this manner, the association of style information is referred to as chained referential styling.

If the same style property is specified in more than one referenced specification, then the last referenced style specification applies, where the order of application starts from the affected element and proceeds to referenced style specifications, and, in turn, to subsequent referenced style specifications.

A loop in a sequence of chained style references must be considered an error.

Note:

The use of chained referential styling encourages the grouping of style specifications into general and specific sets, which further aids in style specification reuse.

Note:

A single content element may be associated with style properties by a hybrid mixture of inline, referential styling, and chained referential styling, in which case inline styling is given priority as described above by 8.4.1 Inline Styling.

Example – Chained Referential Styling
<style xml:id="s1" tts:color="white" tts:fontFamily="monospaceSerif"/>
<style xml:id="s2" style="s1" tts:color="yellow"/>
...
<p style="s1">White Monospace</p>
<p style="s2">Yellow Monospace</p>

8.5 Style Inheritance

Subsequent to the association of style matter with content matter as described above in 8.4 Style Association, styles are further propagated to content matter using:

  • content style inheritance

  • region style inheritance

8.5.1 Content Style Inheritance

Style properties are inherited from ancestor elements in the following case:

  1. if a style property is not associated with an element (or an anonymous span) and the style property is designated as inheritable, or

  2. if a style property is associated with an element, that element is not the body element, and the associated style property value is inherit.

If a style property is determined to require inheritance, then the inherited value must be the value of the same named style property in the computed style specification set of the element's immediate ancestor element.

Example – Content Style Inheritance
<p tts:fontFamily="monospaceSansSerif">
  <span tts:color="yellow">Yellow Monospace</span>
</p>

Note:

In the above example, the span element that encloses the character items Yellow Monospace is not associated with a tts:fontFamily style property and this property is inheritable; therefore, the value of the tts:fontFamily style is inherited from the computed style specification set of the ancestor p element, and is added to the computed style specification set of the span element.

8.5.2 Region Style Inheritance

Style properties are inherited from a region element in the following case:

  1. if a style property P is not associated with an element (or an anonymous span) E and the style property is designated as inheritable, and

  2. if that style property P is in the computed style specification set of region R as defined by 9.1.2 region below, and

  3. if that element E is flowed into region R.

Example – Region Style Inheritance
<region xml:id="r1">
  <style tts:color="yellow"/>
  <style tts:fontFamily="monospaceSerif"/>
</region>
...
<p region="r1">Yellow Monospace</p>

9 Layout

This section specifies the layout matter of the core vocabulary catalog, where layout is to be understood as a separable layer of information that applies to content and that denotes authorial intentions about the presentation of that content.

Note:

The two layers of layout and style matter are considered to be independently separable. Layout matter specifies one or more spaces or areas into which content is intended to be presented, while style matter specifies the manner in which presentation occurs within the layout.

In certain cases, a content author may choose to embed (inline) style matter directly into layout or content matter. In such cases, an alternative exists – use of referential styling – in which the style matter is not embedded (inlined).

9.1 Element Vocabulary

The following elements specify the structure and principal layout aspects of a document instance:

9.1.1 layout

The layout element is a container element used to group layout matter, including metadata that applies to layout matter.

The layout element accepts as its children zero or more elements in the Metadata.class element group, followed by zero or more region elements.

XML Representation – Element Information Item: layout
<layout
  xml:id = ID
  xml:lang = string
  xml:space = (default|preserve)
  {any attribute not in default or any TT namespace ...}>
  Content: Metadata.class*, region*
</layout>

To the extent that time semantics apply to the content of the layout element, the implied time interval of this element is defined to be coterminous with the external time interval.

9.1.2 region

The region element is used to define a space or area into which content is to be flowed for the purpose of presentation.

The region element accepts as its children zero or more elements in the Metadata.class element group, followed by zero or more elements in the Animation.class element group, followed by zero or more style elements.

Any metadata specified by children in the Metadata.class element group applies semantically to the region element and its descendants as a whole. Any animation elements specified by children in the Animation.class element group apply semantically to the region element. Any style child element must be considered a local style definition that applies only to the containing region element, i.e., does not apply for resolving referential styling.

XML Representation – Element Information Item: region
<region
  begin = <timeExpression>
  dur = <timeExpression>
  end = <timeExpression>
  style = IDREFS
  timeContainer = (par|seq)
  xml:id = ID
  xml:lang = string
  xml:space = (default|preserve)
  {any attribute in TT Style namespace ...}
  {any attribute not in default or any TT namespace ...}>
  Content: Metadata.class*, Animation.class*, style*
</region>

The declared value of an inline style attribute on a region element must not be inherit.

A region element is considered to define a computed style specification set, where the set is determined using the following ordered rules:

  1. If a style attribute is specified on the region element, then the set must be initialized so as to include each style specification contained in the computed style specification set of each element referenced by the style attribute. If the same named style property is specified by more than one such referenced computed style specification set, then the value of the named style property in following referenced sets takes precedence over the value of the named style property in prior referenced sets, where following and prior are determined according to the order of the referenced ID in the IDREFS value of the style attribute.

  2. If the region element has any style element children, then each style specification of the computed style specification set of each child style element either overrides an existing style specification already contained within the set or augments the set with a new style specification according to whether or not the named style property of the style specification matches the named style property of an existing style specification already included in the set, where the order of evaluation of child style elements proceeds from first to last such child element.

  3. If the style element specifies an attribute from the TT Style Namespace or TT Style Extension Namespace, then each style specification defined by that attribute either overrides an existing style specification already contained within the set or augments the set with a new style specification according to whether or not the named style property of the style specification matches the named style property of an existing style specification already included in the set.

Two named style properties are considered to match if their expanded names match, where expanded name is defined by [XML Namespaces 1.1], §2.1, and the expanded name of a named style property is the expanded name of the attribute that specifies the named style property.

If begin and (or) end attributes are specified on a region element, then they specify the beginning and (or) ending points of a time interval during which the region is eligible for activation and with respect to which animation child elements of the region are timed. If specified, these begin and end points are relative to the time interval of the nearest ancestor element associated with a time interval, irregardless of whether that interval is explicit or implied.

The nearest ancestor element of a region element that is associated with a time interval is the document instance's root tt element.

If a dur attribute is specified on the region element, then it specifies the simple duration of the region.

For the purpose of determining the semantics of presentation processing, a region that is temporally inactive must not produce any visible marks when presented on a visual medium.

Note:

A region element may be associated with a time interval for two purposes: (1) in order to temporally bound the presentation of the region and its content, and (2) to provide a temporal context in which animations of region styles may be effected.

For example, an author may wish a region that is otherwise empty, but may have a visible background color to be presented starting at some time and continuing over the region's duration. The simple duration of the region serves additionaly to scope the presentation effects of content that is targeted to the region. An author may also wish to move a region within the root container extent or change a region's background color by means of animation effects. In both of these cases, it is necessary to posit an active time interval for a region.

9.2 Attribute Vocabulary

This section defines the 9.2.1 region attribute used with content elements.

9.2.1 region

The region attribute is used to reference a region element which defines a space or area into which a content element is intended to be flowed.

The region attribute may be specified by an instance of the following element types:

Note:

See 9.3 Region Layout and Presentation below for further information on content flow in a region.

9.3 Region Layout and Presentation

This section defines the semantics of region layout and presentation in terms of a standard processing model. Any implementation is permitted provided that the externally observable results are consistent with the results produced by this model.

9.3.1 Synchronic Region Construction

For the purposes of performing presentation processing, the active time duration of a document instance is divided into a sequence of time coordinates where at each time coordinate, some element becomes temporally active or inactive, then, at each such time coordinate, a document instance is mapped from its original, source form to an intermediate form, I, as follows:

  1. for each temporally active region R, replicate the portion of the document's sub-tree headed by the body element;

  2. evaluating this sub-tree in a postorder traversal, prune elements if they are not a content element, if they are temporally inactive, if they are empty, or if they aren't associated with region R;

  3. if the pruned sub-tree is non-empty, then reparent it to the R element;

  4. finally, after completing the above steps, prune the original body element from the intermediate document, then prune all region, begin, end, and dur attributes, which are no longer semantically relevant;

The pseudo-code shown in Example – Content Hierarchy Region Mapping provides one possible algorithm that implements these processing steps.

Example – Content Hierarchy Region Mapping
PREPARE-CONTENT ( D ) := 
  foreach R in SELECT ( D, "/tt/head/layout/region" )
    if TEMPORALLY-ACTIVE? ( R )
      APPEND-CHILDREN ( R, SELECT ( D, "/tt/body" ) )
      foreach E in POSTORDER-TRAVERSE ( R )
        if CONTENT-ELEMENT? ( E ) and TEMPORALLY-ACTIVE? ( E )
          if EMPTY? ( E ) or REGION-OF ( E ) != R and 
            then PRUNE ( E )
  PRUNE ( SELECT ( D, "/tt/body" ) )
  PRUNE ( SELECT ( D, "//*/@region" ) )
  PRUNE ( SELECT ( D, "//*/@begin" ) )
  PRUNE ( SELECT ( D, "//*/@end" ) )
  PRUNE ( SELECT ( D, "//*/@dur" ) )
 
REGION-OF ( E ) :=
  if NULL? ( E )
    return NULL
  else if HAS-ATTRIBUTE? ( E, "region" )
    return VALUE-OF-ATTRIBUTE ( E, "region" )
  else
    return REGION-OF ( PARENT-OF ( E ) )

The result of performing the processing described above will be a sequence of N intermediate documents instances, I0IN−1.

9.3.2 Synchronic Flow Processing

Subsequent to performing a temporal (synchronic) slice and subsequent remapping of regionally selected content hierarchy, the resulting intermediate document is subjected to a flow transformation step that produces a rooted flow object tree represented as an XSL FO document instance as defined by [XSL 1.0], and semantically extended by TT AF specific style properties that have no XSL FO counterpart.

Each intermediate document produced by 9.3.1 Synchronic Region Construction is mapped to an XSL FO document instance, F, as follows:

  1. for each significant text node in a content element that is not a child of a span element, synthesize an anonymous span to enclose the text node, substituting the new anonymous span for the original text node child in its sibling and parent hierarchy;

  2. for each element, determine its computed style specification set, if applicable;

  3. map the tt element to an fo:root element, populated initially with an fo:layout-master-set element that contains a valid fo:simple-page-master that, in turn, contains an fo:region-body child, where the root container extent expressed on the tt element is mapped to page-width and page-height attributes on the fo:simple-page-master element;

  4. map the layout element to an fo:page-sequence element and a child fo:flow element that reference the page master and page region defined by the simple page master produced above;

  5. map each non-empty region element to an fo:block-container element with an absolute-position attribute with value absolute, and where the region's position and extent are mapped to equivalent top, left, width, and height attributes;

  6. for each body, div, and p element that is not associated with a tts:display style property with the value none, map the element to a distinct fo:block element, populating the style properties of fo:block by using the computed style specification set associated with each original TT AF content element;

  7. for each span element that is not associated with a tts:display style property with the value none and for each anonymous span, map the element or sequence of character items to a distinct fo:inline element, populating the style properties of fo:inline by using the computed style specification set associated with each original TT AF content element or anonymous span;

  8. for each br element that is not associated with a tts:display style property with the value none, map the element to a distinct fo:character element having the following properties:

    • character="&#x000A;"

    • suppress-at-line-break="retain"

  9. for each TT AF style property attribute in some computed style specification set that has no counterpart in [XSL 1.0], map that attribute directly through to the relevant formatting object produced by the input TT AF content element to which the style property applies;

  10. optionally, synthesize a unique id attribute on each resulting formatting object element that relates that element to the input element that resulted in that formatting object element;

For each resulting XSL FO document instance F, if processing requires presentation on a visual medium, then apply the formatting semantics prescribed by [XSL 1.0] in order to produce an XSL FO area tree that may then be subsequently rendered onto the visual medium.

Note:

Due to the possible presence of TT AF style properties or style property values in a given DFXP document instance for which there is no [XSL 1.0] counterpart, the use of a compliant [XSL 1.0] formatting processor is not necessarily sufficient to satisfy the presentation semantics defined by this specification.

9.3.3 Elaborated Example

An example of the processing steps described above is elaborated below, starting with Example – Sample Source Document.

Example – Sample Source Document
<tt xml:lang="en" xmlns="http://www.w3.org/2006/10/ttaf1"
  xmlns:tts="http://www.w3.org/2006/10/ttaf1#style">
  <head>
    <layout>
      <region xml:id="r1">
        <style tts:origin="10px 100px"/>
        <style tts:extent="620px 96px"/>
        <style tts:fontSize="40px"/>
        <style tts:fontWeight="bold"/>
        <style tts:backgroundColor="black"/>
        <style tts:color="red"/>
        <style tts:textAlign="center"/>
        <style tts:displayAlign="center"/>
      </region>
      <region xml:id="r2">
        <style tts:origin="10px 300px"/>
        <style tts:extent="620px 96px"/>
        <style tts:fontSize="40px"/>
        <style tts:fontWeight="bold"/>
        <style tts:backgroundColor="black"/>
        <style tts:color="yellow"/>
        <style tts:textAlign="center"/>
        <style tts:displayAlign="center"/>
      </region>
    </layout>
  </head>
  <body tts:extent="640px 480px" xml:id="b1">
    <div xml:id="d1" begin="0s" dur="2s">
      <p xml:id="p1" region="r1">Text 1</p>
      <p xml:id="p2" region="r2">Text 2</p>
    </div>
    <div xml:id="d2" begin="1s" dur="2s">
      <p xml:id="p3" region="r2">Text 3</p>
      <p xml:id="p4" region="r1">Text 4</p>
    </div>
  </body>
</tt>

In the above document, the content hierarchy consists of two divisions, each containing two paragraphs. This content is targeted (selected into) one of two non-overlapping regions that are styled identically except for their position and their foreground colors, the latter of which is inherited by and applies to the (and, in this case, anonymous) spans reparented into the regions.

The following, first intermediate document shows the synchronic state at time interval [0,1), during which time only division d1 is temporally active, and where paragraphs p1 and p2 (and their ancestors) are selected into regions r1 and r2, respectively.

Note:

The intermediate documents shown below are not valid DFXP document instances, but rather, are representations of possible internal processing states used for didactic purposes.

Example – Intermediate Document – [0s,1s)
<tt xml:lang="en" xmlns="http://www.w3.org/2006/10/ttaf1"
  xmlns:tts="http://www.w3.org/2006/10/ttaf1#style">
  <head>
    <layout>
      <region xml:id="r1">
        <style tts:origin="10px 100px"/>
        <style tts:extent="620px 96px"/>
        <style tts:fontSize="40px"/>
        <style tts:fontWeight="bold"/>
        <style tts:backgroundColor="black"/>
        <style tts:color="red"/>
        <style tts:textAlign="center"/>
        <style tts:displayAlign="center"/>
        <body tts:extent="640px 480px" xml:id="b1-1">
          <div xml:id="d1-1">
            <p xml:id="p1">Text 1</p>
          </div>
        </body>
      </region>
      <region xml:id="r2">
        <style tts:origin="10px 300px"/>
        <style tts:extent="620px 96px"/>
        <style tts:fontSize="40px"/>
        <style tts:fontWeight="bold"/>
        <style tts:backgroundColor="black"/>
        <style tts:color="yellow"/>
        <style tts:textAlign="center"/>
        <style tts:displayAlign="center"/>
        <body tts:extent="640px 480px" xml:id="b1-2">
          <div xml:id="d1-2">
            <p xml:id="p2">Text 2</p>
          </div>
        </body>
      </region>
    </layout>
  </head>
</tt>

An XSL FO document instance produced by performing flow processing upon the first intermediate document is shown below.

Example – XSL FO Document – [0s,1s)
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  <fo:layout-master-set>
    <fo:simple-page-master master-name="m1"
    page-width="640px" page-height="480px">
      <fo:region-body/>
    </fo:simple-page-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference="m1">
    <fo:flow flow-name="xsl-region-body">
      <!-- region (r1) -->
      <fo:block-container id="r1" absolute-position="absolute"
      left="10px" top="100px" width="620px" height="96px"
      background-color="black" display-align="center">
        <!-- body (b1) -->
        <fo:block id="b1-1">
          <!-- div (d1) -->
          <fo:block id="d1-1">
            <!-- p (p1) -->
            <fo:block id="p1" text-align="center">
              <fo:inline font-size="40px" font-weight="bold"
              color="red">Text 1</fo:inline>
            </fo:block>
          </fo:block>
        </fo:block>
      </fo:block-container>
      <!-- region (r2) -->
      <fo:block-container id="r2" absolute-position="absolute"
      left="10px" top="300px" width="620px" height="96px"
      background-color="black" display-align="center">
        <!-- body (b1) -->
        <fo:block id="b1-2">
          <!-- div (d1) -->
          <fo:block id="d1-2">
            <!-- p (p2) -->
            <fo:block id="p2" text-align="center">
              <fo:inline font-size="40px" font-weight="bold"
              color="yellow">Text 2</fo:inline>
            </fo:block>
          </fo:block>
        </fo:block>
      </fo:block-container>
    </fo:flow>
  </fo:page-sequence>
</fo:root>

The following, second intermediate document shows the synchronic state at time interval [1,2), at which time both divisions d1 and d2 are temporally active, and where paragraphs p1 and p4 (and their ancestors) are selected into region r1 and paragraphs p2 and p3 (and their ancestors) are selected into region r2.

Example – Intermediate Document – [1s,2s)
<tt xml:lang="en" xmlns="http://www.w3.org/2006/10/ttaf1"
  xmlns:tts="http://www.w3.org/2006/10/ttaf1#style">
  <head>
    <layout>
      <region xml:id="r1">
        <style tts:origin="10px 100px"/>
        <style tts:extent="620px 96px"/>
        <style tts:fontSize="40px"/>
        <style tts:fontWeight="bold"/>
        <style tts:backgroundColor="black"/>
        <style tts:color="red"/>
        <style tts:textAlign="center"/>
        <style tts:displayAlign="center"/>
        <body tts:extent="640px 480px" xml:id="b1-1">
          <div xml:id="d1-1">
            <p xml:id="p1">Text 1</p>
          </div>
          <div xml:id="d2-1">
            <p xml:id="p4">Text 4</p>
          </div>
        </body>
      </region>
      <region xml:id="r2">
        <style tts:origin="10px 300px"/>
        <style tts:extent="620px 96px"/>
        <style tts:fontSize="40px"/>
        <style tts:fontWeight="bold"/>
        <style tts:backgroundColor="black"/>
        <style tts:color="yellow"/>
        <style tts:textAlign="center"/>
        <style tts:displayAlign="center"/>
        <body tts:extent="640px 480px" xml:id="b1-2">
          <div xml:id="d1-2">
            <p xml:id="p2">Text 2</p>
          </div>
          <div xml:id="d2-2">
            <p xml:id="p3">Text 3</p>
          </div>
        </body>
      </region>
    </layout>
  </head>
</tt>

The following, third intermediate document shows the synchronic state at time interval [2,3), at which time only division d2 is temporally active, and where paragraphs p4 and p3 (and their ancestors) are selected into regions r1 and r2, respectively.

Example – Intermediate Document – [2s,3s)
<tt xml:lang="en" xmlns="http://www.w3.org/2006/10/ttaf1"
  xmlns:tts="http://www.w3.org/2006/10/ttaf1#style">
  <head>
    <layout>
      <region xml:id="r1">
        <style tts:origin="10px 100px"/>
        <style tts:extent="620px 96px"/>
        <style tts:fontSize="40px"/>
        <style tts:fontWeight="bold"/>
        <style tts:backgroundColor="black"/>
        <style tts:color="red"/>
        <style tts:textAlign="center"/>
        <style tts:displayAlign="center"/>
        <body tts:extent="640px 480px" xml:id="b1-1">
          <div xml:id="d2-1">
            <p xml:id="p4">Text 4</p>
          </div>
        </body>
      </region>
      <region xml:id="r2">
        <style tts:origin="10px 300px"/>
        <style tts:extent="620px 96px"/>
        <style tts:fontSize="40px"/>
        <style tts:fontWeight="bold"/>
        <style tts:backgroundColor="black"/>
        <style tts:color="yellow"/>
        <style tts:textAlign="center"/>
        <style tts:displayAlign="center"/>
        <body tts:extent="640px 480px" xml:id="b1-2">
          <div xml:id="d2-2">
            <p xml:id="p3">Text 3</p>
          </div>
        </body>
      </region>
    </layout>
  </head>
</tt>

9.4 Line Layout

The semantics of line layout, including line breaking, defined by [XSL 1.0] apply to the performance of the composition and layout of lines for presentation processing of a document instance on a visual medium.

10 Timing

This section specifies the timing matter of the core vocabulary catalog, where timing is to be understood as a separable layer of information that applies to content and that denotes authorial intentions about the temporal presentation of that content.

10.1 Element Vocabulary

No timing related element vocabulary is defined for use in the core vocabulary catalog.

10.2 Attribute Vocabulary

This section defines the following basic timing attributes for use with timed elements:

In addition, this section defines the 10.2.4 timeContainer attribute for use with timed elements that serve simultaneously as timing containers.

10.2.1 begin

The begin attribute is used to specify the begin point of a temporal interval associated with a timed element. If specified, the value of a begin attribute must adhere to a <timeExpression> specification as defined by 10.3.1 <timeExpression>.

The begin point of a temporal interval is included in the interval; i.e., the interval is left-wise closed.

Note:

The semantics of the begin attribute are based upon that defined by [SMIL 2.1], § 10.3.1.

10.2.2 end

The end attribute is used to specify the ending point of a temporal interval associated with a timed element. If specified, the value of an end attribute must adhere to a <timeExpression> specification as defined by 10.3.1 <timeExpression>.

The ending point of a temporal interval is not included in the interval; i.e., the interval is right-wise open.

The presentation effects of a non-empty active temporal interval include the frame immediately prior to the frame (or tick) equal to or immediately following the time specified by the ending point, but do not extend into this latter frame (or tick).

Note:

For example, if an active interval is [10s,10.33333s), and the frame rate is 30 frames per second, then the presentation effects of the interval are limited to frames 300 through 309 only (assuming that 0s corresponds with frame 0). The same holds if the active interval is specified as [300f,310f).

Note:

The semantics of the end attribute are based upon that defined by [SMIL 2.1], § 10.3.1.

10.2.3 dur

The dur attribute is used to specify the duration of a temporal interval associated with a timed element. If specified, the value of a dur attribute must adhere to a <timeExpression> specification as defined by 10.3.1 <timeExpression>.

Note:

The semantics of the dur attribute are based upon that defined by [SMIL 2.1], § 10.3.1.

10.2.4 timeContainer

The timeContainer attribute is used to specify a local temporal context by means of which timed child elements are temporally situated.

If specified, the value of a timeContainer attribute must be one of the following:

  • par

  • seq

If the time container semantics of an element instance is par, then the temporal intervals of child elements are considered to apply in parallel, i.e., simultaneously in time. Furthermore, the specification of the time interval of each child element is considered to be relative to the temporal interval of the container element instance.

If the time container semantics of an element instance is seq, then the temporal intervals of child elements are considered to apply in sequence, i.e., sequentially in time. Furthermore, the specification of the time interval of each child element is considered to be relative to the temporal interval of its sibling elements, unless it is the first child element, in which case it is considered to be relative to the temporal interval of the container element instance.

Each time container is considered to constitute an independent time base, i.e., time coordinate system.

If a timeContainer attribute is not specified on an element that has time container semantics, then par time container semantics must apply.

Time container semantics applies only to the following element types:

Note:

The semantics of parallel and sequential time containment are based upon that defined by [SMIL 2.1], § 10.3.2.

10.3 Time Value Expressions

Timing attribute values include the use of the following expressions:

10.3.1 <timeExpression>

A <timeExpression> is used to specify a coordinate along some time base, where the applicable time base is determined by the ttp:timeBase parameter.

Note:

See 6.2.11 ttp:timeBase, 6.2.3 ttp:frameRate, 6.2.9 ttp:subFrameRate, and 6.2.10 ttp:tickRate for further information on explicit specification of time base, frame rate, sub-frame rate, and tick rate.

Syntax Representation – <timeExpression>
<timeExpression>
  : clock-time
  | offset-time
clock-time
  : hours ":" minutes ":" seconds ( fraction | ":" frames ( "." sub-frames )? )?
offset-time
  : time-count fraction? metric
hours
  : <digit> <digit>
  | <digit> <digit> <digit>+
minutes | seconds
  : <digit> <digit>
frames
  : <digit> <digit>
  | <digit> <digit> <digit>+
sub-frames
  : <digit>+
fraction
  : "." <digit>+
time-count
  : <digit>+
metric
  : "h"                 // hours
  | "m"                 // minutes
  | "s"                 // seconds
  | "ms"                // milliseconds
  | "f"                 // frames
  | "t"                 // ticks

If a <timeExpression> is expressed in terms of a clock-time, then leading zeroes are used when expressing hours, minutes, seconds, and frames less than 10. Minutes are constrained to the range [0…59], while seconds are constrained to [0…60], where the value 60 applies only to leap seconds.

If a <timeExpression> is expressed in terms of a clock-time and a frames term is specified, then the value of this term must be constrained to the interval [0…F-1], where F is the frame rate determined by the the ttp:frameRate parameter as defined by 6.2.3 ttp:frameRate.

If a <timeExpression> is expressed in terms of a clock-time and a sub-frames term is specified, then the value of this term must be constrained to the interval [0…S-1], where S is the sub-frame rate determined by the the ttp:subFrameRate parameter as defined by 6.2.9 ttp:subFrameRate.

10.4 Time Intervals

The semantics of time containment, durations, and intervals defined by [SMIL 2.1] apply to the interpretation of like-named timed elements and timing vocabulary defined by this specification, given the following constraints:

  • The implicit duration of body, div, p, and span (whether anonyous or not) is defined as follows: if the element's parent time container is a parallel time container, then the implicit duration is equivalent to the indefinite duration value as defined by [SMIL 2.1]; if the element's parent time container is a sequential time container, then the implicit duration is equivalent to zero.

  • The implicit duration of the region element is defined to be equivalent to the indefinite duration value as defined by [SMIL 2.1].

  • If the governing time mode is media or smpte with mode continuous, then time expressions must be interpreted as equivalent to offset clock values related to the associated media time line.

  • If the governing time mode is smpte with mode discontinuous, then time expressions must be interpreted as equivalent to marker values produced by an external marker event source, in which case all time expressions are equivalent to event based timing in [SMIL 2.1].

  • If the governing time mode is clock, then time expressions must be interpreted as equivalent to wallclock time expressions in [SMIL 2.1], where the applicable wallclock used is determined by the clock mode parameter.

11 Animation

This section specifies the animation matter of the core vocabulary catalog, where animation is to be understood as a separable layer of information that combines timing and styling in order to denote authorial intention about (temporally) dynamic styling of content.

11.1 Element Vocabulary

The following elements specify the structure and principal animation aspects of a document instance:

11.1.1 set

The set element is used as a child element of a content element in order to express a discrete change of some style parameter value that applies over some time interval.

The set element accepts as its children zero or more elements in the Metadata.class element group.

XML Representation – Element Information Item: set
<set
  begin = <timeExpression>
  dur = <timeExpression>
  end = <timeExpression>
  xml:id = ID
  xml:lang = string
  xml:space = (default|preserve)
  {a single attribute in TT Style or TT Style Extension namespace}
  {any attribute not in default or any TT namespace ...}>
  Content: Metadata.class*
</set>

Note:

The use of multiple set element children may be used to effect fade and position transitions.

Note:

The semantics of the set element are based upon that defined by [SMIL 2.1], § 3.5.2.

11.2 Attribute Vocabulary

No animation related attribute vocabulary is defined for use in the core vocabulary catalog.

12 Metadata

This section specifies the metadata matter of the core vocabulary catalog, where metadata is to be understood as a separable layer of information that applies to content, style, layout, timing, and even metadata itself, where the information represented by metadata takes one of two forms: (1) metadata defined by this specification for standardized use in a document instance, and (2) arbitrary metadata defined outside of the scope of this specification, whose use and semantics depend entirely upon an application's use of TT AF content.

12.1 Element Vocabulary

The 12.1.1 metadata element serves as a generic container element for grouping metadata information.

In addition, the following elements, all defined in the TT Metadata Namespace, provide standard representations for common metadata that is expected to be commonly used in a document instances:

12.1.1 metadata

The metadata element functions as a generic container for metadata information.

Metadata information may be expressed by a metadata element in one of two (non-mutually exclusive) manners: (1) by specifying one or more metadata attributes on the element, and (2) by specifying one or more metadata child elements that express metadata. Both types of metadata are referred to in this document as metadata items.

XML Representation – Element Information Item: metadata
<metadata
  xml:id = ID
  xml:lang = string
  xml:space = (default|preserve)
  {any attribute in TT Metadata namespace ...}
  {any attribute not in default or any TT namespace ...}>
  Content: {any element not in TT namespace}*
</metadata>

Note:

The meaning of a specific metadata item must be evaluated in the context of where it appears. The core vocabulary catalog permits an arbitrary number of metadata element children of any non-empty element type except for the body element. See specific element vocabulary definitions for any constraints that apply to such usage.

12.1.2 ttm:title

The ttm:title element is used to express a human-readable title of a specific element instance.

XML Representation – Element Information Item: ttm:title
<ttm:title
  xml:id = ID
  xml:lang = string
  xml:space = (default|preserve)
  {any attribute not in default or any TT namespace ...}>
  Content: #PCDATA
</ttm:title>

Note:

No specific use of the ttm:title element is defined by this specification.

12.1.3 ttm:desc

The ttm:desc element is used to express a human-readable description of a specific element instance.

XML Representation – Element Information Item: ttm:desc
<ttm:desc
  xml:id = ID
  xml:lang = string
  xml:space = (default|preserve)
  {any attribute not in default or any TT namespace ...}>
  Content: #PCDATA
</ttm:desc>

Note:

No specific use of the ttm:desc element is defined by this specification.

12.1.4 ttm:copyright

The ttm:copyright element is used to express a human-readable copyright that applies to some scoping level.

A copyright statement that applies to a document as a whole should appear as a child of the head element.

Note:

No specific use of the ttm:copyright element is defined by this specification.

12.1.5 ttm:agent

The ttm:agent element is used to define an agent for the purpose of associating content information with an agent who is involved in the production or expression of that content.

The ttm:agent element accepts as its children zero or more ttm:name elements followed by zero or one ttm:actor element.

At least one ttm:name element child should be specified that expresses a name for the agent, whether it be the name of a person, character, group, or organization.

XML Representation – Element Information Item: ttm:agent
<ttm:agent
  type = (person|character|group|organization|other)
  xml:id = ID
  xml:lang = string
  xml:space = (default|preserve)
  {any attribute not in default or any TT namespace ...}>
  Content: ttm:name*, ttm:actor?
</ttm:agent>

A type attribute must be specified on each ttm:agent element, and, if specified, must have one of the following values:

  • person

  • character

  • group

  • organization

  • other

If the value of the type attribute is character, then the ttm:agent element instance should specify a ttm:actor child that specifies the agent that plays the role of the actor.

A ttm:agent metadata item is considered to be significant only when specified as a child of the head element or as a child of a metadata element child of the head element.

Note:

A ttm:agent element instance is typically referenced using a ttm:agent attribute on a content element.

Note:

If a character agent is played by multiple actors, then multiple character agents may be specified (and referenced) wherein different definitions of the character specify different actors.

12.1.6 ttm:name

The ttm:name element is used to specify a name of a person, character, group, or organization.

XML Representation – Element Information Item: ttm:name
<ttm:name
  type = (full|family|given|alias|other)
  xml:id = ID
  xml:lang = string
  xml:space = (default|preserve)
  {any attribute not in default or any TT namespace ...}>
  Content: #PCDATA
</ttm:name>

A type attribute must be specified on each ttm:name element, and, if specified, must have one of the following values:

  • full

  • family

  • given

  • alias

  • other

The relationship between the type of a name and the syntactic expression of the name is not defined by this specification.

12.1.7 ttm:actor

The ttm:actor element is used to link the definition of a (role-based) character agent with another agent that portrays the character.

XML Representation – Element Information Item: ttm:actor
<ttm:actor
  agent = IDREF
  xml:id = ID
  xml:lang = string
  xml:space = (default|preserve)
  {any attribute not in default or any TT namespace ...}>
  Content: EMPTY
</ttm:actor>

The agent attribute of a ttm:actor element must reference a ttm:agent element that denotes the person, group, or organization acting the part of a character.

12.2 Attribute Vocabulary

This section specifies the following attributes in the TT Metadata Namespace for use with the metadata element and with certain content elements:

Note:

Only certain metadata item attributes may be used with content elements. See the definitions of content elements to determine permissible usage.

12.2.1 ttm:agent

The ttm:agent attribute takes an IDREFS value, and is used with certain content elements to designate the agent that performs or is involved in the performance of the content.

If specified, a ttm:agent attribute must reference a ttm:agent element instance that appears as a descendent of the same document instance as that of the referring element.

12.2.2 ttm:role

The ttm:role attribute may be used by a content author to express a role, function, or characteristic of some content element that is so labeled.

If specified, the value of this attribute must adhere to the following syntax:

Syntax Representation – ttm:role
ttm:role
  : "action"
  | "caption"
  | "dialog"
  | "expletive"
  | "kinesic"
  | "lyrics"
  | "music"
  | "narration"
  | "quality"
  | "sound"
  | "source"
  | "suppressed"
  | "reproduction"
  | "thought"
  | "title"
  | "transcription"
  | extension-role
extension-role
  : "x-" token-char+
token-char
  : { XML NameChar }    // XML 1.1 Production [4a]

Note:

All values of ttm:role that do not start with the prefix x- are reserved for future standardization.

A Reduced XML Infoset

This appendix is normative.

For the purposes of this specification, a Reduced XML Infoset is an XML Information Set [XML InfoSet] that consists of only the following information items and information item properties:

A.1 Document Information Item

  • [document element]

A.2 Element Information Item

  • [namespace URI]

  • [local name]

  • [children]

  • [attributes]

Child information items [children] are reduced to only element and character information items.

A.3 Attribute Information Item

  • [namespace URI]

  • [local name]

  • [normalized value]

A.4 Character Information Item

  • [character code]

Contiguous character information items are not required to be represented distinctly, but may be aggregated (chunked) into a sequence of character codes (i.e., a character string).

B Dynamic Flow Processing Model

This appendix is normative.

This appendix specifies a dynamic flow processing model that is used to present content in a region whose tts:overflow property is assigned a value of scroll.

B.1 Introduction

This sub-section is non-normative.

Dynamic flow provides a mechanism by means of which content may be flowed through a presentation region over time where the rate of presentation is dynamically determined by a presentation processor based upon the region's extent, the textual content to be presented in the region, the formatting styles applied to this content, and a set of parameters that control in-flow and out-flow rates of content.

It is expected that this mechanism will be used by authors in a variety of circumstances in order to specify behavior that would otherwise be impossible or impractical to pre-compute at authoring time, since, for example, a region's absolute size or the font metrics used to present content may not be known at authoring time. In certain real-time streaming contexts, even the content is not known at authoring time, but is only known at time of streaming.

In describing dynamic flow, the flow process is logically divided into three types of flow operations:

  • fill into – causes new content to consume extent in the designated presentation region;

  • reflow within – causes content presently consuming extent to be moved, possibly entailing new line break positions, within its designated presentation region;

  • clear out – causes content presently consuming extent in the designated presentation region to no longer consume extent.

Each region subject to dynamic flow processing may be modeled in terms of:

  1. the region with a definite extent, into which content is to be flowed;

  2. a content buffer consisting of a sequence of content blocks, each of which consists of a sequence of content inlines (spans), where each block and inline has a computed style set, and where an inline has a (possibly empty) sequence of characters that express the textual content of the inline;

  3. two independent flow operation single-shot timers: a fill timer and a clear timer;

  4. a set of state parameters that includes:

    1. fill unit, as specified by the flowUnit argument of the in() flow function;

    2. fill style, as specified by the flowStyle argument of the in() flow function;

    3. fill transition, as specified by the flowTransition argument of the in() flow function;

    4. fill transition style, as specified by the flowTransitionStyle argument of the in() flow function;

    5. reflow unit, as specified by the flowUnit argument of the within() flow function;

    6. reflow style, as specified by the flowStyle argument of the within() flow function;

    7. reflow transition, as specified by the flowTransition argument of the within() flow function;

    8. reflow transition style, as specified by the flowTransitionStyle argument of the within() flow function;

    9. clear unit, as specified by the flowUnit argument of the out() flow function;

    10. clear style, as specified by the flowStyle argument of the out() flow function;

    11. clear transition, as specified by the flowTransition argument of the out() flow function;

    12. clear transition style, as specified by the flowTransitionStyle argument of the out() flow function;

    13. fill interval, as specified by the intra() flow interval function;

    14. clear interval, as specified by the inter() flow interval function;

    15. computed fill interval, as determined by the flow interval timing calculation below;

    16. computed clear interval, as determined by the flow interval timing calculation below;

Except for the computed fill and clear intervals, the flow interval state parameters enumerated above are static and specified at authoring time.

B.2 Flow Buffer

Each region which is assigned a tts:overflow property with the value scroll is associated with a flow buffer, whose implementation is not defined by this specification.

The content of a flow buffer is defined to be equivalent (in form) to the content of an fo:block-container element produced by 9.3.2 Synchronic Flow Processing, and represents content that is awaiting, but has not yet been flowed into (made visible in) the presentation region with which the flow buffer is associated.

The temporal content of a flow buffer is related to the performance of 9.3 Region Layout and Presentation as follows:

  1. At the time a dynamically flowed presentation region becomes temporally active, its flow buffer is reset to the empty state;

  2. If times Tk and Tk+1 are two immediately adjacent time coordinates at which synchronic region construction occurs, with Tk≤Tk+1, then compute the difference between the content produced for use in the region between time Tk and time Tk+1, characterizing the difference as one of the following:

    1. no difference present;

    2. difference present, but only before the logical content position that corresponds with the most logically prior content presently visible in the region;

    3. difference present, but only between the logical content positions that correspond with the most logically prior and subsequent content presently visible in the region;

    4. difference present, but only after the logical content position that corresponds with the most logically subsequent content presently visible in the region;

    5. difference present, but not limited to before, between, or after the positions that correspond with the most logically prior and subsequent content presently visible in the region;

  3. If any one of the conditions 2a, 2b, and 2c applies, then do not change the flow buffer.

  4. If condition 2d applies, then instantaneously replace the content of the flow buffer with the new content (in part or in whole) that corresponds with time Tk+1 such that the position of the content that corresponds with the start of the flow buffer does not change with respect to the corresponding position of the previous content.

  5. If condition 2e applies, then subdivide the new content that corresponds with time Tk+1 into two parts: (1) that part that wholly precedes the position that corresponds with the most logically subsequent content presently visible in the region, and (2) that part that corresponds with or wholly follows the position that corresponds with the most logically subsequent content presently visible in the region, then ignore the first part and process the second part in the same manner as if condition 2d had originally applied.

  6. If after performing the above steps the flow buffer is non-empty, then perform the following steps:

    1. If using automatic flow interval timing, then re-perform the process described in B.3 Flow Interval Timing Calculation.

    2. If the fill timer is not active, then restart the timer.

B.3 Flow Interval Timing Calculation

Flow interval timing is either statically specified at authoring time or is dependent upon the content of the flow buffer or the presentation region or both, in which case timing is recomputed dynamically upon changes to the content of the flow buffer or the presentation region or both.

B.3.1 Computed Fill Timing Interval

The computed fill timing interval is determined as follows:

  1. If the value of the fill interval parameter is a definite duration, then use this duration as the computed fill interval;

  2. otherwise, if the value of the fill interval parameter is a definite rate, then the computed fill interval is equal to the number of fill units currently available in the flow buffer divided by specified rate (in fill units per second);

  3. otherwise, if the value of the fill interval is auto, then the computed fill interval is equal to the difference between the time coordinate associated with the most temporally prior beginning point of an active duration of some content unit present in the flow buffer and the most temporally subsequent ending point of an active duration of some content unit present in the flow buffer divided by the number of fill units currently available in the flow buffer.

B.3.2 Computed Clear Timing Interval

The computed clear timing interval is determined as follows:

  1. If the value of the clear interval parameter is a definite duration, then use this duration as the computed clear interval;

  2. otherwise, if the value of the clear interval parameter is a definite rate, then the computed clear interval is equal to the number of clear units currently available in the presentation region divided by specified rate (in clear units per second);

  3. otherwise, if the value of the clear interval is auto, then the computed clear interval is equal to the difference between the time coordinate associated with the most temporally prior beginning point of an active duration of some content unit present in the presentation region and the most temporally subsequent ending point of an active duration of some content unit present in the presentation region divided by the number of clear units currently available in the presentation region.

B.4 Flow Operations

Flow operations perform the filling, reflowing, and clearing of formatted content into, withing, and from a presentation undergoing dynamic flow processing.

B.4.1 Fill Operation

A fill operation causes the following ordered steps to be performed:

  1. remove sufficient content from the beginning of the flow buffer to constitute a fill unit;

  2. format the content removed from the flow buffer in the previous step in order to create a sequence of glyph areas or a sequence of (full or partial measure) line areas each containing a sequence of glyph areas;

  3. append the sequence of areas produced in the previous step to the sequence of areas currently associated with the presentation region, where new glyph areas are appended to the current line area and new line areas are appended to the sequence of line areas;

  4. cause the newly appended areas to be made visible according to the fill style, fill transition, and fill transition style state parameters in force.

B.4.2 Reflow Operation

A reflow operation causes the following ordered steps to be performed:

  1. translate glyph areas or (full or partial measure) line areas that correspond with a reflow unit of formatted content that follows (in inline or block progression dimension order) the space cleared by the immediately preceding clear operation to a new position such that the glyph area that corresponds to the most logically prior content is aligned with the before and start edges of the presentation region, and where the translation adheres to the reflow style, reflow transition, and reflow transition style state parameters in force.

B.4.3 Clear Operation

A clear operation causes the following ordered steps to be performed:

  1. remove glyph areas or (full or partial measure) line areas that correspond with a clear unit of formatted content from the starting edge or the before edge of the presentation region in inline or block progression direction, respectively, applying the clear style, clear transition, and clear transition style state parameters in force.

B.5 Flow Timers

Flow timers control the filling and clearing of formatted content from a presentation undergoing dynamic flow processing.

Note:

The semantics of flow timer initiated processing expressed below reflects the intent that clear and reflow operations or clear, reflow, and flow operations are performed simultaneously if the (logically, but not necesesarily temporally) prior operation would create sufficient space in the presentation region to accept the subsequent unit of formatted content.

B.5.1 Fill Timer

The fill timer is used to pace the addition of formatted content to the presentation region undergoing dynamic flow processing.

Each time the fill timer expires, the following ordered steps are performed:

  1. If the fill buffer is non-empty and contains sufficient content to compose a fill unit and if sufficient space is present in the presentation region to accept a unit of formatted content that corresponds to a fill unit, then perform the processing described in B.4.1 Fill Operation, where, if the fill timer was expired or simulated as a result of performing a prior reflow operation, this operation commences at the same time as the reflow operation;

  2. If the fill buffer is non-empty, then reset the fill timer to the current value of the computed fill interval;

  3. If the presentation region is non-empty and if the clear timer is not active, then reset the clear timer to the current value of the computed clear interval.

B.5.2 Clear Timer

The clear timer is used to pace the removal of formatted content from the presentation region undergoing dynamic flow processing.

  1. If the presentation region is non-empty and contains sufficient formatted content to compose a clear unit, then perform the processing described in B.4.3 Clear Operation;

  2. If the space created by performing the clear operation indicated by the above step would be sufficient to accept a unit of formatted content that corresponds to a reflow unit and if sufficient formatted content remains after this point in the presentation region, then perform the processing described in B.4.2 Reflow Operation, where this operation commences at the same time as the clear operation;

  3. If a reflow operation would be performed as indicated by the above step and if the space created by performing this reflow operation would be sufficient to accept a unit of formatted content that corresponds to a fill unit and if the fill buffer is non-empty, then, if active, cause the fill timer to immediately expire or, if not active, simulate fill timer expiration, such that the expiration permits a fill operation to commence simultaneously with the reflow operation;

  4. If the previous step did not cause the fill timer to expire and if the presentation region is non-empty, then reset the clear timer to the current value of the computed clear interval.

C Schemas

This appendix is normative.

This appendix specifies the following schemas for use with DFXP document instances:

In any case where a schema specified by this appendix differs from the normative definitions of document type, element type, or attribute type as defined by the body of this specification, then the body of this specification takes precedence.

C.1 Relax NG Schema

This section specifies a Relax NG Compact Syntax (RNC) [RELAX NG] based schema for DFXP, also available in a ZIP Archive.

C.1.1 Driver

# .......................................................................
# TT-AF 1.0 Distribution Format Exchange Profile (DFXP) Schema ..........
# .......................................................................
# default namespace
default namespace tt = "http://www.w3.org/2006/10/ttaf1"
# generic tt modules
include "ttaf1-dfxp-datatypes.rnc"
include "ttaf1-dfxp-classes.rnc"
include "ttaf1-dfxp-core-attribs.rnc"
include "ttaf1-dfxp-parameter-attribs.rnc"
include "ttaf1-dfxp-metadata-attribs.rnc"
include "ttaf1-dfxp-styling-attribs.rnc"
include "ttaf1-dfxp-timing-attribs.rnc"
include "ttaf1-dfxp-metadata.rnc"
include "ttaf1-dfxp-metadata-items.rnc"
include "ttaf1-dfxp-styling.rnc"
include "ttaf1-dfxp-animation.rnc"
include "ttaf1-dfxp-layout.rnc"
include "ttaf1-dfxp-content.rnc"
include "ttaf1-dfxp-head.rnc"
include "ttaf1-dfxp-document.rnc"
start = TTAF.tt
# .......................................................................
# .......................................................................
# .......................................................................

C.1.2 Modules

C.1.2.1 Animation Module
# .......................................................................
# TT-AF 1.0 DFXP Animation Module .......................................
# .......................................................................
# set - discrete animation
TTAF.set =
  element set {
    TTAF.set.attlist,
    TTAF.set.content
  }
TTAF.set.attlist &=
  TTAF.Core.attrib.class,
  TTAF.Timed.attrib.class,
  (TTAF.Styling.attrib.class |
   TTAF.Styling.ForeignExtension.attrib+ )
TTAF.set.content.extra = empty
TTAF.set.content =
  (TTAF.Metadata.class*,
   TTAF.set.content.extra*)
TTAF.Animation.extra = empty
TTAF.Animation.class |=
  TTAF.set |
  TTAF.Animation.extra
# .......................................................................
# .......................................................................
# .......................................................................
C.1.2.2 Classes Module
# .......................................................................
# TT-AF 1.0 DFXP Class Declarations Module ..............................
# .......................................................................
# attribute group classes
TTAF.Core.attrib.class = empty
TTAF.Metadata.attrib.class = empty
TTAF.Parameter.attrib.class = empty
TTAF.RegionBinding.attrib.class = empty
TTAF.StyleBinding.attrib.class = empty
TTAF.Styled.attrib.class = empty
TTAF.Styling.attrib.class = empty
TTAF.Timed.attrib.class = empty
TTAF.TimedContainer.attrib.class = empty
TTAF.TimingInterval.attrib.class = empty
# element group classes
TTAF.Animation.class = empty
TTAF.Block.class = empty
TTAF.BlockNoDiv.class = empty
TTAF.Inline.class = empty
TTAF.InlineNoSpan.class = empty
TTAF.MetadataNoAgent.class = empty
TTAF.Metadata.class = empty
TTAF.MetadataItems.class = empty
# .......................................................................
# .......................................................................
# .......................................................................
C.1.2.3 Content Module
# .......................................................................
# TT-AF 1.0 DFXP Content Module .........................................
# .......................................................................
# body - content body
TTAF.body =
  element body {
    TTAF.body.attlist,
    TTAF.body.content
  }
TTAF.body.attlist &=
  TTAF.Core.attrib.class,
  TTAF.Metadata.attrib.class,
  TTAF.RegionBinding.attrib.class,
  TTAF.Styled.attrib.class,
  TTAF.TimedContainer.attrib.class
TTAF.body.content.extra = empty
TTAF.body.content =
  (TTAF.Metadata.class*,
   TTAF.Animation.class*,
   (TTAF.Block.class | TTAF.body.content.extra)*)
# div - division
TTAF.div =
  element div {
    TTAF.div.attlist,
    TTAF.div.content
  }
TTAF.div.attlist &=
  TTAF.Core.attrib.class,
  TTAF.Metadata.attrib.class,
  TTAF.RegionBinding.attrib.class,
  TTAF.Styled.attrib.class,
  TTAF.TimedContainer.attrib.class
TTAF.div.content.extra = empty
TTAF.div.content =
  (TTAF.Metadata.class*,
   TTAF.Animation.class*,
   (TTAF.Block.class | TTAF.div.content.extra)*)
# p - paragraph
TTAF.p =
  element p {
    TTAF.p.attlist,
    TTAF.p.content
  }
TTAF.p.attlist &=
  TTAF.Core.attrib.class,
  TTAF.Metadata.attrib.class,
  TTAF.RegionBinding.attrib.class,
  TTAF.Styled.attrib.class,
  TTAF.TimedContainer.attrib.class
TTAF.p.content.extra = empty
TTAF.p.content =
  (TTAF.Metadata.class*,
   TTAF.Animation.class*,
   (TTAF.Inline.class |
    TTAF.p.content.extra)*)
# span - intra-paragraph inline span
TTAF.span =
  element span {
    TTAF.span.attlist,
    TTAF.span.content
  }
TTAF.span.attlist &=
  TTAF.Core.attrib.class,
  TTAF.Metadata.attrib.class,
  TTAF.RegionBinding.attrib.class,
  TTAF.Styled.attrib.class,
  TTAF.TimedContainer.attrib.class
TTAF.span.content.extra = empty
TTAF.span.content =
  (TTAF.Metadata.class*,
   TTAF.Animation.class*,
   (TTAF.Inline.class |
    TTAF.span.content.extra)*)
# br - manual line break
TTAF.br =
  element br {
    TTAF.br.attlist,
    TTAF.br.content
  }
TTAF.br.attlist &=
  TTAF.Core.attrib.class,
  TTAF.Metadata.attrib.class,
  TTAF.Styled.attrib.class
TTAF.br.content.extra = empty
TTAF.br.content =
  (TTAF.Metadata.class*,
   TTAF.Animation.class*,
   TTAF.br.content.extra*)
# Block.class
TTAF.Block.extra = empty
TTAF.BlockNoDiv.class |=
  TTAF.p | TTAF.Block.extra
TTAF.Block.class |=
  TTAF.div | TTAF.BlockNoDiv.class
# Inline.class
TTAF.Inline.extra = empty
TTAF.InlineNoSpan.class |=
  text | TTAF.br | TTAF.Inline.extra
TTAF.Inline.class |=
  TTAF.span | TTAF.InlineNoSpan.class
# .......................................................................
# .......................................................................
# .......................................................................
C.1.2.4 Core Attributes Module
# .......................................................................
# TT-AF 1.0 DFXP Core Attributes Module .................................
# .......................................................................
TTAF.id.attrib
  = attribute xml:id { xsd:ID }?
TTAF.lang.attrib
  = attribute xml:lang { TTAF.LanguageCode.datatype }?
TTAF.lang.required.attrib
  = attribute xml:lang { TTAF.LanguageCode.datatype }
TTAF.space.attrib
  = attribute xml:space { TTAF.XMLSpace.datatype }?
TTAF.Core.extra.attrib
  = empty
TTAF.Core.attrib.class &=
  TTAF.id.attrib,
  TTAF.lang.attrib,
  TTAF.space.attrib,
  TTAF.Core.extra.attrib
TTAF.Core.required.attrib.class &=
  TTAF.id.attrib,
  TTAF.lang.required.attrib,
  TTAF.space.attrib,
  TTAF.Core.extra.attrib
# .......................................................................
# .......................................................................
# .......................................................................
C.1.2.5 Data Types Module
# .......................................................................
# TT-AF 1.0 DFXP Datatypes Module .......................................
# .......................................................................
TTAF.Alpha.datatype =
  xsd:float { minInclusive = "0" maxInclusive = "1" }
TTAF.Agent.datatype =
  xsd:IDREFS
TTAF.CellResolution.datatype =
  string
TTAF.ClockMode.datatype =
  "local" |
  "gps" |
  "utc"
TTAF.Color.datatype =
  string
TTAF.Direction.datatype =
  "ltr" |
  "rtl" |
  "inherit"
TTAF.Display.datatype =
  "auto" |
  "none" |
  "inherit"
TTAF.DisplayAlign.datatype =
  "before" |
  "center" |
  "after" |
  "inherit"
TTAF.DynamicFlow.datatype =
  string
TTAF.Extent.datatype =
  string
TTAF.FontFamily.datatype =
  string
TTAF.FontSize.datatype =
  string
TTAF.FontStyle.datatype =
  "normal" |
  "italic" |
  "oblique" |
  "reverseOblique" |
  "inherit"
TTAF.FontWeight.datatype =
  "normal" |
  "bold" |
  "inherit"
TTAF.FrameRate.datatype =
  xsd:nonNegativeInteger
TTAF.FrameRateMultiplier.datatype =
  xsd:string { pattern = "\p{Nd}+(\s*:\s*\p{Nd}+)?" }
TTAF.LanguageCode.datatype =
  xsd:NMTOKEN
TTAF.LineHeight.datatype =
  string
TTAF.MarkerMode.datatype =
  "continuous" |
  "discontinuous"
TTAF.MetadataAgentType.datatype =
  "person" |
  "character" |
  "group" |
  "organization" |
  "other"
TTAF.MetadataNameType.datatype =
  "full" |
  "family" |
  "given" |
  "alias" |
  "other"
TTAF.MetadataRoleBaseType.datatype =
  "action" |
  "caption" |
  "dialog" |
  "expletive" |
  "kinesic" |
  "lyrics" |
  "music" |
  "narration" |
  "quality" |
  "sound" |
  "source" |
  "suppressed" |
  "reproduction" |
  "thought" |
  "title" |
  "transcription"
TTAF.Opacity.datatype =
  string
TTAF.Origin.datatype =
  string
TTAF.Overflow.datatype =
  "visible" |
  "hidden" |
  "scroll" |
  "inherit"
TTAF.Padding.datatype =
  string
TTAF.PixelAspectRatio.datatype =
  xsd:string { pattern = "\p{Nd}+\s*:\s*\p{Nd}+" }
TTAF.Profile.datatype =
  TTAF.URI.datatype
TTAF.Role.datatype =
  xsd:NMTOKEN
TTAF.ShowBackground.datatype =
  "always" |
  "whenActive" |
  "inherit"
TTAF.SMPTEMode.datatype =
  "dropNTSC" |
  "dropPAL" |
  "nonDrop"
TTAF.SubFrameRate.datatype =
  xsd:positiveInteger
TTAF.TextAlign.datatype =
  "left" |
  "center" |
  "right" |
  "start" |
  "end" |
  "inherit"
TTAF.TextDecoration.datatype =
  "none" |
  "underline" |
  "noUnderline" |
  "overline" |
  "noOverline" |
  "lineThrough" |
  "noLineThrough" |
  "inherit"
TTAF.TextOutline.datatype =
  string
TTAF.TickRate.datatype =
  xsd:positiveInteger
TTAF.TimeBase.datatype =
  "media" |
  "smpte" |
  "clock"
TTAF.TimeContainer.datatype =
  "par" |
  "seq"
TTAF.TimeCoordinate.datatype =
  string
TTAF.TimeDuration.datatype =
  string
TTAF.URI.datatype =
  xsd:anyURI
TTAF.UnicodeBidi.datatype =
  "normal" |
  "embed" |
  "bidiOverride" |
  "inherit"
TTAF.Visibility.datatype =
  "hidden" |
  "visible" |
  "inherit"
TTAF.WrapOption.datatype =
  "wrap" |
  "noWrap" |
  "inherit"
TTAF.WritingMode.datatype =
  "lrtb" |
  "rltb" |
  "tbrl" |
  "tblr" |
  "lr" |
  "rl" |
  "tb" |
  "inherit"
TTAF.XMLSpace.datatype =
  "default" |
  "preserve"
TTAF.ZIndex.datatype =
  string
  
# .......................................................................
# .......................................................................
# .......................................................................
C.1.2.6 Document Module
# .......................................................................
# TT-AF 1.0 DFXP Document Module ........................................
# .......................................................................
## tt - generic top-level document element type
TTAF.tt =
  element tt {
    TTAF.tt.attlist,
    TTAF.tt.content
  }
TTAF.tt.attlist &=
  TTAF.Core.required.attrib.class,
  TTAF.Parameter.attrib.class
TTAF.tt.content =
  (TTAF.head?, TTAF.body?)
# .......................................................................
# .......................................................................
# .......................................................................
C.1.2.7 Header Module
# .......................................................................
# TT-AF 1.0 DFXP Header Module ..........................................
# .......................................................................
# head - generic header
TTAF.head =
  element head {
    TTAF.head.attlist,
    TTAF.head.content
  }
TTAF.head.attlist &=
  TTAF.Core.attrib.class
TTAF.head.content.extra = empty
TTAF.head.content =
  (TTAF.Metadata.class*,
   TTAF.styling?,
   TTAF.layout?,
   TTAF.head.content.extra*)
# .......................................................................
# .......................................................................
# .......................................................................
C.1.2.8 Layout Module
# .......................................................................
# TT-AF 1.0 DFXP Layout Module ..........................................
# .......................................................................
# region reference attribute; must reference /head/layout/region
TTAF.region.attrib
  = attribute region { xsd:IDREF }?
# region binding attribute class
TTAF.RegionBinding.attrib.class &=
  TTAF.region.attrib
# layout - generic layout container
TTAF.layout =
  element layout {
    TTAF.layout.attlist,
    TTAF.layout.content
  }
TTAF.layout.attlist &=
  TTAF.Core.attrib.class
TTAF.layout.content.extra = empty
TTAF.layout.content =
  (TTAF.Metadata.class*,
   TTAF.layout.region*,
   TTAF.layout.content.extra*)
# region - region declaration
TTAF.layout.region =
  element region {
    TTAF.layout.region.attlist,
    TTAF.layout.region.content
  }
TTAF.layout.region.attlist &=
  TTAF.Core.attrib.class,
  TTAF.TimedContainer.attrib.class,
  TTAF.style.attrib,
  (TTAF.Styling.attrib.class |
   TTAF.Styling.ForeignExtension.attrib+ )
TTAF.layout.region.content.extra = empty
TTAF.layout.region.content =
  (TTAF.Metadata.class*,
   TTAF.Animation.class*,
   TTAF.styling.style*,
   TTAF.layout.region.content.extra*)
# .......................................................................
# .......................................................................
# .......................................................................
C.1.2.9 Metadata Module
# .......................................................................
# TT-AF 1.0 DFXP Metadata Module ........................................
# .......................................................................
# namespace prefix bindings
namespace tt = "http://www.w3.org/2006/10/ttaf1"
namespace local = ""
# meta - generic metadata
TTAF.metadata =
  element metadata {
    TTAF.metadata.attlist,
    TTAF.metadata.content
  }
TTAF.metadata.attlist &=
  TTAF.Core.attrib.class
TTAF.External.class =
  element * - tt:* {
    ( attribute * - ( xml:* | local:* ) { text }
      | text
      | TTAF.External.class
    )*
  }
TTAF.metadata.content.extra = empty
TTAF.metadata.content =
  (TTAF.External.class |
   TTAF.metadata.content.extra)*
TTAF.MetadataNoAgent.class |=
  TTAF.MetadataItems.class |
  TTAF.metadata
TTAF.Metadata.class |=
  TTAF.MetadataNoAgent.class |
  TTAF.meta.agent
# .......................................................................
# .......................................................................
# .......................................................................
C.1.2.10 Metadata Items Module
# .......................................................................
# TT-AF 1.0 DFXP Metadata Items Module ......................................
# .......................................................................
namespace ttm = "http://www.w3.org/2006/10/ttaf1#metadata"
namespace ttmx = "http://www.w3.org/2006/10/ttaf1#metadata-extension"
## actor - specifies actor
TTAF.meta.actor =
  element ttm:actor {
    TTAF.meta.actor.attlist,
    TTAF.meta.actor.content
  }
TTAF.meta.actor.attlist &=
  TTAF.Core.attrib.class,
  attribute agent { xsd:IDREF }
TTAF.meta.actor.content.extra = empty
TTAF.meta.actor.content = empty
## agent - specifies agent
TTAF.meta.agent =
  element ttm:agent {
    TTAF.meta.agent.attlist,
    TTAF.meta.agent.content
  }
TTAF.meta.agent.attlist &=
  TTAF.Core.attrib.class,
  attribute type { TTAF.MetadataAgentType.datatype }
TTAF.meta.agent.content.extra = empty
TTAF.meta.agent.content =
  (TTAF.meta.name*,
   TTAF.meta.actor?,
   TTAF.meta.agent.content.extra*)
## copyright - specifies copyright statement
TTAF.meta.copyright =
  element ttm:copyright {
    TTAF.meta.copyright.attlist,
    TTAF.meta.copyright.content
  }
TTAF.meta.copyright.attlist &=
  TTAF.Core.attrib.class
TTAF.meta.copyright.content.extra = empty
TTAF.meta.copyright.content = text
## desc - specifies description
TTAF.meta.desc =
  element ttm:desc {
    TTAF.meta.desc.attlist,
    TTAF.meta.desc.content
  }
TTAF.meta.desc.attlist &=
  TTAF.Core.attrib.class
TTAF.meta.desc.content.extra = empty
TTAF.meta.desc.content = text
## name - specifies name
TTAF.meta.name =
  element ttm:name {
    TTAF.meta.name.attlist,
    TTAF.meta.name.content
  }
TTAF.meta.name.attlist &=
  TTAF.Core.attrib.class,
  attribute type { TTAF.MetadataNameType.datatype }
TTAF.meta.name.content.extra = empty
TTAF.meta.name.content = text
## title - describes title
TTAF.meta.title =
  element ttm:title {
    TTAF.meta.title.attlist,
    TTAF.meta.title.content
  }
TTAF.meta.title.attlist &=
  TTAF.Core.attrib.class
TTAF.meta.title.content.extra = empty
TTAF.meta.title.content = text
## MetadataItems.class
TTAF.MetadataItems.extra = empty
TTAF.MetadataItems.class |=
  TTAF.meta.title |
  TTAF.meta.desc |
  TTAF.meta.copyright |
  TTAF.MetadataItems.extra
# .......................................................................
# .......................................................................
# .......................................................................
C.1.2.11 Metadata Attributes Module
# .......................................................................
# TT-AF 1.0 DFXP Metadata Attributes Module ..............................
# .......................................................................
namespace tt = "http://www.w3.org/2006/10/ttaf1"
namespace ttm = "http://www.w3.org/2006/10/ttaf1#metadata"
namespace ttmx = "http://www.w3.org/2006/10/ttaf1#metadata-extension"
namespace local = ""
# Standard Metadata Attributes
TTAF.agent.attrib
  = attribute ttm:agent { TTAF.Agent.datatype }?
TTAF.role.attrib
  = attribute ttm:role { TTAF.Role.datatype }?
# Extension Metadata Attributes
TTAF.Metadata.Extension.attrib =
  attribute ttmx:* { text }
# Metadata Attribute Class
TTAF.Metadata.attrib.class &=
  TTAF.agent.attrib,
  TTAF.role.attrib
# .......................................................................
# .......................................................................
# .......................................................................
C.1.2.12 Parameter Attributes Module
# .......................................................................
# TT-AF 1.0 DFXP Parameter Attributes Module ............................
# .......................................................................
namespace ttp = "http://www.w3.org/2006/10/ttaf1#parameter"
# Standard Metadata Attributes
TTAF.cellResolution.attrib
  = attribute ttp:cellResolution { TTAF.CellResolution.datatype }?
TTAF.clockMode.attrib
  = attribute ttp:clockMode { TTAF.ClockMode.datatype }?
TTAF.frameRate.attrib
  = attribute ttp:frameRate { TTAF.FrameRate.datatype }?
TTAF.frameRateMultiplier.attrib
  = attribute ttp:frameRateMultiplier { TTAF.FrameRateMultiplier.datatype }?
TTAF.markerMode.attrib
  = attribute ttp:markerMode { TTAF.MarkerMode.datatype }?
TTAF.profile.attrib
  = attribute ttp:profile { TTAF.Profile.datatype }?
TTAF.pixelAspectRatio.attrib
  = attribute ttp:pixelAspectRatio { TTAF.PixelAspectRatio.datatype }?
TTAF.smpteMode.attrib
  = attribute ttp:smpteMode { TTAF.SMPTEMode.datatype }?
TTAF.subFrameRate.attrib
  = attribute ttp:subFrameRate { TTAF.SubFrameRate.datatype }?
TTAF.tickRate.attrib
  = attribute ttp:tickRate { TTAF.TickRate.datatype }?
TTAF.timeBase.attrib
  = attribute ttp:timeBase { TTAF.TimeBase.datatype }?
# Parameter Attribute Class
TTAF.Parameter.attrib.class &=
  TTAF.cellResolution.attrib,
  TTAF.clockMode.attrib,
  TTAF.frameRate.attrib,
  TTAF.frameRateMultiplier.attrib,
  TTAF.markerMode.attrib,
  TTAF.pixelAspectRatio.attrib,
  TTAF.profile.attrib,
  TTAF.smpteMode.attrib,
  TTAF.subFrameRate.attrib,
  TTAF.tickRate.attrib,
  TTAF.timeBase.attrib
# .......................................................................
# .......................................................................
# .......................................................................
C.1.2.13 Styling Attributes Module
# .......................................................................
# TT-AF 1.0 DFXP Styling Attributes Module ..............................
# .......................................................................
namespace tt = "http://www.w3.org/2006/10/ttaf1"
namespace tts = "http://www.w3.org/2006/10/ttaf1#style"
namespace ttsx = "http://www.w3.org/2006/10/ttaf1#style-extension"
namespace local = ""
# Standard Style Attributes
TTAF.backgroundColor.attrib
  = attribute tts:backgroundColor { TTAF.Color.datatype }?
TTAF.color.attrib
  = attribute tts:color { TTAF.Color.datatype }?
TTAF.direction.attrib
  = attribute tts:direction { TTAF.Direction.datatype }?
TTAF.display.attrib
  = attribute tts:display { TTAF.Display.datatype }?
TTAF.displayAlign.attrib
  = attribute tts:displayAlign { TTAF.DisplayAlign.datatype }?
TTAF.dynamicFlow.attrib
  = attribute tts:dynamicFlow { TTAF.DynamicFlow.datatype }?
TTAF.extent.attrib
  = attribute tts:extent { TTAF.Extent.datatype }?
TTAF.fontFamily.attrib
  = attribute tts:fontFamily { TTAF.FontFamily.datatype }?
TTAF.fontSize.attrib
  = attribute tts:fontSize { TTAF.FontSize.datatype }?
TTAF.fontStyle.attrib
  = attribute tts:fontStyle { TTAF.FontStyle.datatype }?
TTAF.fontWeight.attrib
  = attribute tts:fontWeight { TTAF.FontWeight.datatype }?
TTAF.lineHeight.attrib
  = attribute tts:lineHeight { TTAF.LineHeight.datatype }?
TTAF.opacity.attrib
  = attribute tts:opacity { TTAF.Opacity.datatype }?
TTAF.origin.attrib
  = attribute tts:origin { TTAF.Origin.datatype }?
TTAF.overflow.attrib
  = attribute tts:overflow { TTAF.Overflow.datatype }?
TTAF.padding.attrib
  = attribute tts:padding { TTAF.Padding.datatype }?
TTAF.showBackground.attrib
  = attribute tts:showBackground { TTAF.ShowBackground.datatype }?
TTAF.textAlign.attrib
  = attribute tts:textAlign { TTAF.TextAlign.datatype }?
TTAF.textDecoration.attrib
  = attribute tts:textDecoration { TTAF.TextDecoration.datatype }?
TTAF.textOutline.attrib
  = attribute tts:textOutline { TTAF.TextOutline.datatype }?
TTAF.unicodeBidi.attrib
  = attribute tts:unicodeBidi { TTAF.UnicodeBidi.datatype }?
TTAF.visibility.attrib
  = attribute tts:visibility { TTAF.Visibility.datatype }?
TTAF.wrapOption.attrib
  = attribute tts:wrapOption { TTAF.WrapOption.datatype }?
TTAF.writingMode.attrib
  = attribute tts:writingMode { TTAF.WritingMode.datatype }?
TTAF.zIndex.attrib
  = attribute tts:zIndex { TTAF.ZIndex.datatype }?
# Extension Style Attributes
TTAF.Styling.Extension.attrib =
  attribute ttsx:* { text }
TTAF.Styling.ForeignExtension.attrib =
  attribute * - ( tt:* | tts:* | ttsx:* | xml:* | local:* ) { text }
# Styling Attribute Class
TTAF.Styling.attrib.class &=
  TTAF.backgroundColor.attrib,
  TTAF.color.attrib,
  TTAF.display.attrib,
  TTAF.displayAlign.attrib,
  TTAF.dynamicFlow.attrib,
  TTAF.extent.attrib,
  TTAF.fontFamily.attrib,
  TTAF.fontSize.attrib,
  TTAF.fontStyle.attrib,
  TTAF.fontWeight.attrib,
  TTAF.lineHeight.attrib,
  TTAF.opacity.attrib,
  TTAF.origin.attrib,
  TTAF.overflow.attrib,
  TTAF.padding.attrib,
  TTAF.showBackground.attrib,
  TTAF.textAlign.attrib,
  TTAF.textDecoration.attrib,
  TTAF.textOutline.attrib,
  TTAF.visibility.attrib,
  TTAF.wrapOption.attrib,
  TTAF.writingMode.attrib,
  TTAF.zIndex.attrib
# Style Binding Attribute Class
TTAF.StyleBinding.attrib.class &=
  TTAF.style.attrib
# Styled Content Attribute Class
TTAF.Styled.extra.attrib = empty
TTAF.Styled.attrib.class &=
  TTAF.Styling.attrib.class,
  TTAF.StyleBinding.attrib.class,
  TTAF.Styled.extra.attrib
# .......................................................................
# .......................................................................
# .......................................................................
C.1.2.14 Styling Module
# .......................................................................
# TT-AF 1.0 DFXP Styling Module .........................................
# .......................................................................
# style reference attribute; must reference /tt/head/styling/style
TTAF.style.attrib
  = attribute style { xsd:IDREFS }?
# styling - generic styling container
TTAF.styling =
  element styling {
    TTAF.styling.attlist,
    TTAF.styling.content
  }
TTAF.styling.attlist &=
  TTAF.Core.attrib.class
TTAF.styling.content.extra = empty
TTAF.styling.content =
  (TTAF.Metadata.class*,
   TTAF.styling.defs.class*,
   TTAF.styling.content.extra*)
# style - style declaration
TTAF.styling.style =
  element style {
    TTAF.styling.style.attlist,
    TTAF.styling.style.content
  }
TTAF.styling.style.attlist =
  TTAF.Core.attrib.class,
  TTAF.style.attrib,
  (TTAF.Styling.attrib.class |
   TTAF.Styling.ForeignExtension.attrib+ )
TTAF.styling.style.content.extra = empty
TTAF.styling.style.content =
  (TTAF.Metadata.class*,
   (TTAF.styling.style.content.extra)*)
# style definitions class
TTAF.styling.defs.extra = empty
TTAF.styling.defs.class = 
  TTAF.styling.style
  | TTAF.styling.defs.extra
# .......................................................................
# .......................................................................
# .......................................................................
C.1.2.15 Timing Attributes Module
# .......................................................................
# TT-AF 1.0 DFXP Timing Attributes Module ...............................
# .......................................................................
# Timing Attributes
TTAF.timing.begin.attrib
  = attribute begin { TTAF.TimeCoordinate.datatype }?
TTAF.timing.dur.attrib
  = attribute dur { TTAF.TimeDuration.datatype }?
TTAF.timing.end.attrib
  = attribute end { TTAF.TimeCoordinate.datatype }?
TTAF.timing.timeContainer.attrib
  = attribute timeContainer { TTAF.TimeContainer.datatype }?
# Timing Interval Attribute class
TTAF.TimingInterval.extra.attrib = empty
TTAF.TimingInterval.attrib.class &=
  TTAF.timing.begin.attrib,
  TTAF.timing.dur.attrib,
  TTAF.timing.end.attrib,
  TTAF.TimingInterval.extra.attrib
# Timing Container Attribute class
TTAF.TimingContainer.extra.attrib = empty
TTAF.TimingContainer.attrib.class &=
  TTAF.timing.timeContainer.attrib,
  TTAF.TimingContainer.extra.attrib
# Timed Content Attribute Class
TTAF.Timed.extra.attrib = empty
TTAF.Timed.attrib.class &=
  TTAF.TimingInterval.attrib.class,
  TTAF.Timed.extra.attrib
# Timed Content Container Attribute Class
TTAF.TimedContainer.extra.attrib = empty
TTAF.TimedContainer.attrib.class &=
  TTAF.Timed.attrib.class,
  TTAF.TimingContainer.attrib.class,
  TTAF.TimedContainer.extra.attrib
# .......................................................................
# .......................................................................
# .......................................................................

C.2 XML Schema Definition (XSD) Schema

This section specifies a W3C XML Schema Definition (XSD) [XML Schema Part 1] based schema for DFXP, also available in a ZIP Archive.

C.2.1 Driver

<xs:schema targetNamespace="http://www.w3.org/2006/10/ttaf1" xml:lang="en"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:tt="http://www.w3.org/2006/10/ttaf1">
  <xs:include schemaLocation="ttaf1-dfxp-document.xsd"/>
</xs:schema>

C.2.2 Modules

C.2.2.1 Animation Module
<xs:schema targetNamespace="http://www.w3.org/2006/10/ttaf1" xml:lang="en"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:tt="http://www.w3.org/2006/10/ttaf1"
  xmlns:ttm="http://www.w3.org/2006/10/ttaf1#metadata"
  xmlns:tts="http://www.w3.org/2006/10/ttaf1#style">
  <xs:include schemaLocation="ttaf1-dfxp-core-attribs.xsd"/>
  <xs:include schemaLocation="ttaf1-dfxp-timing-attribs.xsd"/>
  <xs:include schemaLocation="ttaf1-dfxp-metadata.xsd"/>
  <xs:import namespace="http://www.w3.org/2006/10/ttaf1#style"
    schemaLocation="ttaf1-dfxp-styling-attribs.xsd"/>
  <xs:attributeGroup name="set.attlist">
    <xs:attributeGroup ref="tt:Core.attrib.class" />
    <xs:attributeGroup ref="tt:Timed.attrib.class" />
    <xs:attributeGroup ref="tts:Styling.attrib.class" />
  </xs:attributeGroup>
  <xs:complexType name="set.eltype">
    <xs:sequence>
      <xs:group ref="tt:Metadata.class" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attributeGroup ref="tt:set.attlist"/>
  </xs:complexType>
  <xs:element name="set" type="tt:set.eltype"/>
  <xs:group name="Animation.class">
    <xs:choice>
      <xs:element ref="tt:set"/>
    </xs:choice>
  </xs:group>
</xs:schema>
C.2.2.2 Content Module
<xs:schema targetNamespace="http://www.w3.org/2006/10/ttaf1" xml:lang="en"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:tt="http://www.w3.org/2006/10/ttaf1"
  xmlns:ttm="http://www.w3.org/2006/10/ttaf1#metadata"
  xmlns:tts="http://www.w3.org/2006/10/ttaf1#style">
  <xs:include schemaLocation="ttaf1-dfxp-core-attribs.xsd"/>
  <xs:include schemaLocation="ttaf1-dfxp-timing-attribs.xsd"/>
  <xs:include schemaLocation="ttaf1-dfxp-metadata.xsd"/>
  <xs:include schemaLocation="ttaf1-dfxp-animation.xsd"/>
  <xs:include schemaLocation="ttaf1-dfxp-layout.xsd"/>
  <xs:include schemaLocation="ttaf1-dfxp-styling.xsd"/>
  <xs:import namespace="http://www.w3.org/2006/10/ttaf1#metadata"
    schemaLocation="ttaf1-dfxp-metadata-attribs.xsd"/>
  <xs:attributeGroup name="body.attlist">
    <xs:attributeGroup ref="tt:Core.attrib.class"/>
    <xs:attributeGroup ref="tt:TimedContainer.attrib.class"/>
    <xs:attributeGroup ref="tt:RegionBinding.attrib.class"/>
    <xs:attributeGroup ref="tt:Styled.attrib.class"/>
    <xs:attributeGroup ref="ttm:Metadata.attrib.class"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="div.attlist">
    <xs:attributeGroup ref="tt:Core.attrib.class"/>
    <xs:attributeGroup ref="tt:TimedContainer.attrib.class"/>
    <xs:attributeGroup ref="tt:RegionBinding.attrib.class"/>
    <xs:attributeGroup ref="tt:Styled.attrib.class"/>
    <xs:attributeGroup ref="ttm:Metadata.attrib.class"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="p.attlist">
    <xs:attributeGroup ref="tt:Core.attrib.class"/>
    <xs:attributeGroup ref="tt:TimedContainer.attrib.class"/>
    <xs:attributeGroup ref="tt:RegionBinding.attrib.class"/>
    <xs:attributeGroup ref="tt:Styled.attrib.class"/>
    <xs:attributeGroup ref="ttm:Metadata.attrib.class"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="span.attlist">
    <xs:attributeGroup ref="tt:Core.attrib.class"/>
    <xs:attributeGroup ref="tt:TimedContainer.attrib.class"/>
    <xs:attributeGroup ref="tt:RegionBinding.attrib.class"/>
    <xs:attributeGroup ref="tt:Styled.attrib.class"/>
    <xs:attributeGroup ref="ttm:Metadata.attrib.class"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="br.attlist">
    <xs:attributeGroup ref="tt:Core.attrib.class"/>
    <xs:attributeGroup ref="tt:Styled.attrib.class"/>
    <xs:attributeGroup ref="ttm:Metadata.attrib.class"/>
  </xs:attributeGroup>
  <xs:complexType name="body.eltype">
    <xs:sequence>
      <xs:group ref="tt:Metadata.class" minOccurs="0" maxOccurs="unbounded"/>
      <xs:group ref="tt:Animation.class" minOccurs="0" maxOccurs="unbounded"/>
      <xs:element ref="tt:div" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attributeGroup ref="tt:body.attlist"/>
  </xs:complexType>
  <xs:complexType name="div.eltype">
    <xs:sequence>
      <xs:group ref="tt:Metadata.class" minOccurs="0" maxOccurs="unbounded"/>
      <xs:group ref="tt:Animation.class" minOccurs="0" maxOccurs="unbounded"/>
      <xs:group ref="tt:Block.class" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attributeGroup ref="tt:div.attlist"/>
  </xs:complexType>
  <xs:complexType name="p.eltype" mixed="true">
    <xs:sequence>
      <xs:group ref="tt:Metadata.class" minOccurs="0" maxOccurs="unbounded"/>
      <xs:group ref="tt:Animation.class" minOccurs="0" maxOccurs="unbounded"/>
      <xs:group ref="tt:Inline.class" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attributeGroup ref="tt:p.attlist"/>
  </xs:complexType>
  <xs:complexType name="span.eltype" mixed="true">
    <xs:sequence>
      <xs:group ref="tt:Metadata.class" minOccurs="0" maxOccurs="unbounded"/>
      <xs:group ref="tt:Animation.class" minOccurs="0" maxOccurs="unbounded"/>
      <xs:group ref="tt:Inline.class" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attributeGroup ref="tt:span.attlist"/>
  </xs:complexType>
  <xs:complexType name="br.eltype">
    <xs:sequence>
      <xs:group ref="tt:Metadata.class" minOccurs="0" maxOccurs="unbounded"/>
      <xs:group ref="tt:Animation.class" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attributeGroup ref="tt:br.attlist"/>
  </xs:complexType>
  <xs:element name="body" type="tt:body.eltype"/>
  <xs:element name="div" type="tt:div.eltype"/>
  <xs:element name="p" type="tt:p.eltype"/>
  <xs:element name="span" type="tt:span.eltype"/>
  <xs:element name="br" type="tt:br.eltype"/>
  <xs:group name="BlockNoDiv.class">
    <xs:choice>
      <xs:element ref="tt:p"/>
    </xs:choice>
  </xs:group>
  <xs:group name="Block.class">
    <xs:choice>
      <xs:group ref="tt:BlockNoDiv.class"/>
      <xs:element ref="tt:div"/>
    </xs:choice>
  </xs:group>
  <xs:group name="InlineNoSpan.class">
    <xs:choice>
      <xs:element ref="tt:br"/>
    </xs:choice>
  </xs:group>
  <xs:group name="Inline.class">
    <xs:choice>
      <xs:group ref="tt:InlineNoSpan.class"/>
      <xs:element ref="tt:span"/>
    </xs:choice>
  </xs:group>
</xs:schema>
C.2.2.3 Core Attributes Module
<xs:schema targetNamespace="http://www.w3.org/2006/10/ttaf1" xml:lang="en"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:tt="http://www.w3.org/2006/10/ttaf1"
  xmlns:xml="http://www.w3.org/XML/1998/namespace">
  <xs:import namespace="http://www.w3.org/XML/1998/namespace"
    schemaLocation="xml.xsd"/>
  <xs:attributeGroup name="Core.attrib.class">
    <xs:attribute ref="xml:id"/>
    <xs:attribute ref="xml:lang"/>
    <xs:attribute ref="xml:space"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="Core.required.attrib.class">
    <xs:attribute ref="xml:id"/>
    <xs:attribute ref="xml:lang" use="required"/>
    <xs:attribute ref="xml:space"/>
  </xs:attributeGroup>
</xs:schema>
C.2.2.4 Data Types Module
<xs:schema targetNamespace="http://www.w3.org/2006/10/ttaf1#datatype"
        xml:lang="en" xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:ttd="http://www.w3.org/2006/10/ttaf1#datatype">
  <xs:simpleType name="alpha">
    <xs:restriction base="xs:float">
      <xs:minInclusive value="0"/>
      <xs:maxInclusive value="1"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="agent">
    <xs:restriction base="xs:IDREFS"/>
  </xs:simpleType>
  <xs:simpleType name="cellResolution">
    <xs:annotation>
      <xs:documentation>positiveInteger positiveInteger</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string"/>
  </xs:simpleType>
  <xs:simpleType name="clockMode">
    <xs:restriction base="xs:token">
      <xs:enumeration value="local"/>
      <xs:enumeration value="gps"/>
      <xs:enumeration value="utc"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="color">
    <xs:restriction base="xs:string"/>
  </xs:simpleType>
  <xs:simpleType name="direction">
    <xs:restriction base="xs:token">
      <xs:enumeration value="ltr"/>
      <xs:enumeration value="rtl"/>
      <xs:enumeration value="inherit"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="display">
    <xs:restriction base="xs:token">
      <xs:enumeration value="auto"/>
      <xs:enumeration value="none"/>
      <xs:enumeration value="inherit"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="displayAlign">
    <xs:restriction base="xs:token">
      <xs:enumeration value="before"/>
      <xs:enumeration value="center"/>
      <xs:enumeration value="after"/>
      <xs:enumeration value="inherit"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="dynamicFlow">
    <xs:restriction base="xs:string"/>
  </xs:simpleType>
  <xs:simpleType name="extent">
    <xs:annotation>
      <xs:documentation>auto | inherit | length length</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string"/>
  </xs:simpleType>
  <xs:simpleType name="fontFamily">
    <xs:restriction base="xs:string"/>
  </xs:simpleType>
  <xs:simpleType name="fontSize">
    <xs:annotation>
      <xs:documentation>inherit | length | length length</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string"/>
  </xs:simpleType>
  <xs:simpleType name="fontStyle">
    <xs:restriction base="xs:token">
      <xs:enumeration value="normal"/>
      <xs:enumeration value="italic"/>
      <xs:enumeration value="oblique"/>
      <xs:enumeration value="reverseOblique"/>
      <xs:enumeration value="inherit"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="fontWeight">
    <xs:restriction base="xs:token">
      <xs:enumeration value="normal"/>
      <xs:enumeration value="bold"/>
      <xs:enumeration value="inherit"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="frameRate">
    <xs:restriction base="xs:nonNegativeInteger"/>
  </xs:simpleType>
  <xs:simpleType name="frameRateMultiplier">
    <xs:annotation>
      <xs:documentation>positiveInteger:positiveInteger</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:pattern value="\p{Nd}+(\s*:\s*\p{Nd}+)?"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="lineHeight">
    <xs:annotation>
      <xs:documentation>normal | inherit | length</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string"/>
  </xs:simpleType>
  <xs:simpleType name="markerMode">
    <xs:restriction base="xs:token">
      <xs:enumeration value="continuous"/>
      <xs:enumeration value="discontinuous"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="metadataAgentType">
    <xs:restriction base="xs:token">
      <xs:enumeration value="person"/>
      <xs:enumeration value="character"/>
      <xs:enumeration value="group"/>
      <xs:enumeration value="organization"/>
      <xs:enumeration value="other"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="metadataNameType">
    <xs:restriction base="xs:token">
      <xs:enumeration value="full"/>
      <xs:enumeration value="family"/>
      <xs:enumeration value="given"/>
      <xs:enumeration value="alias"/>
      <xs:enumeration value="other"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="metadataRoleBaseType">
    <xs:annotation>
      <xs:documentation>orphan simpleType retained in hope it can be used for role</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="action"/>
      <xs:enumeration value="caption"/>
      <xs:enumeration value="dialog"/>
      <xs:enumeration value="expletive"/>
      <xs:enumeration value="kinesic"/>
      <xs:enumeration value="lyrics"/>
      <xs:enumeration value="music"/>
      <xs:enumeration value="narration"/>
      <xs:enumeration value="quality"/>
      <xs:enumeration value="sound"/>
      <xs:enumeration value="source"/>
      <xs:enumeration value="suppressed"/>
      <xs:enumeration value="reproduction"/>
      <xs:enumeration value="thought"/>
      <xs:enumeration value="title"/>
      <xs:enumeration value="transcription"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="opacity">
    <xs:annotation>
      <xs:documentation>inherit | alpha</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string"/>
  </xs:simpleType>
  <xs:simpleType name="origin">
    <xs:annotation>
      <xs:documentation>auto | inherit | length length</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string"/>
  </xs:simpleType>
  <xs:simpleType name="overflow">
    <xs:restriction base="xs:token">
      <xs:enumeration value="visible"/>
      <xs:enumeration value="hidden"/>
      <xs:enumeration value="scroll"/>
      <xs:enumeration value="inherit"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="padding">
    <xs:annotation>
      <xs:documentation>inherit | length length | length length length | length length length length</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string"/>
  </xs:simpleType>
  <xs:simpleType name="pixelAspectRatio">
    <xs:annotation>
      <xs:documentation>positiveInteger:positiveInteger</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:pattern value="\p{Nd}+\s*:\s*\p{Nd}+"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="profile">
    <xs:restriction base="xs:anyURI"/>
  </xs:simpleType>
  <xs:simpleType name="role">
    <xs:annotation>
      <xs:documentation>metadataRoleBaseType | "x-"string</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:NMTOKEN"/>
  </xs:simpleType>
  <xs:simpleType name="showBackground">
    <xs:restriction base="xs:token">
      <xs:enumeration value="always"/>
      <xs:enumeration value="whenActive"/>
      <xs:enumeration value="inherit"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="smpteMode">
    <xs:restriction base="xs:token">
      <xs:enumeration value="dropNTSC"/>
      <xs:enumeration value="dropPAL"/>
      <xs:enumeration value="nonDrop"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="subFrameRate">
    <xs:restriction base="xs:positiveInteger"/>
  </xs:simpleType>
  <xs:simpleType name="textAlign">
    <xs:restriction base="xs:token">
      <xs:enumeration value="left"/>
      <xs:enumeration value="center"/>
      <xs:enumeration value="right"/>
      <xs:enumeration value="start"/>
      <xs:enumeration value="end"/>
      <xs:enumeration value="inherit"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="textDecoration">
    <xs:restriction base="xs:token">
      <xs:enumeration value="none"/>
      <xs:enumeration value="underline"/>
      <xs:enumeration value="noUnderline"/>
      <xs:enumeration value="overline"/>
      <xs:enumeration value="noOverline"/>
      <xs:enumeration value="lineThrough"/>
      <xs:enumeration value="noLineThrough"/>
      <xs:enumeration value="inherit"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="textOutline">
    <xs:annotation>
      <xs:documentation>none | inherit | length | length length | color length | color length length</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string"/>
  </xs:simpleType>
  <xs:simpleType name="tickRate">
    <xs:restriction base="xs:positiveInteger"/>
  </xs:simpleType>
  <xs:simpleType name="timeBase">
    <xs:restriction base="xs:token">
      <xs:enumeration value="media"/>
      <xs:enumeration value="smpte"/>
      <xs:enumeration value="clock"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="timeContainer">
    <xs:restriction base="xs:token">
      <xs:enumeration value="par"/>
      <xs:enumeration value="seq"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="timeCoordinate">
    <xs:annotation>
      <xs:documentation>timeExpression</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string"/>
  </xs:simpleType>
  <xs:simpleType name="timeDuration">
    <xs:annotation>
      <xs:documentation>timeExpression</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string"/>
  </xs:simpleType>
  <xs:simpleType name="unicodeBidi">
    <xs:restriction base="xs:token">
      <xs:enumeration value="normal"/>
      <xs:enumeration value="embed"/>
      <xs:enumeration value="bidiOverride"/>
      <xs:enumeration value="inherit"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="visibility">
    <xs:restriction base="xs:token">
      <xs:enumeration value="hidden"/>
      <xs:enumeration value="visible"/>
      <xs:enumeration value="inherit"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="wrapOption">
    <xs:restriction base="xs:token">
      <xs:enumeration value="wrap"/>
      <xs:enumeration value="noWrap"/>
      <xs:enumeration value="inherit"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="writingMode">
    <xs:restriction base="xs:token">
      <xs:enumeration value="lrtb"/>
      <xs:enumeration value="rltb"/>
      <xs:enumeration value="tbrl"/>
      <xs:enumeration value="tblr"/>
      <xs:enumeration value="lr"/>
      <xs:enumeration value="rl"/>
      <xs:enumeration value="tb"/>
      <xs:enumeration value="inherit"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="zIndex">
    <xs:annotation>
      <xs:documentation>auto | inherit | integer</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string"/>
  </xs:simpleType>
</xs:schema>
C.2.2.5 Document Module
<xs:schema targetNamespace="http://www.w3.org/2006/10/ttaf1" xml:lang="en"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:tt="http://www.w3.org/2006/10/ttaf1"
  xmlns:ttm="http://www.w3.org/2006/10/ttaf1#metadata"
  xmlns:ttp="http://www.w3.org/2006/10/ttaf1#parameter"
  xmlns:tts="http://www.w3.org/2006/10/ttaf1#style">
  <xs:import namespace="http://www.w3.org/2006/10/ttaf1#metadata"
    schemaLocation="ttaf1-dfxp-metadata-items.xsd"/>
  <xs:import namespace="http://www.w3.org/2006/10/ttaf1#parameter"
    schemaLocation="ttaf1-dfxp-parameter-attribs.xsd"/>
  <xs:import namespace="http://www.w3.org/2006/10/ttaf1#style"
    schemaLocation="ttaf1-dfxp-styling-attribs.xsd"/>
  <xs:include schemaLocation="ttaf1-dfxp-core-attribs.xsd"/>
  <xs:include schemaLocation="ttaf1-dfxp-timing-attribs.xsd"/>
  <xs:include schemaLocation="ttaf1-dfxp-head.xsd"/>
  <xs:include schemaLocation="ttaf1-dfxp-content.xsd"/>
  <xs:attributeGroup name="tt.attlist">
    <xs:attributeGroup ref="tt:Core.required.attrib.class"/>
    <xs:attributeGroup ref="ttp:Parameter.attrib.class"/>
  </xs:attributeGroup>
  <xs:complexType name="tt.eltype">
    <xs:sequence>
      <xs:element ref="tt:head" minOccurs="0" maxOccurs="1"/>
      <xs:element ref="tt:body" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
    <xs:attributeGroup ref="tt:tt.attlist"/>
  </xs:complexType>
  <xs:element name="tt" type="tt:tt.eltype"/>
</xs:schema>
C.2.2.6 Header Module
<xs:schema targetNamespace="http://www.w3.org/2006/10/ttaf1" xml:lang="en"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:tt="http://www.w3.org/2006/10/ttaf1"
  xmlns:ttm="http://www.w3.org/2006/10/ttaf1#metadata"
  xmlns:tts="http://www.w3.org/2006/10/ttaf1#style">
  <xs:include schemaLocation="ttaf1-dfxp-core-attribs.xsd"/>
  <xs:include schemaLocation="ttaf1-dfxp-metadata.xsd"/>
  <xs:include schemaLocation="ttaf1-dfxp-styling.xsd"/>
  <xs:include schemaLocation="ttaf1-dfxp-layout.xsd"/>
  <xs:attributeGroup name="head.attlist">
    <xs:attributeGroup ref="tt:Core.attrib.class"/>
  </xs:attributeGroup>
  <xs:complexType name="head.eltype">
    <xs:sequence>
      <xs:group ref="tt:Metadata.class" minOccurs="0" maxOccurs="unbounded"/>
      <xs:element ref="tt:styling" minOccurs="0" maxOccurs="1"/>
      <xs:element ref="tt:layout" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
    <xs:attributeGroup ref="tt:head.attlist"/>
  </xs:complexType>
  <xs:element name="head" type="tt:head.eltype"/>
</xs:schema>
C.2.2.7 Layout Module
<xs:schema targetNamespace="http://www.w3.org/2006/10/ttaf1" xml:lang="en"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:tt="http://www.w3.org/2006/10/ttaf1"
  xmlns:ttm="http://www.w3.org/2006/10/ttaf1#metadata"
  xmlns:tts="http://www.w3.org/2006/10/ttaf1#style">
  <xs:include schemaLocation="ttaf1-dfxp-core-attribs.xsd"/>
  <xs:include schemaLocation="ttaf1-dfxp-timing-attribs.xsd"/>
  <xs:include schemaLocation="ttaf1-dfxp-metadata.xsd"/>
  <xs:include schemaLocation="ttaf1-dfxp-animation.xsd"/>
  <xs:include schemaLocation="ttaf1-dfxp-styling.xsd"/>
  <xs:import namespace="http://www.w3.org/2006/10/ttaf1#style"
    schemaLocation="ttaf1-dfxp-styling-attribs.xsd"/>
  <xs:attributeGroup name="RegionBinding.attrib.class">
    <xs:attribute name="region" type="xs:IDREF"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="layout.attlist">
    <xs:attributeGroup ref="tt:Core.attrib.class"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="region.attlist">
    <xs:attributeGroup ref="tt:Core.attrib.class"/>
    <xs:attributeGroup ref="tt:Styled.attrib.class"/>
    <xs:attributeGroup ref="tt:TimedContainer.attrib.class"/>
  </xs:attributeGroup>
  <xs:complexType name="layout.eltype">
    <xs:sequence>
      <xs:group ref="tt:Metadata.class" minOccurs="0" maxOccurs="unbounded"/>
      <xs:element ref="tt:region" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attributeGroup ref="tt:layout.attlist"/>
  </xs:complexType>
  <xs:complexType name="region.eltype">
    <xs:sequence>
      <xs:group ref="tt:Metadata.class" minOccurs="0" maxOccurs="unbounded"/>
      <xs:group ref="tt:Animation.class" minOccurs="0" maxOccurs="unbounded"/>
      <xs:element ref="tt:style" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attributeGroup ref="tt:region.attlist"/>
  </xs:complexType>
  <xs:element name="layout" type="tt:layout.eltype"/>
  <xs:element name="region" type="tt:region.eltype"/>
</xs:schema>
C.2.2.8 Metadata Module
<xs:schema targetNamespace="http://www.w3.org/2006/10/ttaf1" xml:lang="en"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:tt="http://www.w3.org/2006/10/ttaf1"
  xmlns:ttm="http://www.w3.org/2006/10/ttaf1#metadata">
  <xs:include schemaLocation="ttaf1-dfxp-core-attribs.xsd"/>
  <xs:import namespace="http://www.w3.org/2006/10/ttaf1#metadata"
    schemaLocation="ttaf1-dfxp-metadata-items.xsd"/>
  <xs:attributeGroup name="metadata.attlist">
    <xs:attributeGroup ref="tt:Core.attrib.class"/>
  </xs:attributeGroup>
  <xs:complexType name="metadata.eltype" mixed="true">
    <xs:sequence>
      <xs:any namespace="##other" processContents="lax" minOccurs="0"
        maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attributeGroup ref="tt:metadata.attlist"/>
  </xs:complexType>
  <xs:element name="metadata" type="tt:metadata.eltype"/>
  <xs:group name="MetadataNoAgent.class">
    <xs:choice>
      <xs:group ref="ttm:MetadataItems.class"/>
      <xs:element ref="tt:metadata"/>
    </xs:choice>
  </xs:group>
  <xs:group name="Metadata.class">
    <xs:choice>
      <xs:group ref="tt:MetadataNoAgent.class"/>
      <xs:element ref="ttm:agent"/>
    </xs:choice>
  </xs:group>
</xs:schema>
C.2.2.9 Metadata Items Module
<xs:schema targetNamespace="http://www.w3.org/2006/10/ttaf1#metadata"
  xml:lang="en" xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:tt="http://www.w3.org/2006/10/ttaf1"
  xmlns:ttd="http://www.w3.org/2006/10/ttaf1#datatype"
  xmlns:ttm="http://www.w3.org/2006/10/ttaf1#metadata">
  <xs:import namespace="http://www.w3.org/2006/10/ttaf1#datatype"
    schemaLocation="ttaf1-dfxp-datatypes.xsd"/>
  <xs:import namespace="http://www.w3.org/2006/10/ttaf1"
    schemaLocation="ttaf1-dfxp-core-attribs.xsd"/>
  <xs:include schemaLocation="ttaf1-dfxp-metadata-attribs.xsd"/>
  <xs:attributeGroup name="actor.attlist">
    <xs:attributeGroup ref="tt:Core.attrib.class"/>
    <xs:attribute name="agent" type="xs:IDREF"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="agent.attlist">
    <xs:attributeGroup ref="tt:Core.attrib.class"/>
    <xs:attribute name="type" type="ttd:metadataAgentType"
    use="required"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="copyright.attlist">
    <xs:attributeGroup ref="tt:Core.attrib.class"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="desc.attlist">
    <xs:attributeGroup ref="tt:Core.attrib.class"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="name.attlist">
    <xs:attributeGroup ref="tt:Core.attrib.class"/>
    <xs:attribute name="type" type="ttd:metadataNameType"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="title.attlist">
    <xs:attributeGroup ref="tt:Core.attrib.class"/>
  </xs:attributeGroup>
  <xs:complexType name="actor.eltype">
    <xs:attributeGroup ref="ttm:actor.attlist"/>
  </xs:complexType>
  <xs:complexType name="agent.eltype">
    <xs:sequence>
      <xs:element ref="ttm:name" minOccurs="0" maxOccurs="unbounded"/>
      <xs:element ref="ttm:actor" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
    <xs:attributeGroup ref="ttm:agent.attlist"/>
  </xs:complexType>
  <xs:complexType name="copyright.eltype" mixed="true">
    <xs:attributeGroup ref="ttm:copyright.attlist"/>
  </xs:complexType>
  <xs:complexType name="desc.eltype" mixed="true">
    <xs:attributeGroup ref="ttm:desc.attlist"/>
  </xs:complexType>
  <xs:complexType name="name.eltype" mixed="true">
    <xs:attributeGroup ref="ttm:name.attlist"/>
  </xs:complexType>
  <xs:complexType name="title.eltype" mixed="true">
    <xs:attributeGroup ref="ttm:title.attlist"/>
  </xs:complexType>
  <xs:element name="actor" type="ttm:actor.eltype"/>
  <xs:element name="agent" type="ttm:agent.eltype"/>
  <xs:element name="copyright" type="ttm:copyright.eltype"/>
  <xs:element name="desc" type="ttm:desc.eltype"/>
  <xs:element name="name" type="ttm:name.eltype"/>
  <xs:element name="title" type="ttm:title.eltype"/>
  <xs:group name="MetadataItems.class">
    <xs:choice>
      <xs:element ref="ttm:title"/>
      <xs:element ref="ttm:desc"/>
      <xs:element ref="ttm:copyright"/>
    </xs:choice>
  </xs:group>
</xs:schema>
C.2.2.10 Metadata Attributes Module
<xs:schema targetNamespace="http://www.w3.org/2006/10/ttaf1#metadata"
  xml:lang="en" xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:ttd="http://www.w3.org/2006/10/ttaf1#datatype"
  xmlns:ttm="http://www.w3.org/2006/10/ttaf1#metadata">
  <xs:import namespace="http://www.w3.org/2006/10/ttaf1#datatype"
    schemaLocation="ttaf1-dfxp-datatypes.xsd"/>
  <xs:attribute name="agent" type="ttd:agent"/>
  <xs:attribute name="role" type="ttd:role"/>
  <xs:attributeGroup name="Metadata.attrib.class">
    <xs:attribute ref="ttm:agent"/>
    <xs:attribute ref="ttm:role"/>
  </xs:attributeGroup>
</xs:schema>
C.2.2.11 Parameter Attributes Module
<xs:schema targetNamespace="http://www.w3.org/2006/10/ttaf1#parameter"
  xml:lang="en" xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:ttd="http://www.w3.org/2006/10/ttaf1#datatype"
  xmlns:ttp="http://www.w3.org/2006/10/ttaf1#parameter">
  <xs:import namespace="http://www.w3.org/2006/10/ttaf1#datatype"
    schemaLocation="ttaf1-dfxp-datatypes.xsd"/>
  <xs:attribute name="cellResolution" type="ttd:cellResolution"/>
  <xs:attribute name="clockMode" type="ttd:clockMode"/>
  <xs:attribute name="frameRate" type="ttd:frameRate"/>
  <xs:attribute name="frameRateMultiplier" type="ttd:frameRateMultiplier"/>
  <xs:attribute name="markerMode" type="ttd:markerMode"/>
  <xs:attribute name="profile" type="ttd:profile"/>
  <xs:attribute name="pixelAspectRatio" type="ttd:pixelAspectRatio"/>
  <xs:attribute name="smpteMode" type="ttd:smpteMode"/>
  <xs:attribute name="subFrameRate" type="ttd:subFrameRate"/>
  <xs:attribute name="tickRate" type="ttd:tickRate"/>
  <xs:attribute name="timeBase" type="ttd:timeBase"/>
  <xs:attributeGroup name="Parameter.attrib.class">
    <xs:attribute ref="ttp:cellResolution"/>
    <xs:attribute ref="ttp:clockMode"/>
    <xs:attribute ref="ttp:frameRate"/>
    <xs:attribute ref="ttp:frameRateMultiplier"/>
    <xs:attribute ref="ttp:markerMode"/>
    <xs:attribute ref="ttp:profile"/>
    <xs:attribute ref="ttp:pixelAspectRatio"/>
    <xs:attribute ref="ttp:smpteMode"/>
    <xs:attribute ref="ttp:subFrameRate"/>
    <xs:attribute ref="ttp:tickRate"/>
    <xs:attribute ref="ttp:timeBase"/>
  </xs:attributeGroup>
</xs:schema>
C.2.2.12 Styling Attributes Module
<xs:schema targetNamespace="http://www.w3.org/2006/10/ttaf1#style" xml:lang="en"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:ttd="http://www.w3.org/2006/10/ttaf1#datatype"
  xmlns:tts="http://www.w3.org/2006/10/ttaf1#style">
  <xs:import namespace="http://www.w3.org/2006/10/ttaf1#datatype"
    schemaLocation="ttaf1-dfxp-datatypes.xsd"/>
  <xs:attribute name="backgroundColor" type="ttd:color"/>
  <xs:attribute name="color" type="ttd:color"/>
  <xs:attribute name="direction" type="ttd:direction"/>
  <xs:attribute name="display" type="ttd:display"/>
  <xs:attribute name="displayAlign" type="ttd:displayAlign"/>
  <xs:attribute name="dynamicFlow" type="ttd:dynamicFlow"/>
  <xs:attribute name="extent" type="ttd:extent"/>
  <xs:attribute name="fontFamily" type="ttd:fontFamily"/>
  <xs:attribute name="fontSize" type="ttd:fontSize"/>
  <xs:attribute name="fontStyle" type="ttd:fontStyle"/>
  <xs:attribute name="fontWeight" type="ttd:fontWeight"/>
  <xs:attribute name="lineHeight" type="ttd:lineHeight"/>
  <xs:attribute name="opacity" type="ttd:opacity"/>
  <xs:attribute name="origin" type="ttd:origin"/>
  <xs:attribute name="overflow" type="ttd:overflow"/>
  <xs:attribute name="padding" type="ttd:padding"/>
  <xs:attribute name="showBackground" type="ttd:showBackground"/>
  <xs:attribute name="textAlign" type="ttd:textAlign"/>
  <xs:attribute name="textDecoration" type="ttd:textDecoration"/>
  <xs:attribute name="textOutline" type="ttd:textOutline"/>
  <xs:attribute name="unicodeBidi" type="ttd:unicodeBidi"/>
  <xs:attribute name="visibility" type="ttd:visibility"/>
  <xs:attribute name="wrapOption" type="ttd:wrapOption"/>
  <xs:attribute name="writingMode" type="ttd:writingMode"/>
  <xs:attribute name="zIndex" type="ttd:zIndex"/>
  <xs:attributeGroup name="Styling.attrib.class">
    <xs:attribute ref="tts:backgroundColor"/>
    <xs:attribute ref="tts:color"/>
    <xs:attribute ref="tts:direction"/>
    <xs:attribute ref="tts:display"/>
    <xs:attribute ref="tts:displayAlign"/>
    <xs:attribute ref="tts:dynamicFlow"/>
    <xs:attribute ref="tts:extent"/>
    <xs:attribute ref="tts:fontFamily"/>
    <xs:attribute ref="tts:fontSize"/>
    <xs:attribute ref="tts:fontStyle"/>
    <xs:attribute ref="tts:fontWeight"/>
    <xs:attribute ref="tts:lineHeight"/>
    <xs:attribute ref="tts:opacity"/>
    <xs:attribute ref="tts:origin"/>
    <xs:attribute ref="tts:overflow"/>
    <xs:attribute ref="tts:padding"/>
    <xs:attribute ref="tts:showBackground"/>
    <xs:attribute ref="tts:textAlign"/>
    <xs:attribute ref="tts:textDecoration"/>
    <xs:attribute ref="tts:textOutline"/>
    <xs:attribute ref="tts:unicodeBidi"/>
    <xs:attribute ref="tts:visibility"/>
    <xs:attribute ref="tts:wrapOption"/>
    <xs:attribute ref="tts:writingMode"/>
    <xs:attribute ref="tts:zIndex"/>
  </xs:attributeGroup>
</xs:schema>
C.2.2.13 Styling Module
<xs:schema targetNamespace="http://www.w3.org/2006/10/ttaf1" xml:lang="en"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:tt="http://www.w3.org/2006/10/ttaf1"
  xmlns:ttm="http://www.w3.org/2006/10/ttaf1#metadata"
  xmlns:tts="http://www.w3.org/2006/10/ttaf1#style">
  <xs:include schemaLocation="ttaf1-dfxp-core-attribs.xsd"/>
  <xs:include schemaLocation="ttaf1-dfxp-metadata.xsd"/>
  <xs:import namespace="http://www.w3.org/2006/10/ttaf1#style"
    schemaLocation="ttaf1-dfxp-styling-attribs.xsd"/>
  <xs:attributeGroup name="StyleBinding.attrib.class">
    <xs:attribute name="style" type="xs:IDREFS"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="Styled.attrib.class">
    <xs:attributeGroup ref="tt:StyleBinding.attrib.class"/>
    <xs:attributeGroup ref="tts:Styling.attrib.class"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="styling.attlist">
    <xs:attributeGroup ref="tt:Core.attrib.class"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="style.attlist">
    <xs:attributeGroup ref="tt:Core.attrib.class"/>
    <xs:attributeGroup ref="tt:Styled.attrib.class"/>
  </xs:attributeGroup>
  <xs:complexType name="styling.eltype">
    <xs:sequence>
      <xs:group ref="tt:Metadata.class" minOccurs="0" maxOccurs="unbounded"/>
      <xs:element ref="tt:style" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attributeGroup ref="tt:styling.attlist"/>
  </xs:complexType>
  <xs:complexType name="style.eltype">
    <xs:sequence>
      <xs:group ref="tt:Metadata.class" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attributeGroup ref="tt:style.attlist"/>
  </xs:complexType>
  <xs:element name="styling" type="tt:styling.eltype"/>
  <xs:element name="style" type="tt:style.eltype"/>
</xs:schema>
C.2.2.14 Timing Attributes Module
<xs:schema targetNamespace="http://www.w3.org/2006/10/ttaf1" xml:lang="en"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:ttd="http://www.w3.org/2006/10/ttaf1#datatype"
  xmlns:tt="http://www.w3.org/2006/10/ttaf1">
  <xs:import namespace="http://www.w3.org/2006/10/ttaf1#datatype"
    schemaLocation="ttaf1-dfxp-datatypes.xsd"/>
  <xs:attributeGroup name="TimingInterval.attrib.class">
    <xs:attribute name="begin" type="ttd:timeCoordinate"/>
    <xs:attribute name="dur" type="ttd:timeDuration"/>
    <xs:attribute name="end" type="ttd:timeCoordinate"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="TimingContainer.attrib.class">
    <xs:attribute name="timeContainer" type="ttd:timeContainer"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="Timed.attrib.class">
    <xs:attributeGroup ref="tt:TimingInterval.attrib.class"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="TimedContainer.attrib.class">
    <xs:attributeGroup ref="tt:Timed.attrib.class"/>
    <xs:attributeGroup ref="tt:TimingContainer.attrib.class"/>
  </xs:attributeGroup>
</xs:schema>
C.2.2.15 XML Attributes Module
<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" xml:lang="en"
  xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:attribute name="id" type="xs:ID"/>
  <xs:attribute name="lang" type="xs:language"/>
  <xs:attribute name="space">
    <xs:simpleType>
      <xs:restriction base="xs:NCName">
        <xs:enumeration value="default"/>
        <xs:enumeration value="preserve"/>
      </xs:restriction>
    </xs:simpleType>
  </xs:attribute>
</xs:schema>

D Media Type Registration

This appendix is normative.

This appendix registers a new MIME media type, "application/ttaf+xml" in conformance with BCP 13 and W3CRegMedia. The information in this appendix is being submitted to the Internet Engineering Steering Group (IESG) for review, approval, and registration with the Internet Assigned Numbers Authority (IANA).

MIME media type name:

application

MIME subtype name:

ttaf+xml

Required parameters:

None.

Optional parameters:

The encoding of a TT AF document must be determined by the XML encoding declaration. This has identical semantics to the application/xml media type in the case where the charset parameter is omitted, as specified in [XML Media], Sections 8.9, 8.10 and 8.11.

The document profile of a TT AF document may be specified using an optional profile parameter, which, if specified, the value of which must adhere to the syntax and semantics of ttp:profile parameter defined by Section 6.2.7 ttp:profile of the published specification.

Encoding considerations:

Same for application/xml. See [XML Media], Section 3.2.

Restrictions on usage:

None.

Security considerations:

As with other XML types and as noted in [XML Media] Section 10, repeated expansion of maliciously constructed XML entities can be used to consume large amounts of memory, which may cause XML processors in constrained environments to fail.

In addition, because of the extensibility features for TT AF and of XML in general, it is possible that "application/ttaf+xml" may describe content that has security implications beyond those described here. However, if the processor follows only the normative semantics of the published specification, this content will be outside TT AF namespaces and may be ignored. Only in the case where the processor recognizes and processes the additional content, or where further processing of that content is dispatched to other processors, would security issues potentially arise. And in that case, they would fall outside the domain of this registration document.

Interoperability considerations:

The published specification describes processing semantics that dictate behavior that must be followed when dealing with, among other things, unrecognized elements and attributes, both in TT AF namespaces and in other namespaces.

Because TT AF is extensible, conformant "application/ttaf+xml" processors must expect that content received is well-formed XML, but it cannot be guaranteed that the content is valid to a particular DTD or Schema or that the processor will recognize all of the elements and attributes in the document.

Published specification:

This media type registration is extracted from Appendix D Media Type Registration of the Timed Text (TT) Authoring Format 1.0 - Distribution Format Exchange Profile (DFXP) specification.

Additional information:

None.

Person & email address to contact for further information:

Glenn Adams (public-tt@w3.org)

Intended usage:

COMMON

Author/Change controller:

The published specification is a work product of the World Wide Web Consortium's Timed Text (TT) Working Group. The W3C has change control over this specification.

E References

This appendix is normative.

CSS2
Bert Bos et al., Cascading Style Sheets, Level 2, W3C Recommendation, 12 May 1998. (See http://www.w3.org/TR/1998/REC-CSS2-19980512/.)
GPS
Global Positioning System, US Naval Observatory. (See http://tycho.usno.navy.mil/gpsinfo.html.)
MIME
Ned Freed and Nathaniel Borenstein, Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types, RFC 2046, November 1996, IETF.(See http://www.rfc-editor.org/rfc/rfc2046.txt.)
RELAX NG
ISO/IEC 19757-2, Information technology – Document Schema Definition Language (DSDL) – Part 2: Regular-grammar-based validation – RELAX NG, International Organization for Standardization (ISO).
SMIL 2.1
Dick Bultermann, et al., Synchronized Multimedia Integration Language (SMIL 2.1), W3C Recommendation, 13 December 2005. (See http://www.w3.org/TR/2005/REC-SMIL2-20051213/.)
SMPTE 12M
ANSI/SMPTE 12M, Television, Audio and Film – Time and Control Code, SMPTE Standard.
SRGB
IEC 61966-2-1, Multimedia systems and equipment – Colour measurement and management – Part 2-1: Colour management – Default RGB colour space – sRGB, International Electrotechnical Commission (IEC).
UAAG
Ian Jacobs, Jon Gunderson, and Eric Hansen, Eds., User Agent Accessibility Guidelines 1.0, W3C Recommendation, 17 December 2002. (See http://www.w3.org/TR/2002/REC-UAAG10-20021217/.)
UTC
Recommendation TF.460, Standard-Frequency and Time-Signal Emissions, International Telecommunciations Union, Radio Sector (ITU-R).
WCAG
Wendy Chisholm, Gregg Vanderheiden, and Ian Jacobs, Eds., Web Content Accessibility Guidelines 1.0, W3C Recommendation, 05 May 1999. (See http://www.w3.org/TR/1999/WAI-WEBCONTENT-19990505/.)
XML 1.1
Tim Bray, et al. Extensible Markup Language (XML) 1.1, W3C Recommendation, 04 February 2004, updated 15 Apr 2004. (See http://www.w3.org/TR/2004/REC-xml11-20040204/.)
XML ID
Jonathan Marsh, Daniel Veillard, Norman Walsh, Eds., xml:id Version 1.0, W3C Recommendation, 09 September 2005. (See http://www.w3.org/TR/2005/REC-xml-id-20050909/.)
XML Media
Makato Murata, Simon St. Laurent, Kan Khon, XML Media Types, RFC 3023, January 2001, IETF.(See http://www.rfc-editor.org/rfc/rfc3023.txt.)
XML InfoSet
John Cowan and Richard Tobin, XML Information Set (Second Edition), W3C Recommendation, 04 February 2004. (See http://www.w3.org/TR/2004/REC-xml-infoset-20040204/.)
XML Media Types
Makato Murata, et al., XML Media Types, RFC 3023, January 2001, IETF.(See http://www.rfc-editor.org/rfc/rfc3023.txt.)
XML Namespaces 1.1
Tim Bray, et al. Namespaces in XML 1.1, W3C Recommendation, 04 February 2004. (See http://www.w3.org/TR/2004/REC-xml-names11-20040204/.)
XML Schema Part 1
Henry S. Thompson, David Beech, Murray Maloney, Noah Mendelsohn, Eds., XML Schema Part 1: Structures, W3C Recommendation, 28 October 2004. (See http://www.w3.org/TR/xmlschema-1/.)
XML Schema Part 2
Paul Biron and Ashok Malhotra, XML Schema Part 2: Datatypes, W3C Recommendation, 28 October 2004. (See http://www.w3.org/TR/xmlschema-2/.)
XSL 1.0
Sharon Adler, Anders Berglund, et al., Eds., Extensible Stylesheet Language, Version 1.0, W3C Recommendation, 15 October 2001. (See http://www.w3.org/TR/2001/REC-xsl-20011015/.)

F Other References (Non-Normative)

CEA-608-C
EIA/CEA-608-C, Line 21 Data Services, EIA/CEA Standard, Consumer Electronics Association (CEA).
CSS3 Color
Tantek Çelik and Chris Lilley, CSS3 Color Module, W3C Candidate Recommendation, 14 May 2003. (See http://www.w3.org/TR/2003/CR-css3-color-20030514/.)
DCMES 1.1
Dublin Core Metadata Initiative, Dublin Core Metadata Element Set, Version 1.1: Reference Description. (See http://dublincore.org/documents/dces/.)
MPEG7-5
ISO/IEC 15938-5, Information technology – Multimedia content description interface – Part 5: Multimedia description schemes, International Organization for Standardization (ISO).
QAF SG
Karl Dubost, et al., QA Framework: Specifications Guidelines, W3C Recommendation, 17 August 2005. (See http://www.w3.org/TR/qaframe-spec/.)
SCHEME
Guy Steele and Gerald Sussman, Scheme Programming Environment, Massachusetts Institute of Technology. (See http://swiss.csail.mit.edu/projects/scheme/.)
SMPTE 170M
ANSI/SMPTE 170M, Television – Composite Analog Video Signal – NTSC for Studio Applications, SMPTE Standard.
SVG 1.1
Jon Ferraiolo, Jun Fujisawa, Dean Jackson, Eds., Scalable Vector Graphics (SVG) 1.1 Specification, W3C Recommendation, 14 January 2003. (See http://www.w3.org/TR/2003/REC-SVG11-20030114/.)
TTAF1-REQ
Glenn Adams, Editor, Timed Text (TT) Authoring Format 1.0 Use Cases and Requirements, W3C Working Group Note, 27 April 2006. (See http://www.w3.org/TR/2006/NOTE-ttaf1-req-20060427/.)
XHTML 1.0
Steven Pemberton, et al., XHTML™ 1.0, The Extensible Hypertext Markup Language (Second Edition), W3C Recommendation, 01 August 2002. (See http://www.w3.org/TR/2002/REC-xhtml1-20020801/.)

G Sample Code (Non-Normative)

This appendix contains sample code, also available in a ZIP Archive along with related files, that implements certain algorithms described by this specification. This code makes use of the MIT Scheme [SCHEME] dialect of the Lisp Programming Language.

The following algorithms are implemented by this code:

Subsequent to the sample code listings, a transcript of a sample compile, load, and run session is provided.

G.1 Reduced XML Infoset (RXI) – RXI.SCM

;;; -*-Scheme-*-
;;; Package: (dfxp rxi)

;
; DFXP Reduced XML Infoset Load, Save, Transformer
;

(declare (usual-integrations))

;
; The default reverse binding for the XML namespace is represented
; by *XML-DEFAULT-REVERSE-BINDING*.
;
(define *xml-default-reverse-binding*
  '("http://www.w3.org/XML/1998/namespace" . "xml"))

;
; An RXI-BINDINGS structure consists of a BINDINGS slot that contains a
; stack represented as a list of association lists whose keys are XMLNS name
; prefixes and whose values are XMLNS namespace URIs. A binding for the
; "empty" or "null" namespace is designated by a prefix whose value is "".
;
(define-structure
  (rxi-bindings
    (conc-name rxi-bindings/)
    (constructor make-rxi-bindings (#!optional bindings)))
  (bindings '() read-only #f))

;
; Push a list of NEW bindings onto BINDINGS.
;
(define (rxi-bindings/push! bindings new)
  (set-rxi-bindings/bindings!
    bindings
    (cons new (rxi-bindings/bindings bindings))))
  
;
; Pop the list of bindings at the top of BINDINGS.
;
(define (rxi-bindings/pop! bindings)
  (set-rxi-bindings/bindings!
    bindings
    (let ((old (rxi-bindings/bindings bindings)))
      (if (pair? old)
          (cdr old)
          '()))))
  
;
; Look up a binding for the designated XMLNS name PREFIX in BINDINGS,
; returning either an associated XMLNS namespace URI string or '() if
; not found.
;

(define (rxi-bindings/lookup bindings prefix)
  (let find
      ((bindings (rxi-bindings/bindings bindings)))
    (cond ((null? bindings)
           '())
          (else
            (let
                ((b (find-matching-item
                      (car bindings)
                      (lambda (b) (string=? (car b) prefix)))))
              (if (not (false? b))
                  (cdr b)
                  (find (cdr bindings))))))))

;
; Resolve qualified name QNAME to (VALUES LOCAL NSURI) where LOCAL is
; the local (unqualified) component of QNAME and NSURI is the
; associated namespace URI or '() if there is no associated namepsace
; URI, where IS-ATTRIBUTE? indicates whether the QNAME is the name of
; an attribute or an element.
;
; N.B. the lack of a namespace URI is permitted only for unqualified
; attribute names; all element names must have an associated namespace URI
; or an error is signaled. This implies that there must exist a binding for
; the empty (null) namespace prefix when resolving unqualified element
; names.
;
(define (rxi-bindings/resolve bindings qname is-attribute?)
  (let* ((i (string-find-next-char qname #\:))
         (pfx (substring qname 0 (if (false? i) 0 i)))
         (local (string-tail qname (if (false? i) 0 (+ i 1)))))
    (values
      local
      (if (or (> (string-length pfx) 0) (not is-attribute?))
          (let ((uri (rxi-bindings/lookup bindings pfx)))
            (or uri
                (error "unbound XMLNS prefix on prefix" pfx)))
          '()))))
    
;
; An RXI-NAME structure represents the name and namespace properties of a
; reduced XML infoset element or attribute information item and consists of
; a local name LOCAL and an associated namespace NAMESPACE, a non-empty
; string or '(), denoting that the name is not namespace qualified. An
; RXI-NAME is essentially a representation of an XMLNS "expanded name".
;
(define-structure
  (rxi-name (conc-name rxi-name/))
  (local "" read-only #t)
  (namespace '() read-only #t))

;
; Convert an RXI-NAME instance NAME to a list consisting of its constituent
; slots.
;
(define (rxi-name->list name)
  (list (rxi-name/local name)
        (rxi-name/namespace name)))

;
; Transform an XML name IQNAME as defined by the XML package as an uninterned
; symbol to an RXI-NAME, resolving qualified names into their XMLNS
; "expanded name" form, where IS-ATTRIBUTE? indicates whether the QNAME is
; the name of an attribute or an element.
;
(define (rxi-name/transform-from-xml iqname is-attribute? bindings)
  (call-with-values
    (lambda ()
      (rxi-bindings/resolve bindings (symbol-name iqname) is-attribute?))
    make-rxi-name))

;
; An RXI-ATTRIBUTE structure represents a reduced XML infoset attribute
; information item and consists of a NAME represented as an RXI-NAME
; instance and a VALUE represented as a string.
;
(define-structure
  (rxi-attribute (conc-name rxi-attribute/))
  (name '() read-only #t)
  (value "" read-only #t))

;
; Convert an RXI-ATTRIBUTE instance ATTRIBUTE to a list consisting of its
; constituent slots.
;
(define (rxi-attribute->list attribute)
  (list (rxi-name->list (rxi-attribute/name attribute))
        (rxi-attribute/value attribute)))

;
; Transform XML-ATTRIBUTE instance ATTRIBUTE to RXI-ATTRIBUTE instance,
; where BINDINGS is the current bindings stack.
;
(define (rxi-attribute/transform-from-xml attribute bindings)
  (let ((n (car attribute)) (v (cdr attribute)))
    (make-rxi-attribute (rxi-name/transform-from-xml n #t bindings) v)))

;
; An RXI-ELEMENT structure represents a reduced XML infoset element
; information item and consists of a NAME represented as an RXI-NAME
; instance, a possibly empty set of ATTRIBUTES represented as a list of
; RXI-ATTRIBUTE instances, and a possibly empty set of CHILDREN represented
; as a list of string or RXI-ELEMENT instances.
;
(define-structure
  (rxi-element (conc-name rxi-element/))
  (name "" read-only #t)
  (attributes '() read-only #f)
  (children '() read-only #f))

;
; Convert an RXI-ELEMENT instance ELEMENT to a list consisting of its
; constituent slots.
;
(define (rxi-element->list element)
  (list (rxi-name->list (rxi-element/name element))
        (map
          rxi-attribute->list
          (rxi-element/attributes element))
        (map
          (lambda (c)
            (if (string? c)
                c
                (rxi-element->list c)))
          (rxi-element/children element))))

;
; Determine if XML-ATTRIBUTE instance ATTRIBUTE, represented as a pair
; (NAME . VALUE), is an XMLNS attribute or not, i.e., has a qualified name
; whose prefix is "xmlns" or is the unqualified name "xmlns".
;
(define (namespace-attribute? attribute)
  (let ((qname (symbol-name (car attribute))))
    (and (string-prefix? "xmlns" qname)
         (or (= (string-length qname) 5)
             (let ((i (string-find-next-char qname #\:)))
               (and (not (false? i)) (= i 5)))))))

;
; Given a list ATTRIBUTES of XML-ATTRIBUTE instances consisting only of
; XMLNS attributes as determined by NAMESPACE-ATTRIBUTE? above, return a set
; of bindings as an association list whose keys are namespace prefixes and
; whose values are the associated namespace URIs.
;
(define (extract-namespace-bindings attributes)
  (map
    (lambda (a)
      (let ((qname (symbol-name (car a))))
        (if (= (string-match-forward qname "xmlns") 5)
            (cons
             (if (>= (string-length qname) 6)
                 (string-tail qname 6)
                 "")
             (cdr a))
            (error "Invalid namespace attribute" qname))))
    attributes))

;
; Transform XML-ELEMENT instance ELEMENT to RXI-ELEMENT instance,
; where BINDINGS is the current bindings stack.
;
(define (rxi-element/transform-from-xml element bindings)
  (let* ((attributes
           (xml-element-attributes element))
         (ns-attributes
           (keep-matching-items attributes namespace-attribute?))
         (other-attributes
           (keep-matching-items
             attributes
             (lambda (a) (not (namespace-attribute? a))))))
    (rxi-bindings/push! bindings (extract-namespace-bindings ns-attributes))
    (let ((rxi-element
            (make-rxi-element
              (rxi-name/transform-from-xml
                (xml-element-name element) #f bindings)
              (map
                (lambda (a) (rxi-attribute/transform-from-xml a bindings))
                other-attributes)
              (map
                (lambda (c)
                  (if (string? c)
                      c
                      (rxi-element/transform-from-xml c bindings)))
                (xml-element-contents element)))))
      (rxi-bindings/pop! bindings)
      rxi-element)))

;
; An RXI-DOCUMENT structure represents a reduced XML infoset document
; information item and consists of an ANNOTATIONS association list, used for
; internal book-keeping purposes, and an RXI-ELEMENT instance representing
; the document's root element or '() if there is no root element.
;
(define-structure
  (rxi-document (conc-name rxi-document/))
  (annotations '() read-only #f)
  (root '() read-only #f))

;
; Look up value of annotation named KEY on RXI-DOCUMENT instance DOCUMENT.
;
(define (rxi-document/annotation document key)
  (assq key (rxi-document/annotations document)))

;
; Add annotation (KEY . VALUE) to RXI-DOCUMENT instance DOCUMENT.
;
(define (set-rxi-document/annotation! document key value)
  (set-rxi-document/annotations! document (cons (cons key value) (rxi-document/annotations document))))

;
; Remove all annotations named KEY from RXI-DOCUMENT instance DOCUMENT.
;
(define (rxi-document/remove-annotation! document key)
  (del-assq! key (rxi-document/annotations document)))

;
; Convert an RXI-DOCUMENT instance DOCUMENT to a list consisting of its
; constituent slots.
;
(define (rxi-document->list document)
  (list (rxi-document/annotations document)
        (rxi-element->list (rxi-document/root document))))

;
; Transform XML-DOCUMENT instance DOCUMENT to RXI-DOCUMENT instance.
;
(define (rxi-document/transform-from-xml document)
  (let
    ((bindings
      (make-rxi-bindings
        (list (list (cons (cdr *xml-default-reverse-binding*)
                          (car *xml-default-reverse-binding*)))))))
    (make-rxi-document
      '()
      (rxi-element/transform-from-xml (xml-document-root document) bindings))))

;
; Load XML document instance from PATHNAME using XML package's XML parser,
; then transform resulting XML-DOCUMENT instance to an RXI-DOCUMENT
; instance.
;
(define (rxi-document/load pathname)
  (rxi-document/transform-from-xml
    (call-with-input-file pathname
      (lambda (port)
        (parse-xml-document (input-port->parser-buffer port))))))

;
; An RXI-REVERSE-BINDINGS structure consists of a REVERSE-BINDINGS slot
; that contains an association list whose keys are XMLNS namespace URIs and
; whose values are XMLNS name prefixes. The URI component of a reverse
; binding entry MUST be a non-empty string.
;
(define-structure
  (rxi-reverse-bindings
    (conc-name rxi-reverse-bindings/)
    (constructor make-rxi-reverse-bindings (#!optional reverse-bindings)))
  (reverse-bindings '() read-only #f))

(define (rxi-reverse-bindings/lookup reverse-bindings uri)
  (if (and (string? uri)
           (not (string-null? uri)))
      (let find
          ((rb (rxi-reverse-bindings/reverse-bindings reverse-bindings)))
        (cond ((null? rb)
               '())
              (else
               (let
                   ((b (car rb)))
                 (if (string=? (car b) uri)
                     (cdr b)
                     (find (cdr rb)))))))
      (error "non-string or empty XMLNS namespace URI" uri)))

(define (rxi-reverse-bindings/generate-prefix reverse-bindings)
  (let ((g (lambda () (string-downcase (symbol-name (generate-uninterned-symbol)))))
        (rb (rxi-reverse-bindings/reverse-bindings reverse-bindings)))
    (let loop
        ((pfx '()))
      (cond ((null? pfx)
             (loop (g)))
            (else
             (if (not (find-matching-item
                        rb
                        (lambda (b)
                          (and (string? (cdr b)) (string=? (cdr b) pfx)))))
                 pfx
                 (loop (g))))))))

(define (rxi-reverse-bindings/add! reverse-bindings uri pfx)
  (set-rxi-reverse-bindings/reverse-bindings!
    reverse-bindings
    (cons (cons uri pfx) (rxi-reverse-bindings/reverse-bindings reverse-bindings))))
  
(define (rxi-reverse-bindings/sort! reverse-bindings)
  (let
      ((rb (rxi-reverse-bindings/reverse-bindings reverse-bindings)))
    (set-rxi-reverse-bindings/reverse-bindings!
      reverse-bindings
      (sort rb
            (lambda (x y)
              (string<? (cdr x) (cdr y)))))))

(define (rxi-reverse-bindings/normalize-preferred preferred-reverse-bindings)
  (let ((rbt (make-string-hash-table (length preferred-reverse-bindings)))
        (xrb *xml-default-reverse-binding*))
    (let loop
        ((prb preferred-reverse-bindings))
      (cond ((null? prb)
             (if (not (hash-table/get rbt (car xrb) #f))
                 (hash-table/put! rbt (car xrb) (cdr xrb)))
             (hash-table->alist rbt))
            (else
             (let ((b (car prb)))
               (if (not (pair? b))
                   (error "preferred reverse binding not a pair" b)
                   (let ((u (car b))
                         (p (cdr b)))
                     (if (not (hash-table/get rbt u #f))
                         (hash-table/put! rbt u p))
                     (loop (cdr prb))))))))))

;
; Transform an RXI-NAME instance NAME to an XML name IQNAME as defined by the
; XML package as an uninterned symbol, where IS-ATTRIBUTE? indicates whether
; the IQNAME is the name of an attribute or an element, and where REVERSE-BINDINGS
; is the current reverse bindings.
;
(define (rxi-name/transform-to-xml name is-attribute? reverse-bindings)
  (let ((uri (rxi-name/namespace name))
        (loc (rxi-name/local name)))
    (xml-intern
      (if (null? uri)
          loc
          (let ((pfx (rxi-reverse-bindings/lookup reverse-bindings uri)))
            (if (string-null? pfx)
                loc
                (string-append
                  pfx
                  (string-append ":" loc))))))))
  
;
; Transform RXI-ATTRIBUTE instance ATTRIBUTE to XML-ATTRIBUTE instance.
;
(define (rxi-attribute/transform-to-xml attribute reverse-bindings)
  (cons
    (rxi-name/transform-to-xml (rxi-attribute/name attribute) #t reverse-bindings)
    (rxi-attribute/value attribute)))

(define (maybe-add-reverse-binding! reverse-bindings name)
  (let ((uri (rxi-name/namespace name)))
    (if (not (null? uri))
        (if (not (rxi-reverse-bindings/lookup reverse-bindings uri))
            (rxi-reverse-bindings/add! reverse-bindings uri (rxi-reverse-bindings/generate-prefix reverse-bindings))))))

(define (rxi-element/collect-reverse-bindings element reverse-bindings)
  ;; collect element's binding
  (maybe-add-reverse-binding! reverse-bindings (rxi-element/name element))
  ;; collect attribute reverse-bindings
  (let ((attributes (rxi-element/attributes element)))
    (for-each
      (lambda (a)
        (maybe-add-reverse-binding! reverse-bindings (rxi-attribute/name a)))
      attributes))
  ;; collect childrens' reverse bindings
  (let ((children (rxi-element/children element)))
    (for-each 
      (lambda (c)
        (if (not (string? c))
            (rxi-element/collect-reverse-bindings c reverse-bindings)))
      children)))

;
; Transform RXI-ELEMENT instance ELEMENT to XML-ELEMENT instance.
;
(define (rxi-element/transform-to-xml element reverse-bindings)
  (make-xml-element
    (rxi-name/transform-to-xml (rxi-element/name element) #f reverse-bindings)
    (map
      (lambda (a)
        (rxi-attribute/transform-to-xml a reverse-bindings))
      (rxi-element/attributes element))
    (map
      (lambda (c)
        (if (string? c)
            c
            (rxi-element/transform-to-xml c reverse-bindings)))
      (rxi-element/children element))))

;
; Add XMLNS attributes that correspond with REVERSE-BINDINGS to the root
; element of XML-DOCUMENT instance DOCUMENT. If DOCUMENT has no root
; element, then do nothing.
;
(define (xml-document-add-bindings! document reverse-bindings)
  (let ((root (xml-document-root document)))
    (if (not (null? root))
        (set-xml-element-attributes!
          root
          (append
            (xml-element-attributes root)
            (map
              (lambda (b)
                (let*
                    ((prefix (cdr b))
                     (ns-attr-name
                       (if (string-null? prefix)
                           "xmlns"
                           (string-append "xmlns:" prefix))))
                  (cons (xml-intern ns-attr-name) (car b))))
              (rxi-reverse-bindings/reverse-bindings reverse-bindings)))))))
  
;
; Collect 
;
(define (rxi-document/collect-reverse-bindings document reverse-bindings)
  (let ((root (rxi-document/root document)))
    (if (not (null? root))
        (rxi-element/collect-reverse-bindings root reverse-bindings))
    (rxi-reverse-bindings/sort! reverse-bindings)
    reverse-bindings))

;
; Transform RXI-DOCUMENT instance DOCUMENT to XML-DOCUMENT instance.
;
(define (rxi-document/transform-to-xml document preferred-reverse-bindings)
  (let
      ((reverse-bindings
         (make-rxi-reverse-bindings
           (rxi-reverse-bindings/normalize-preferred preferred-reverse-bindings))))
    (rxi-document/collect-reverse-bindings document reverse-bindings)
    (let
        ((xml-document
          (make-xml-document
           '()                          ; declaration
           '()                          ; misc-1
           '()                          ; dtd
           '()                          ; misc-2
           (rxi-element/transform-to-xml
             (rxi-document/root document) reverse-bindings)
           '())))                       ; misc-3
      (xml-document-add-bindings! xml-document reverse-bindings)
      xml-document)))

;
; Save RXI-DOCUMENT instance DOCUMENT by transforming to an XML-DOCUMENT
; instance and serializing to PATHNAME using XML package's document serializer,
; where optional argument PREFERRED-REVERSE-BINDINGS, if specified, consists
; of an association list whose keys are namespace URIs and values are the
; preferred namespace prefixes to use to designate those namespaces.
;
; If a namepsace URI appears in DOCUMENT and it has no preferred binding
; specified, then a prefix is generated unless the namespace URI is
; "http://www.w3.org/XML/1998/namespace", in which case the prefix "xml" is
; used.
;
(define (rxi-document/save document pathname #!optional preferred-reverse-bindings)
  (let
      ((xml-document
         (rxi-document/transform-to-xml
          document
          (if (default-object? preferred-reverse-bindings)
              '()
              preferred-reverse-bindings))))
    (call-with-output-file pathname
      (lambda (port)
        (write-xml xml-document port)))))

G.2 Abstract Document Instance (ADI) – ADI.SCM

;;; -*-Scheme-*-
;;; Package: (dfxp rxi adi)

;
; DFXP Abstract Document Instance Load, Save, Transformer
;

(declare (usual-integrations))

(define *dfxp-preferred-reverse-bindings*
  '(("http://www.w3.org/2006/10/ttaf1" . "")
    ("http://www.w3.org/2006/10/ttaf1#parameter" . "ttp")
    ("http://www.w3.org/2006/10/ttaf1#style" . "tts")
    ("http://www.w3.org/2006/10/ttaf1#style-extension" . "ttsx")
    ("http://www.w3.org/2006/10/ttaf1#metadata" . "ttm")
    ("http://www.w3.org/2006/10/ttaf1#metadata-extension" . "ttmx")))

(define *dfxp-namespaces-table*
  (let ((t (make-string-hash-table)))
    (for-each
      (lambda (b)
        (hash-table/put! t (car b) #t))
      *dfxp-preferred-reverse-bindings*)
    t))

(define *dfxp-empty-element-types*
  '(("br" . "http://www.w3.org/2006/10/ttaf1")
    ("metadata" . "http://www.w3.org/2006/10/ttaf1")))

(define (in-per-element-namespace? attr)
  (let* ((name (rxi-attribute/name attr))
         (namespace (rxi-name/namespace name)))
    (null? namespace)))

(define (in-dfxp-namespace? name)
  (hash-table/get *dfxp-namespaces-table* (rxi-name/namespace name) #f))

(define (in-xml-namespace? name)
  (string=? (rxi-name/namespace name) (car *xml-default-reverse-binding*)))

(define (in-dfxp-or-xml-namespace? name)
  (or (in-dfxp-namespace? name)
      (in-xml-namespace? name)))

(define (empty-dfxp-element-type? elt)
  (let* ((name (rxi-element/name elt))
         (local (rxi-name/local name))
         (namespace (rxi-name/namespace name)))
    (find-matching-item
      *dfxp-empty-element-types*
      (lambda (n)
        (and (string=? local (car n))
             (string=? namespace (cdr n)))))))
                        
(define (only-whitespace-children? elt)
  (let ((children (rxi-element/children elt)))
    (not
      (find-matching-item
        children
        (lambda (c)
          (or (not (string? c))
              (string-find-next-char-in-set c char-set:not-whitespace)))))))

(define (rxi-document/adi-transform-element elt)
  ;; prune and transform children
  (set-rxi-element/children!
    elt
    (delete-matching-items
      (map
        (lambda (c)
          (if (string? c)
              c
              (if (not (in-dfxp-namespace? (rxi-element/name c)))
                  '()
                  (rxi-document/adi-transform-element c))))
        (rxi-element/children elt))
      null?))
  ;; prune remaining children if empty element type and only whitespace remains
  (if (and (empty-dfxp-element-type? elt)
           (only-whitespace-children? elt))
      (set-rxi-element/children! elt '()))
  ;; prune foreign namespace attributes
  (set-rxi-element/attributes!
    elt
    (delete-matching-items
      (rxi-element/attributes elt)
      (lambda (a)
          (not (or (in-per-element-namespace? a)
                   (in-dfxp-or-xml-namespace? (rxi-attribute/name a)))))))
  elt)

(define (rxi-document/adi-transform document)
  (if (not (null? (rxi-document/annotation document 'adi-transform)))
      (warn "Document already transformed, ignoring re-transform.")
      (let ((root (rxi-document/root document)))
        (set-rxi-document/root! document (rxi-document/adi-transform-element root))
        (set-rxi-document/annotation! document 'adi-transform #t)))
  document)
  
;
; Load TT AF document instance from PATHNAME using RXI loader,
; then transform resulting RXI-DOCUMENT instance to an ADI-DOCUMENT
; instance.
;
(define (adi-document/load pathname)
  (rxi-document/adi-transform
    (rxi-document/load pathname)))

;
; Save ADI-DOCUMENT instance DOCUMENT, which was created by ADI-DOCUMENT/LOAD,
; to PATHNAME using underlying RXI-DOCUMENT's document serializer,
; where optional argument OTHER-REVERSE-BINDINGS, if specified, consists
; of an association list whose keys are namespace URIs and values are the
; namespace prefixes to use to designate those namespaces.
;
; By default the set of refeverse bindings defined by *DFXP-PREFERRED-REVERSE-BINDING*
; are used when serializaing. However, reverse bindings specified by using
; OTHER-REVERSE-BINDINGS take precedence, overriding default reverse bindings.
;
(define (adi-document/save document pathname #!optional other-reverse-bindings)
  (rxi-document/save document pathname
    (if (default-object? other-reverse-bindings)
        *dfxp-preferred-reverse-bindings*
        (append other-reverse-bindings *dfxp-preferred-reverse-bindings*))))

G.3 Time Interval Resolver (TIR) – TIR.SCM

;;; -*-Scheme-*-
;;; Package: (dfxp rxi adi tir)

;;;; DFXP Timing Interval Resolver

(declare (usual-integrations))

;
; NOT YET IMPLEMENTED - TO BE PROVIDED PRIOR TO PROPOSED RECOMMENDATION PHASE
;

(define (adi-document/tir-transform document) document)

G.4 Flow Object Transformer (FOX) – FOX.SCM

;;; -*-Scheme-*-
;;; Package: (dfxp rxi adi tir)

;;;; DFXP Timing Interval Resolver

(declare (usual-integrations))

;
; NOT YET IMPLEMENTED - TO BE PROVIDED PRIOR TO PROPOSED RECOMMENDATION PHASE
;

(define (adi-document/tir-transform document) document)

G.5 Dynamic Text Flow Processor (DTF) – DTF.SCM

;;; -*-Scheme-*-
;;; Package: (dfxp rxi adi tir dtf)

;;;; Dynamic Text Flow Processor

(declare (usual-integrations))

;
; NOT YET IMPLEMENTED - TO BE PROVIDED PRIOR TO PROPOSED RECOMMENDATION PHASE
;

(define (adi-document/dtf-process document) document)

G.6 Sample Compile, Load, and Run Session

The following transcript shows a sample compile, load, and run session of the sample code, where the following steps are performed:

  1. Start scheme using Edwin editor (included with MIT Scheme).

  2. Change working directory to sample code directory.

  3. Compile DFXP optional package by loading compile.scm.

  4. Load DFXP optional package by loading load.scm.

  5. Dump world identity to show that the just compiled, DFXP optional package has been loaded (MIT Scheme SOS, CREF, and XML optional packages are also loaded a side effect.)

  6. Load DFXP document instance using ADI-DOCUMENT/LOAD function and save resulting ADI-DOCUMENT instance into variable D.

  7. Convert loaded ADI-DOCUMENT into a list structure and pretty print this structure using PP environment function.

  8. Serialize loaded ADI-DOCUMENT to file out.xml.

  9. Exit scheme interpreter.

The forms to be entered to accomplish the above tasks are depicted in boldface.

Scheme saved on Tuesday June 18, 2002 at 12:25:05 AM
  Release 7.7.1
  Microcode 14.9
  Runtime 15.1
  Win32 1.6
  SF 4.40
  Liar (Intel i386) 4.115
  Edwin 3.112
;You are in an interaction window of the Edwin editor.
;Type C-h for help.  C-h m will describe some commands.
;Package: (user)
(cd "/work/dfxp/scm")
;Value 12: #[pathname 12 "c:\\work\\dfxp\\scm\\"]
(load "compile")
;Loading "compile.scm"
;Loading "load.scm"
;Loading "load.scm"
;Loading "sos-w32.pkd" -- done
;Loading "slot.com" -- done
;Loading "class.com" -- done
;Loading "instance.com" -- done
;Loading "method.com" -- done
;Loading "printer.com" -- done
;Loading "macros.com" -- done
 -- done
;Loading "xml-w32.pkd" -- done
;Loading "xml-struct.com" -- done
;Loading "xml-chars.com" -- done
;Loading "xml-parser.com" -- done
;Loading "xml-output.com" -- done
 -- done
;Loading "make.com" -- done
;Loading "cref-w32.pkd" -- done
;Loading "mset.com" -- done
;Loading "object.com" -- done
;Loading "toplev.com" -- done
;Loading "anfile.com" -- done
;Loading "conpkg.com" -- done
;Loading "forpkg.com" -- done
;Loading "redpkg.com" -- done
;Generating "rxi.bin" because of: "rxi.scm"
Syntax file: "rxi.scm" "rxi.bin"
    Read...
      Time taken: .031 (process time); .031 (real time)
    Syntax...
      Time taken: .032 (process time); .031 (real time)
    Transform...
      Time taken: 0. (process time); 0. (real time)
    Optimize...
;Warning: Unreferenced bound variable: is-attribute? (rxi-name/transform-to-xml)
      Time taken: .015 (process time); .016 (real time)
    Generate SCode...
      Time taken: 0. (process time); 0. (real time)
;Dumping "rxi.ext" -- done
;Dumping "rxi.bin" -- done
;Generating "rxi.com" because of: "rxi.bin"
Compile File: "rxi.bin" => "rxi.com"
;Loading "rxi.bin" -- done
    Compiling procedure: rxi-bindings/bindings...
    Compiling procedure: set-rxi-bindings/bindings!...
    Compiling procedure: rxi-bindings/push!...
    Compiling procedure: rxi-bindings/pop!...
    Compiling procedure: rxi-bindings/lookup...
    Compiling procedure: rxi-bindings/resolve...
    Compiling procedure: rxi-name/local...
    Compiling procedure: rxi-name/namespace...
    Compiling procedure: rxi-name->list...
    Compiling procedure: rxi-name/transform-from-xml...
    Compiling procedure: rxi-attribute/name...
    Compiling procedure: rxi-attribute/value...
    Compiling procedure: rxi-attribute->list...
    Compiling procedure: rxi-attribute/transform-from-xml...
    Compiling procedure: rxi-element/name...
    Compiling procedure: rxi-element/attributes...
    Compiling procedure: rxi-element/children...
    Compiling procedure: set-rxi-element/attributes!...
    Compiling procedure: set-rxi-element/children!...
    Compiling procedure: rxi-element->list...
    Compiling procedure: namespace-attribute?...
    Compiling procedure: extract-namespace-bindings...
    Compiling procedure: rxi-element/transform-from-xml...
    Compiling procedure: rxi-document/annotations...
    Compiling procedure: rxi-document/root...
    Compiling procedure: set-rxi-document/annotations!...
    Compiling procedure: set-rxi-document/root!...
    Compiling procedure: rxi-document/annotation...
    Compiling procedure: set-rxi-document/annotation!...
    Compiling procedure: rxi-document/remove-annotation!...
    Compiling procedure: rxi-document->list...
    Compiling procedure: rxi-document/transform-from-xml...
    Compiling procedure: rxi-document/load...
    Compiling procedure: rxi-reverse-bindings/reverse-bindings...
    Compiling procedure: set-rxi-reverse-bindings/reverse-bindings!...
    Compiling procedure: rxi-reverse-bindings/lookup...
    Compiling procedure: rxi-reverse-bindings/generate-prefix...
    Compiling procedure: rxi-reverse-bindings/add!...
    Compiling procedure: rxi-reverse-bindings/sort!...
    Compiling procedure: rxi-reverse-bindings/normalize-preferred...
    Compiling procedure: rxi-name/transform-to-xml...
    Compiling procedure: rxi-attribute/transform-to-xml...
    Compiling procedure: maybe-add-reverse-binding!...
    Compiling procedure: rxi-element/collect-reverse-bindings...
    Compiling procedure: rxi-element/transform-to-xml...
    Compiling procedure: xml-document-add-bindings!...
    Compiling procedure: rxi-document/collect-reverse-bindings...
    Compiling procedure: rxi-document/transform-to-xml...
    Compiling procedure: rxi-document/save...
;"rxi.bci" dumped 
;Dumping "rxi.com" -- done
;Generating "adi.bin" because of: "adi.scm"
Syntax file: "adi.scm" "adi.bin"
    Read...
      Time taken: 0. (process time); 0. (real time)
    Syntax...
      Time taken: 0. (process time); 0. (real time)
    Transform...
      Time taken: .016 (process time); .015 (real time)
    Optimize...
      Time taken: 0. (process time); 0. (real time)
    Generate SCode...
      Time taken: 0. (process time); 0. (real time)
;Dumping "adi.bin" -- done
;Generating "adi.com" because of: "adi.bin"
Compile File: "adi.bin" => "adi.com"
;Loading "adi.bin" -- done
    Compiling procedure: in-per-element-namespace?...
    Compiling procedure: in-dfxp-namespace?...
    Compiling procedure: in-xml-namespace?...
    Compiling procedure: in-dfxp-or-xml-namespace?...
    Compiling procedure: empty-dfxp-element-type?...
    Compiling procedure: only-whitespace-children?...
    Compiling procedure: rxi-document/adi-transform-element...
    Compiling procedure: rxi-document/adi-transform...
    Compiling procedure: adi-document/load...
    Compiling procedure: adi-document/save...
;"adi.bci" dumped 
;Dumping "adi.com" -- done
;Generating "tir.bin" because of: "tir.scm"
Syntax file: "tir.scm" "tir.bin"
    Read...
      Time taken: 0. (process time); 0. (real time)
    Syntax...
      Time taken: 0. (process time); 0. (real time)
    Transform...
      Time taken: 0. (process time); 0. (real time)
    Optimize...
      Time taken: 0. (process time); 0. (real time)
    Generate SCode...
      Time taken: 0. (process time); 0. (real time)
;Dumping "tir.bin" -- done
;Generating "tir.com" because of: "tir.bin"
Compile File: "tir.bin" => "tir.com"
;Loading "tir.bin" -- done
    Compiling procedure: adi-document/tir-transform...
;"tir.bci" dumped 
;Dumping "tir.com" -- done
;Generating "fox.bin" because of: "fox.scm"
Syntax file: "fox.scm" "fox.bin"
    Read...
      Time taken: 0. (process time); 0. (real time)
    Syntax...
      Time taken: 0. (process time); 0. (real time)
    Transform...
      Time taken: 0. (process time); 0. (real time)
    Optimize...
      Time taken: 0. (process time); 0. (real time)
    Generate SCode...
      Time taken: 0. (process time); 0. (real time)
;Dumping "fox.bin" -- done
;Generating "fox.com" because of: "fox.bin"
Compile File: "fox.bin" => "fox.com"
;Loading "fox.bin" -- done
    Compiling procedure: adi-document/fox-transform...
;"fox.bci" dumped 
;Dumping "fox.com" -- done
;Generating "dtf.bin" because of: "dtf.scm"
Syntax file: "dtf.scm" "dtf.bin"
    Read...
      Time taken: 0. (process time); 0. (real time)
    Syntax...
      Time taken: 0. (process time); 0. (real time)
    Transform...
      Time taken: 0. (process time); 0. (real time)
    Optimize...
      Time taken: 0. (process time); 0. (real time)
    Generate SCode...
      Time taken: 0. (process time); 0. (real time)
;Dumping "dtf.bin" -- done
;Generating "dtf.com" because of: "dtf.bin"
Compile File: "dtf.bin" => "dtf.com"
;Loading "dtf.bin" -- done
    Compiling procedure: adi-document/dtf-process...
;"dtf.bci" dumped 
;Dumping "dtf.com" -- done
;Loading "dtf.bin" -- done
;Loading "fox.bin" -- done
;Loading "tir.bin" -- done
;Loading "adi.bin" -- done
;Loading "rxi.bin" -- done
;Dumping "dfxp-w32.fre" -- done
;Dumping "dfxp-w32.pkd" -- done
 -- done
;Unspecified return value
(load "load")
;Loading "load.scm"
;Loading "dfxp-w32.pkd" -- done
;Loading "rxi.com" -- done
;Loading "adi.com" -- done
;Loading "tir.com" -- done
;Loading "fox.com" -- done
;Loading "dtf.com" -- done
 -- done
;Unspecified return value
(identify-world)
Scheme saved on Tuesday June 18, 2002 at 12:25:05 AM
  Release 7.7.1
  Microcode 14.9
  Runtime 15.1
  Win32 1.6
  SF 4.40
  Liar (Intel i386) 4.115
  Edwin 3.112
  SOS 1.7
  XML 0.2
  CREF 2.3
  DFXP 0.8
;Unspecified return value
(define d (adi-document/load "test.xml"))
;Value: d
(pp (rxi-document->list d))
(((adi-transform . #t))
 (("tt" "http://www.w3.org/2006/10/ttaf1")
  ((("profile" "http://www.w3.org/2006/10/ttaf1#parameter")
    "http://www.w3.org/2006/10/ttaf1#profile-dfxp")
   (("lang" "http://www.w3.org/XML/1998/namespace") "en"))
  ("\n  "
   (("head" "http://www.w3.org/2006/10/ttaf1")
    ()
    ("\n    "
     (("metadata" "http://www.w3.org/2006/10/ttaf1")
      ()
      ("\n      "
       (("title" "http://www.w3.org/2006/10/ttaf1#metadata") () ("Timed Text DFXP Example"))
       "\n      "
       (("copyright" "http://www.w3.org/2006/10/ttaf1#metadata") () ("The Authors (c) 2006"))
       "\n    "))
     "\n    "
     (("styling" "http://www.w3.org/2006/10/ttaf1")
      ()
      ("\n      \n      "
       (("style" "http://www.w3.org/2006/10/ttaf1")
        ((("xml:id" ()) "s1")
         (("color" "http://www.w3.org/2006/10/ttaf1#style") "white")
         (("fontFamily" "http://www.w3.org/2006/10/ttaf1#style") "proportionalSansSerif")
         (("fontSize" "http://www.w3.org/2006/10/ttaf1#style") "22px")
         (("textAlign" "http://www.w3.org/2006/10/ttaf1#style") "center"))
        ())
       "\n      \n      "
       (("style" "http://www.w3.org/2006/10/ttaf1")
        ((("xml:id" ()) "s2") (("style" ()) "s1")
                          (("color" "http://www.w3.org/2006/10/ttaf1#style") "yellow"))
        ())
       "\n      \n      "
       (("style" "http://www.w3.org/2006/10/ttaf1")
        ((("xml:id" ()) "s1Right") (("style" ()) "s1")
                               (("textAlign" "http://www.w3.org/2006/10/ttaf1#style") "end"))
        ())
       "     \n      \n      "
       (("style" "http://www.w3.org/2006/10/ttaf1")
        ((("xml:id" ()) "s2Left") (("style" ()) "s2")
                              (("textAlign" "http://www.w3.org/2006/10/ttaf1#style") "start"))
        ())
       "\n    "))
     "\n    "
     (("layout" "http://www.w3.org/2006/10/ttaf1")
      ()
      ("\n      "
       (("region" "http://www.w3.org/2006/10/ttaf1")
        ((("xml:id" ()) "subtitleArea")
         (("style" ()) "s1")
         (("extent" "http://www.w3.org/2006/10/ttaf1#style") "560px 62px")
         (("padding" "http://www.w3.org/2006/10/ttaf1#style") "5px 3px")
         (("backgroundColor" "http://www.w3.org/2006/10/ttaf1#style") "black")
         (("displayAlign" "http://www.w3.org/2006/10/ttaf1#style") "after"))
        ())
       "\n    "))
     "  \n  "))
   "\n  "
   (("body" "http://www.w3.org/2006/10/ttaf1")
    ((("region" ()) "subtitleArea"))
    ("\n    "
     (("div" "http://www.w3.org/2006/10/ttaf1")
      ()
      ("\n      "
       (("p" "http://www.w3.org/2006/10/ttaf1")
        ((("xml:id" ()) "subtitle1") (("begin" ()) "0.76s") (("end" ()) "3.45s"))
        ("\n        It seems a paradox, does it not,\n      "))
       "\n      "
       (("p" "http://www.w3.org/2006/10/ttaf1")
        ((("xml:id" ()) "subtitle2") (("begin" ()) "5.0s") (("end" ()) "10.0s"))
        ("\n        that the image formed on" (("br" "http://www.w3.org/2006/10/ttaf1") () ())
                                              "\n        the Retina should be inverted?\n      "))
       "\n      "
       (("p" "http://www.w3.org/2006/10/ttaf1")
        ((("xml:id" ()) "subtitle3") (("begin" ()) "10.0s") (("end" ()) "16.0s") (("style" ()) "s2"))
        ("\n        It is puzzling, why is it" (("br" "http://www.w3.org/2006/10/ttaf1") () ())
                                               "\n        we do not see things upside-down?\n      "))
       "\n      "
       (("p" "http://www.w3.org/2006/10/ttaf1")
        ((("xml:id" ()) "subtitle4") (("begin" ()) "17.2s") (("end" ()) "23.0s"))
        ("\n        You have never heard the Theory,"
         (("br" "http://www.w3.org/2006/10/ttaf1") () ())
         "\n        then, that the Brain also is inverted?\n      "))
       "\n      "
       (("p" "http://www.w3.org/2006/10/ttaf1")
        ((("xml:id" ()) "subtitle5") (("begin" ()) "23.0s") (("end" ()) "27.0s") (("style" ()) "s2"))
        ("\n        No indeed! What a beautiful fact!\n      "))
       "\n      "
       (("p" "http://www.w3.org/2006/10/ttaf1")
        ((("xml:id" ()) "subtitle6a") (("begin" ()) "28.0s") (("end" ()) "34.6s") (("style" ()) "s2Left"))
        ("\n        But how is it proved?\n      "))
       "\n      "
       (("p" "http://www.w3.org/2006/10/ttaf1")
        ((("xml:id" ()) "subtitle6b") (("begin" ()) "28.0s") (("end" ()) "34.6s") (("style" ()) "s1Right"))
        ("\n        Thus: what we call\n      "))
       "\n      "
       (("p" "http://www.w3.org/2006/10/ttaf1")
        ((("xml:id" ()) "subtitle7") (("begin" ()) "34.6s") (("end" ()) "45.0s") (("style" ()) "s1Right"))
        ("\n        the vertex of the Brain" (("br" "http://www.w3.org/2006/10/ttaf1") () ())
                                             "\n        is really its base\n      "))
       "\n      "
       (("p" "http://www.w3.org/2006/10/ttaf1")
        ((("xml:id" ()) "subtitle8") (("begin" ()) "45.0s") (("end" ()) "52.0s") (("style" ()) "s1Right"))
        ("\n        and what we call its base" (("br" "http://www.w3.org/2006/10/ttaf1") () ())
                                               "\n        is really its vertex,\n      "))
       "\n      "
       (("p" "http://www.w3.org/2006/10/ttaf1")
        ((("xml:id" ()) "subtitle9a") (("begin" ()) "53.5s") (("end" ()) "58.7s"))
        ("\n        it is simply a question of nomenclature.\n      "))
       "\n      "
       (("p" "http://www.w3.org/2006/10/ttaf1")
        ((("xml:id" ()) "subtitle9b") (("begin" ()) "53.5s") (("end" ()) "58.7s") (("style" ()) "s2"))
        ("\n        How truly delightful!\n      "))
       "\n    "))
     "    \n  "))
   "\n")))
;Unspecified return value
(adi-document/save d "out.xml")
;Unspecified return value
(exit)

H Requirements (Non-Normative)

The Distribution Format Exchange Profile (DFXP) of the Timed Text Authoring Format (TT AF) satisfies a subset of the requirements established by [TTAF1-REQ]. The following table enumerates these requirements and indicates the extent to which they are satisfied by this specification, where S denotes a requirement is satisfied, P denotes a requirement is partially satisfied, and N denotes a requirement is not satisfied.

Table H-1 – Requirement Satisfaction
ID Name Status Comments
R100 Specification Format S
R101 Specification Modularity S
R102 Specification Organization S
R103 Core and Periphery S TT extension namespaces
R104 Evolution of Core S TT extension namespaces
R105 Ownership of Core S TT namespaces
R106 Surjection of Core S
R107 Evolution of Periphery S TT extension namespaces
R108 Ownership of Periphery S Non-TT namespaces
R109 Transformation S Supports 3GPP, QText, RealText, SAMI
R110 Streamable Transformation S Progressive decoding
R111 Accessibility – Content S Alternative document instances
R112 Accessibility – Authoring System S
R200 Authorability S
R201 Multiple Natural Languages S Alternative document instances
R202 Natural Language Coverage S Unicode 4.0
R203 Natural Language Association Granularity S See xml:lang
R204 Minimum Character Representability S Unicode 4.0
R205 Intrinsic and Extrinsic Text Content P Intrinsic only
R206 Markup Association P Intrinsic only
R207 Conditional Content N
R208 Flowed Text S
R209 Logical Flowed Text Vocabulary S
R210 Presentational Flowed Text Vocabulary S Implied mapping from logical flowed text.
R211 Flowed Text Vocabulary Relationship S
R212 Flowed Text Vocabulary Separation N
R213 Non-Flowed Text N
R214 Non-Flowed Text Vocabulary N
R215 Hybrid Flowed and Non-Flowed Text N
R216 Hyperlinking N Can support via XLink
R217 Embedded Graphics N
R218 Non-Embedded Graphics N
R219 Embedded Fonts N
R220 Non-Embedded Fonts N
R221 Descriptive Vocabulary S See ttm:agent, ttm:role
R222 Embedded Audio N
R223 Non-Embedded Audio N
R290 Markup Format S
R291 Markup Format and Unicode Interaction S
R292 Extrinsic Resource References N No extrinsic references
R293 Schema Validity Specification S
R300 Inline Styling S
R301 Inline Styling Form P Inline and referential styling
R301 Out-of-Line Styling N
R301 Out-of-Line Styling Form N
R304 Styling Prioritization S
R305 Style Parameters – Aural N
R306 Style Parameters – Visual P Supports absolute position, background color, color, display none, display alignment, font family, font size, font style, font weight, height, line height, origin, opacity, overflow, padding (before, after, start, end), text alignment, text shadow (as outline), visibility, width, writing mode, z-index
R307 Style Parameters – Temporal Fill Mode S See tts:dynamicFlow
R390 Style Parameter Symmetry S
R391 Style Parameter Definitions S
R392 Style Parameter Shorthands S
R401 Inline Timing S
R402 Out-of-Line Timing N
R403 Synchronization Parameters P Supports begin, end, dur
R404 Synchronization Parameter Value Spaces P Supports offset values, media marker values (SMPTE 12M), wallclock values
R405 Time Containment Semantics P Supports sequential, parallel
R500 Animation Modes P Supports discrete
R501 Scroll Animation S See tts:dynamicFlow
R502 Highlight Animation S <set tts:backgroundColor="..."/>
R503 Fade Transition Animation S <set tts:opacity="..."/>
R504 Animated Style Parameters – Aural N
R505 Animated Style Parameters – Visual P Supports animating background color, color, display, opacity, origin, visibility
N506 Animated Content S
R600 Metadata Item Association S See metadata, Metadata.class
R601 Metadata Item Constituents P Supports name, value
R602 Metadata Item Value Representation P See metadata
R603 Metadata Item Extensibility S See metadata
R604 Metadata Item Validation S See metadata
R690 Dublin Core Preference N Uses ttm:copyright, ttm:desc, ttm:title

I Vocabulary Derivation (Non-Normative)

This appendix provides information about the derivation of TT AF vocabulary, separately describing derivation of elements and attributes.

I.1 Element Derivation

The first column of Table I-1 – Elements specifies a TT AF element vocabulary item; the second column specifies the syntactic and/or semantic model on which the vocabulary item is based; the third column specifies the reference that defines the model (if a model is indicated); the fourth column specifies details about the derivation; the last column refers to additional notes describing the nature of the derivation.

In the fourth column, which describes details of derivation, a notation is use to indicate the addition or removal of an attribute. For example, in the derivation of the tt:div element, the details column includes "-@class", which denotes that the class attribute that is specified for use with the xhtml:div model element is not specified for use with the corresponding TT AF element; in contrast, the details column includes "+@begin", which denotes that a begin attribute is added that is not specified for use with the xhtml:div model element.

Table I-1 – Elements
Element Model Reference Details Notes
tt:body xhtml:body [XHTML 1.0] -@class, -@dir, -@lang, -@on*, -@title; +@begin, +@dur, +@end, +@region, +@timeContainer, +@ttm:*, +@tts:*; content model subsetted to zero or more division (div) children, and supersetted by optional metadata and animation children 1,2
tt:br xhtml:br [XHTML 1.0] -@class, -@title; +@ttm:*, +@tts:*, +@xml:lang, +@xml:space; content model supersetted by optional metadata and animation children for congruity with other content vocabulary 1,2
tt:div xhtml:div [XHTML 1.0] -@class, -@dir, -@lang, -@on*, -@title; +@begin, +@dur, +@end, +@region, +@timeContainer, +@ttm:*, +@tts:*, +@xml:space; content model subsetted to zero or more paragraph (p) children, and supersetted by optional metadata and animation children 1,2,3
tt:head xhtml:head [XHTML 1.0] -@dir, -@lang, -@profile; +@id, +@xml:space; content model changed to optional metadata children, followed by optional styling child, followed by optional layout child 1,3
tt:layout fo:simple-page-master [XSL 1.0] conceptual derivation 4
tt:metadata svg:metadata [SVG 1.1] -@xml:base; +@ttm:*, +@xml:lang, +@xml:space; content model subsetted to foreign namespace element content only (no #PCDATA) 3,5
tt:p xhtml:p [XHTML 1.0] -@class, -@dir, -@lang, -@on*, -@title; +@begin, +@dur, +@end, +@region, +@timeContainer, +@ttm:*, +@tts:*, +@xml:space; content model subsetted to zero or more span children, and supersetted by optional metadata and animation children 1,2,3
tt:region fo:region-* [XSL 1.0] conceptual derivation 4
tt:set svg:set [SVG 1.1] -@* except begin, dur, end; +@tts:*, +@xml:lang, +@xml:space 3,6
tt:span xhtml:span [XHTML 1.0] -@class, -@dir, -@lang, -@on*, -@title; +@begin, +@dur, +@end, +@region, +@timeContainer, +@ttm:*, +@tts:*, +@xml:space; content model subsetted to zero or more #PCDATA or break (br) children, and supersetted by optional metadata and animation children 1,2,3
tt:style style specification [CSS2] XML representation of identified set of pairs of style property name and value, with optional inclusion of other styles by reference to other style elements 7
tt:styling xhtml:style [XHTML 1.0] XML representation of a set of style specifications sets, each represented by a style child element 1,7
tt:tt xhtml:html [XHTML 1.0] -@dir, -@lang; +@id, +@ttp:*, +@xml:space; content model subsetted by permitting body and/or head to be optional 1,8
ttm:actor mpeg7:Creator [MPEG7-5] conceptual derivation 4
ttm:agent mpeg7:Agent [MPEG7-5] conceptual derivation 4
ttm:copyright mpeg7:CopyrightString [MPEG7-5] conceptual derivation 4
ttm:desc svg:desc [SVG 1.1] -@class, -@style, -@xml:base 2,5,9
ttm:name mpeg7:Name [MPEG7-5] conceptual derivation 4
ttm:title svg:title [SVG 1.1] -@class, -@style, -@xml:base 2,5,9

Note:

  1. Derivation is indicated with respect to the strict DTD defined by [XHTML 1.0], §A.1.

  2. The class attribute is effectively replaced by the style attribute, which, instead of specifying an inline style, refers indirectly to one or more style elements that define a set of style specification sets.

  3. The xml:lang and xml:space attributes are defined for all element types in order to support their inheritance semantics to operate in the context of foreign namespace elements.

  4. Derivation is conceptual (notional) only.

  5. The xml:base attribute is not used since there are no external references from core vocabulary.

  6. The attributeName and to attributes of svg:set are replaced by the direct expression of the target attribute name and value by use of a tts:* attribute.

  7. CSS style specification syntax is mapped to XML by use of attributes defined in the TT Style Namespace.

  8. The xml:id attribute is defined for use on all element types.

  9. The style attribute is supported only on content elements.

I.2 Attribute Derivation

The first column of Table I-2 – Attributes specifies a TT AF attribute vocabulary item; the second column specifies the syntactic and/or semantic model on which the vocabulary item is based; the third column specifies the reference that defines the model (if a model is indicated); the fourth column specifies details about the derivation; the last column refers to additional notes describing the nature of the derivation.

In the fourth column, which describes details of derivation, a notation is use to indicate the addition or removal of an attribute value. For example, in the derivation of the timeContainer attribute, the details column includes "-excl", which denotes that the excl value that is specified for use with the timeContainer model attribute is not specified for use with the corresponding TT AF attribute; similarly, an "+value" in the details column indicates that the attribute's values have been extended to include value.

Only those attributes that are specified for use on more than one TT AF element type are listed below. Those per-element namespace attributes that are uniquely defined for a specific TT AF element type are not listed below, but are considered to be part of the specific element type's derivation described in Table I-1 – Elements above.

Table I-2 – Attributes
Attribute Model Reference Details Notes
begin begin [SMIL 2.1] see notes 2,3,4
dur dur [SMIL 2.1] see notes 2,3,4
end end [SMIL 2.1] see notes 2,3,4
region master-reference [XSL 1.0] conceptual derivation
style class [CSS2] dereferences style specification(s) directly
timeContainer timeContainer [SMIL 2.1] -excl, -none; no default attribute value 5
ttm:agent none used to attribute agent of content
ttm:role none used to attribute role of content
ttp:cellResolution none expresses uniform grid resolution for cell based coordinates
ttp:clockMode none determines how to interpret time expressions
ttp:frameRate none expresses integral frame rate
ttp:frameRateMultiplier none used to express non-integral, rational frame rates
ttp:markerMode none expresses marker continuity semantics
ttp:pixelAspectRatio none expresses pixel aspect ratio of related media
ttp:profile none expresses profile of TT AF used by document instance
ttp:smpteMode none expresses frame counting (drop) modes
ttp:subFrameRate none expresses sub-frame rate
ttp:tickRate none used to interpret tick based time expressions
ttp:timeBase none used to interpret semantics of time expressions
tts:backgroundColor background-color [XSL 1.0] see notes 1,6
tts:color color [XSL 1.0] initial value specified as transparent 6
tts:direction direction [XSL 1.0] complies with model
tts:display display [CSS2] only auto, none, inherit
tts:displayAlign display-align [XSL 1.0] except for name normalization, complies with model 1
tts:dynamicFlow none defines scroll overflow behavior
tts:extent width, height [XSL 1.0] shorthand property
tts:fontFamily font-family [XSL 1.0] extends generic family names 1
tts:fontSize font-size [XSL 1.0] see notes 1,7
tts:fontStyle font-style [XSL 1.0] uses alias reverseOblique for backslant 1
tts:fontWeight font-weight [XSL 1.0] -bolder, -lighter, -<number> 1
tts:lineHeight line-height [XSL 1.0] -<number>, -<space> 1
tts:opacity opacity [CSS3 Color] complies with model
tts:origin top, left [XSL 1.0] shorthand property
tts:overflow overflow [XSL 1.0] -auto, -error-if-overflow; scroll redefined 8
tts:padding padding [XSL 1.0] see notes 9
tts:showBackground showBackground [SMIL 2.1] complies with model
tts:textAlign text-align [XSL 1.0] except for name normalization, complies with model 1
tts:textDecoration text-decoration [XSL 1.0] except for name normalization, complies with model 1,10
tts:textOutline text-shadow [XSL 1.0] see notes 11
tts:unicodeBidi unicode-bidi [XSL 1.0] except for name normalization, complies with model 1
tts:visibility visibility [XSL 1.0] -collapse
tts:wrapOption wrap-option [XSL 1.0] except for name normalization, complies with model 1
tts:writingMode writing-mode [XSL 1.0] +tblr 1
tts:zIndex z-index [XSL 1.0] except for name normalization, complies with model 1
xml:id xml:id [XML ID] complies with model
xml:lang xml:lang [XML 1.1] complies with model
xml:space xml:space [XML 1.1] see notes 12

Note:

  1. Attribute name and/or value(s) are normalized to use lowerCamelCase naming convention.

  2. Restricted to expressing a clock value that denotes one of the following in accordance to whether the parameter expressed by the ttp:timeBase attribute is media, smpte, or clock, respectively: (1) an offset from an implicit syncbase that is linked to a media time line, (2) an event time that represents the occurrence of an implicit media marker, or (3) a wallclock time.

  3. Syntactically subsets and supersets the [SMIL 2.1] Clock-value syntax as follows: (1) requires non-negative Full-clock-value or Timecount-value; (2) if Full-clock-value then hours must be two or more digits; (3) if Timecount-value, then metric must be specified; (4) uses m as alias for min metric to denote minutes; (5) adds f and t metrics denoting frames and ticks, respectively; (6) adds alternative expression of optional Fraction in Full-clock-value by specifying frame count or frame count with subframe count.

  4. Interpretation of time expression is further constrained by parameters expressed by ttp:clockMode, ttp:frameRate, ttp:frameRateMultiplier, ttp:markerMode, ttp:smpteMode, ttp:subFrameRate, ttp:tickRate, and ttp:timeBase attributes.

  5. Uses subset of named colors from model to which two aliases are added as follows: magenta as fuchsia, and cyan as aqua.

  6. If not specified, then parallel (par) container semantics apply to the element types specified by 10.2.4 timeContainer.

  7. Restricts size to length specification which can be a percentage; adds optional second length (or percentage) for specifying separate horizontal and vertical scaling of glyph's EM square.

  8. The value scroll is defined in terms of the tts:dynamicFlow style property.

  9. Expressed in terms of writing mode relative padding properties rather than absolute padding properties.

  10. Excludes blink and no-blink values.

  11. Uses only one length specification instead of two, where one length defines distance of outline effect from nominal edge of glyph contour outline perpendicular to point of glyph contour. Percentage lengths are also added to express outline effect in relative to font size. Outline effects are intended to be drawn both outside of outer closed contours and inside of inner closed contours.

  12. On root element, default attribute value specified as default, which is defined in terms of whitespace normalization. Semantics of preservation and default normalization are defined in terms of presentation semantics by 7.2.3 xml:space.

J QA Framework Compliance (Non-Normative)

This appendix specifies the compliance of this specification with the requirements and guidelines defined by QA Framework Specifications Guidelines [QAF SG].

J.2 Guidelines

Table J-2 – QA Framework Guidelines Checklist
Guideline YES NO N/A Notes
Good Practice 01: Define the specification's conformance model in the conformance clause. YES
Good Practice 02: Specify in the conformance clause how to distinguish normative from informative content. YES
Good Practice 03: Provide the wording for conformance claims. YES
Good Practice 04: Provide an Implementation Conformance Statement Pro Forma. NO
Good Practice 05: Require an Implementation Conformance Statement as part of valid conformance claims. YES
Good Practice 06: Provide examples, use cases, and graphics. YES
Good Practice 07: Write sample code or tests. YES
Good Practice 08: When imposing requirements by normative references, address conformance dependencies. YES 1
Good Practice 09: Define unfamiliar terms in-line and consolidate the definitions in a glossary section. YES
Good Practice 10: Use terms already defined without changing their definition. YES 2
Good Practice 11: Use formal languages when possible. YES
Good Practice 12: Write Test Assertions. NO 3
Good Practice 13: Create subdivisions of the technology when warranted. YES
Good Practice 14: If the technology is profiled, define rules for creating new profiles. YES
Good Practice 15:Use optional features as warranted. YES
Good Practice 16: Clearly identify optional features. YES
Good Practice 17: Indicate any limitations or constraints on optional features. YES
Good Practice 18: If extensibility is allowed, define an extension mechanism. YES
Good Practice 19: Warn extension creators to create extensions that do not interfere with conformance. YES
Good Practice 20: Define error-handling for unknown extensions. YES 4
Good Practice 21: Explain how to avoid using a deprecated feature. N/A 5
Good Practice 22: Identify obsolete features. N/A 5
Good Practice 23: Define an error handling mechanism. YES

Note:

  1. When making normative references to external specifications, specific clauses or sections are cited.

  2. See also I Vocabulary Derivation.

  3. Test assertions and test suites will be provided prior to entering Proposed Recommendation (PR) phase.

  4. See criterion #3 in 3.2 Processor Conformance and definition of TT AF Abstract Document Instance.

  5. No feature is deprecated or obsoleted by this version of this specification.

K Streaming DFXP Content (Non-Normative)

DFXP Content is designed to support streamability by implementing the following properties:

One possible means by which DFXP Content may be streamed is to partition a DFXP document instance's information set into non-overlapping fragments, where one particular fragment, call it the root fragment, represents the front matter (head) of the document instance as well as its top level structural elements, and other fragments represent content whose time intervals are expected to be active in parallel.

In applications that require arbitrary (random) entry into a stream, i.e., the property of being able to start reading data at an arbitrary data access unit, the root fragment will be repetitively transmitted (inserted) into the stream in order to permit a decoder to resynchronize and acquire sufficient structural information in the information set in order to interpret subsequent content fragments.

An example of such a fragmentation of a DFXP document instance is shown in Figure 2 – Fragment Streaming.

Figure 2 – Fragment Streaming
Fragment Streaming

Note:

This specification does not define a transport buffer model or a decoder capabilities model.

L Acknowledgments (Non-Normative)

The editor acknowledges the members of the Timed Text Working Group, the members of other W3C Working Groups, and industry experts in other forums who have contributed directly or indirectly to the process or content of creating this document.

The current and former members of the Timed Text Working Group are: Glenn Adams, Extensible Formatting Systems, Inc. (chair); Kees Blom, CWI; Brad Botkin, WGBH National Center for Accessible Media; Dick Bulterman, CWI; Michael Dolan, Invited Expert; Gerry Fields, WGBH (formerly); Geoff Freed, WGBH National Center for Accessible Media; Markus Gylling, DAISY Consortium; Markku Hakkinen, Japanese Society for Rehabilitation of Persons with Disabilities; Sean Hayes, Microsoft; Erik Hodge, RealNetworks; Masahiko Kaneko, Microsoft; George Kerscher, DAISY Consortium; David Kirby, BBC; Thierry Michel, W3C (team contact); Patrick Schmitz, Invited Expert; and, Dave Singer, Apple Computer.

The editor wishes to especially acknowledge the following contributions by members: Micheal Dolan (SMPTE time codes, streaming; SMPTE liaison), David Kirby (introductory example document; SMPTE time codes, descriptive metadata; EBU/AAF liaison), Geoff Freed (styling and example images of style properties), Sean Hayes (advanced profile concepts, including applicative timing), Eric Hodge (timing), Thierry Michel (metadata), and Dave Singer (animation, scrolling).

The Timed Text Working Group has benefited in its work from the participation and contributions of a number of people not currently members of the Working Group, including in particular those named below. Affiliations given are those current at the time of their work with the WG.

John Birch, Screen Subtitling Systems; Bert Bos, W3C (chair, CSS WG); Martin Dürst, W3C (leader, I18N Activity); Al Gilman (chair, WAI Protocol and Formats WG); Philipp Hoschka, W3C (leader, Interaction Domain); Chris Lilley, W3C (chair, SVG WG).

The editor wishes to especially acknowledge the following contributions by non-members: John Birch (dynamic flow).

M Change History (Non-Normative)

M.1 Changes from First to Second Last Call Working Draft

Technical Changes

The following changes result in a technical change of the conformance
criteria, the normative abstract document type that is defined
for use with DFXP, or the defined value space of an attribute or
property:

* Update namespace URIs to use 2006/04 instead of 2004/11;
* Remove ttp:defaultLengthUnit definition and all references;
  + change initial (default) value definition of tts:fontSize to
    be 1/24th of the height of the root container in all cases;
  + change syntax of scalar form of <length> to require units
* Remove ttp:defaultTimeMetric definition and all references;
  + change syntax of <duration> to require a metric
* Add "transcription" to ttm:role enumeration in section 12.2.2;
* In section 8.2.16, change "dynamic" value to read "scroll" instead,
  which is already defined by CSS/XSL and given UA dependent
  semantics; here we will specify fixed semantics and map to dynamic
  flow; change also usage in 8.1.7 to refer to "scroll";
* In section 6.2.1, change implied default value of ttp:cellResolution
  from 1col/1row to 32cols/15rows, based on CEA/EIA-608-C maximum values;
* In 8.3.12, add "cyan" and "magenta" as aliases for "aqua" and
  "fucshia", since it turns out these are defined by SVG1.0;
* Add following new values for ttm:role to support EIA/CEA-708 caption
  text functions: dialog, expletive, narration, quality, source,
  suppressed; remove associated editorial note;
* In 3.1, add new conformance criteria item 1 that specifies the use
  of application/ttaf+xml as MIME media type with optional "profile"
  parameter; use new references to MIME and XML Media Types;
* Remove begin, dur, and end attributes and descriptions thereof from
  <tt/> and <layout/>;
* Move description of tts:extent attribute from <tt/> to
  <body/>;
* Change "meta" element name to "metadata" to match SVG usage, on
  which this vocabulary item is modeled;
* Remove name attribute from <metadata/> element;
* Change initial (default) value definition of tts:fontSize to
  be 1c (one grid cell) in order to match implied default value for
  ttp:cellResolution row count;
* For sake of symmetry, add Metadata.class and Animation.class children to
  content model of <br/>;
* Add style, ttm:*, tts:* and foreign namespace attributes to
  <br/>;
* Add usage of tts:padding property that takes three length specifications;
* Add left and right values to textAlign;
* Add monospace, serif, and sansSerif to generic font family names;
* Add missing "auto" value to zIndex, and make "auto" initial value
  in order to comply with XSL/CSS usage;
* Add means to specify rate (in units per second) to definition of
  flowIntervalArguments in section 8.3.8;
* Populate Appendix B on Dynamic Flow Processing which defines normative
  semantics (previously unspecified);

Editorial Changes

The following changes are editorial in nature or entail semantic
clarifications that do not affect the abstract document type or defined
schemas for DFXP:

* Add "Contributing Authors" to preamble, listing contributors;
* Merge current and former members description in Appendix H (now
  Appendix K);
* Remove references to AFXP as follows:
  + remove 1st note in section 1
  + remove 1st note in section 1.1
  + remove definition of AFXP from glossary
  + remove section 4.2
  + remove AFXP profile entry from Table 2 - Profiles
  + remove reference to 2nd catalog in section 5.3 preamble
  + remove last clause of 2nd para of section 5.3
  + change "AFXP" to "future profiles" in 1st para of section 5.3.1
  + remove section 5.3.2
  + remove last sentence of 2nd note in section 7.1.4
  + remove last sentence of 1st note in section 7.1.6
  + change "AFXP" to "advanced profiles" in 3rd para of Appendix H (now
  Appendix K);
* Add clarifying language in the last para of section 8.3.6;
* Clarify definition of "Valid Abstract Document Instance" in section 4
  to account for the pruning of attributes in other namespaces and
  residual requirements on the presence and value type of attributes;
  + remove redundant definition in glossary to prevent competing
    definitions
* Add informative reference to SMPTE170M (for NTSC); add a
  reference to this bibliographic entry from the 1st note under
  section 6.2.4; add new sentence to this same note indicating
  that other frame rate multipliers apply in other regions and
  with other video formats;
* Add normative reference to UAAG; add recommendation in
  conformance clause 3.2 item (5) that a presentation processor
  should satisfy UAAG defined guidelines;
* Add note in introduction expressing that a related sign language
  representation may be appropriate in some circumstances, but that
  this is not addressed explicitly by DFXP;
* Add note in section 6.2.11 indicating that control over state of
  external media time base is outside the scope of DFXP;
* Add note in section 5.2 indicating possible uses of profile
  information;
* Fix typos:
  + section 6.2.1: s/express number/express the number/
  + section 6.2.5 (now 6.2.3): s/in document/in a document/
  + section 6.2.6 (now 6.2.4): s/MHz/Hz/
* Add note to 6.2.2 referring to section 10.3 Time Value Expressions;
* Add normative reference to UTC, using reference in section 6.2.2;
* Add normative reference to GPS, using reference in section 6.2.2;
* Add note to 6.2.2 summarizing difference between GPS and UTC;
* Add para to 6.2.2 clarifying that ttp:clockMode is significant
  only on <tt/> element;
* In section 8.3.11, add or refer to definitions of "px", "em", and
  "c";
* In section 7.2.3, replace definition of semantics of xml:space
  values with a new definition that maps to XSL-FO properties;
* In section 9.3.2, add new item (8) that specifies mapping for
  <br/> elements to <fo:character/>;
* In section 4, add new step 2 to definition of Abstract Document
  Instance, which is needed to remove certain XML whitespace that
  remains after pruning elements; e.g., a <br/> element may have
  children from another namespace, that, after pruning, would result
  in a non-empty <br/> element; this new step ensures that the
  element is emptied prior to validation against its abstract
  document type;
* In section 8 preamble, add new para indicating that no normative
  use of a stylesheet PI is defined;
* In section 8.2.16, add condition tts:wrapOption="noWrap" in note;
* In section 8.2.22, move visibility="hidden" from <p/> to <span/>s;
  otherwise, content would remain hidden due to <p/> being hidden;
* Add informative reference to CEA/EIA-608-C; use this reference
  in a new note in 6.2.1;
* Add note in 6.2.1 explaining that it is not expected that glyph
  areas align with uniform grid defined by ttp:cellResolution,
  indicate that such alignment would occur only when using monospace
  font whose EM square exactly matches grid's cell size;
* Add normative reference to SRGB definition;
* Add normative use of SRGB in section 8.3.2 <color> and 8.3.12 <namedColor>
* In 8.3.2, add para indicating that SRGB is used for both input and
  output of notional composition functions; add note indicating that
  a presentation processor may actually use another color space for
  internal or external purposes;
* In 8.2.14, specify that opacity applies on a linear scale;
* Add informative reference to SVG 1.0;
* Add note in 8.3.12 indicating that named color set is a strict
  subset of SVG 1.0 named color set;
* Add empty informative Appendices H, I, and L, to document Vocabulary
  Derivation, QA Framework Compliance, and Change History,
  respectively; renumber former appendices G and H as Appendices J
  and K, respectively;
* Add normative reference to RFC2046, MIME Media Types;
* Add normative reference to RFC3023, XML Media Types;
* Change description of implied begin/end on <tt/> to refer to
  external context temporal interval;
* Change description of implied begin/end on <body/> to refer to
  external time interval;
* In 7.1.2, 8.1.1, and 9.1.1, specify that implied time intervals of
  head, styling, and layout are coterminous with external time
  interval;
* In 9.1.2, indicate that begin/end points specified on <region/>
  are relative to the time interval of the nearest ancestor associated
  with a time interval;
* In 9.1.2, remove constraint that if no tts:extent is specified in
  computed style set then no content is flowed into region; this
  constraint is redundant since the initial value of tts:extent is
  "auto" which is defined to be extent of root container;
* Fix typos:
  + section 9.1.2, s/layout/region/ in para describing dur attribute;
* Add note at end of the preamble to section 8.2, [Styling] Attribute
  Vocabulary, indicating that (to support inheritance) any style
  property may be specified on any content element independently of
  whether it applies to that element;
* Remove note in 7.1.7 that indicated that <br/> is empty in
  the reduced XML infoset, which no longer holds as both metadata and
  animation children may be present;
* In Appendix I, add table I-1 with element vocabulary derivation;
* Define monospace to be either serifed or not; define serif and
  sansSerif to be equivalent to proportionalSerif and proportionalSansSerif,
  respectively;
* Add time metric to time expressions in example content;
* Add definition of implicit duration of document instance in section 7.1.1;
* In definition of <time-expression> syntax in section 10.3.1,
  remove paragraph referring to default time metric, which no longer
  applies now that time metric must be specified;
* In Appendix I, add table I-2 with attribute vocabulary derivation;
* Add definition of percentage lengths to each style property
  definition. Percentages apply to the following styles: extent,
  fontSize, lineHeight, origin, padding, and textOutline;
* Fill in Appendix I with QA Framework compliance information;
* Add section 5.3.2 defining a presently empty "Extension Catalog"
  that serves as a placeholder for future standardized extensions and
  additionally specifies that document instance may contain arbitrary
  namespace qualified elements and attributes from other namespaces;
* Add section 3.3 defining conformance claims and requirements
  regarding for providing an implementation compliance statement;
* Add hyperlinks throughout document for references to elements,
  attributes, and value expressions;
* Add new Appendix F containing sample code and sample compile,
  load, run session transcript;
* Change IDREF to IDREFS as value of ttm:agent as found in prose in
  section 12.2.1;

M.2 Changes from Second Last Call Working Draft to Candidate Recommendation

Technical Changes

The following changes result in a technical change of the conformance
criteria, the normative abstract document type that is defined
for use with DFXP, or the defined value space of an attribute or
property:

* Restore support for nested div and span elements [that had
  been removed in an early working draft].
* Change "id" attribute to "xml:id".
* Add tts:textDecoration style property.
* Update namespace URIs to use 2006/10 instead of 2006/04.
* Update profile URIs to use 2006/10 instead of 2006/04.

Editorial Changes

The following changes are editorial in nature or entail semantic
clarifications that do not affect the abstract document type, defined
schemas, or conformance criteria for DFXP:

* Update "status of this document" (SOTD) section to
  reflect CR transition.
* Add normative reference to xml:id recommendation.
* Add note in section 9.3.3 indicating that intermediate document
  examples are internal processing states and do not represent
  valid DFXP documents.
* Add "Except for transparent, " to note in section 8.3.12.
* Add recommendation, in section 3.1 item 5, that conformant
  reduced infoset "should" adhere to WCAG1.0.
* Add normative reference to WCAG1.0.
* Update informative reference to SVG1.0 to reference SVG1.1
  instead.
* Insert new (normative) Appendix D that specifies the
  MIME Media Type registration information for application/ttaf+xml.
* Add normative reference to RFC3023 tagged as [XML Media Types],
  for use by new Appendix D.
* Normalize and add missing dates of W3C Recs cited in
  Appendices E (References) and F (Other References).
* In Table 4, express groups as choice lists instead of
  sequences (which might have been confusing).
* Revise content models of XML Representation of div, p,
  and span element information items in order to make
  reference to Block.class and Inline.class element
  groups.
* Add "This appendix is normative" to beginning of each
  normative appendix.
* Add clarifications in sections 8.3.13 and 8.3.14 that
  syntactic element "char" adheres to production [2] of
  XML1.1, while syntactic element "S" adheres to
  production [3] of XML1.1.
* Add note to section 7.1.7 (and rearrange paragraph ordering)
  to indicate that two <br> elements are intended to
  produce two forced line breaks in a sequence.
* Add note to section 6.2.4 that indicates that PAL
  formatted video nominally uses a 1:1 frame rate multiplier
  (except for PAL/M).
* Add note to end of section 9.3.2 that indicates that a
  compliant XSL1.0 presentation processor may be insufficient
  to satisfy the presentation semantics of DFXP.
* Clarify syntax of <alpha> style value expression to
  use XML Scheme Datatype lexical representation of xs:float,
  which was the intended syntactic value space for this
  expression.
* Clarify that ttp:cellResolution columns or rows must not be zero
  if present.
* Clarify that ttp:frameRate must be greater than zero if present.
* Clarify that ttp:frameRateMultipler denominator must not be zero
  if present. Correct misspelling "demoninator".
* Clarify that ttp:pixelAspectRatio width or height must not be zero
  if present.
* Clarify that ttp:subFrameRate must not be zero if present.
* Clarify that ttp:tickRate must not be zero if present.
* Remove superfluous end tag close (>) in XML representation of
  metadata element information item in section 12.1.1.
* Add clarification that the declared value of an inline style
  attribute on body, region, and style elements must not be "inherit".
* Add clarification in section 8.5.1 item 2 that use of value
  "inherit" does not apply if element is body element.
* Clarify that tt element establishes the root stacking context
  for the purpose of interpreting the tts:zIndex style property;
  this corresponds with the prescribed mapping of tt:tt to fo:root
  as described in section 9.3.2 item 3.
* Clarify that ttp:{markerMode,smpteMode,tickRate,timeBase} are
  significant only when specified on tt element.
* Add note at end of section 8.2.17 that padding style attribute
  is based on XSL 1.0 shorthand "padding" property except that
  the individual values map to writing mode relative padding
  properties, i.e., padding-before, padding-after, etc.
* Update attribute derivation table (Appendix I.2) to reflect
  addition of tts:textDecoration and change from id to xml:id.
* Update publishing date and dates in SOTD CR publication.
* Update SOTD to remove use of sample code as satisfying 2
  implementation convention for exit criteria. Note that sample
  code can still serve as 1 implementation of 2 required.
* Add paragraph to SOTD describing unsatisfied comments during
  first LC.
* Change "reference code" to read "sample code".