W3C

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

W3C Working Draft 26 October 2004

This version:
http://www.w3.org/TR/2004/WD-ttaf1-dfxp-20041026/
Latest version:
http://www.w3.org/TR/ttaf1-dfxp/
Editor:
Glenn Adams, Extensible Formatting Systems, Inc. <glenn@xfsi.com>

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.

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 document is a public W3C Working Draft for review by W3C members and other interested parties. Publication as a Working Draft 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.

This is the First Public Working Draft of the Timed Text (TT) Authoring Format 1.0 – Distribution Format Exchange Profile (DFXP).

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

Feedback 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 was produced under the W3C's Current Patent Practice, dated 24 January 2002. as amended by the W3C Patent Policy Transition Procedure. The Working Group maintains a public list of patent disclosures relevant to this document; 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) with respect to this specification should disclose the information in accordance with section 6 of the W3C Patent Policy.

Table of Contents

1 Introduction
    1.1 Document Example
    1.2 Vocabulary Namespaces
    1.3 Vocabulary Overview
2 Definitions
    2.1 Acronyms
    2.2 Terminology
    2.3 Documentation Conventions
3 Conformance
    3.1 Content Conformance
    3.2 Processor Conformance
4 Content
    4.1 Element Vocabulary
        4.1.1 tt
        4.1.2 head
        4.1.3 body
        4.1.4 div
        4.1.5 p
        4.1.6 span
        4.1.7 br
    4.2 Attribute Vocabulary
        4.2.1 id
        4.2.2 xml:lang
        4.2.3 xml:space
5 Styling
    5.1 Element Vocabulary
        5.1.1 styling
        5.1.2 style
    5.2 Attribute Vocabulary
        5.2.1 style
        5.2.2 tts:background-color
        5.2.3 tts:color
        5.2.4 tts:display-align
        5.2.5 tts:extent
        5.2.6 tts:font-family
        5.2.7 tts:font-size
        5.2.8 tts:font-style
        5.2.9 tts:font-weight
        5.2.10 tts:line-height
        5.2.11 tts:origin
        5.2.12 tts:overflow
        5.2.13 tts:text-align
        5.2.14 tts:text-outline
        5.2.15 tts:wrap-option
        5.2.16 tts:writing-mode
        5.2.17 tts:z-index
    5.3 Style Value Expressions
        5.3.1 <color>
        5.3.2 <digit>
        5.3.3 <family-name>
        5.3.4 <generic-family-name>
        5.3.5 <hex-digit>
        5.3.6 <integer>
        5.3.7 <length>
        5.3.8 <named-color>
        5.3.9 <quoted-string>
        5.3.10 <string>
    5.4 Style Association
        5.4.1 Inline Styling
        5.4.2 Referential Styling
        5.4.3 Chained Referential Styling
    5.5 Style Inheritance
        5.5.1 Content Style Inheritance
        5.5.2 Region Style Inheritance
6 Layout
    6.1 Element Vocabulary
        6.1.1 layout
        6.1.2 region
    6.2 Attribute Vocabulary
        6.2.1 region
    6.3 Line Layout
    6.4 Region Layout and Presentation
7 Timing
    7.1 Element Vocabulary
    7.2 Attribute Vocabulary
        7.2.1 begin
        7.2.2 end
        7.2.3 dur
        7.2.4 timeAction
        7.2.5 timeContainer
    7.3 Time Value Expressions
        7.3.1 <media-marker-expression>
        7.3.2 <media-time-expression>
        7.3.3 <smpte-frame-label>
        7.3.4 <smpte-marker-expression>
        7.3.5 <time-expression>
    7.4 Time Intervals
8 Metadata
    8.1 Element Vocabulary
        8.1.1 meta
        8.1.2 ttm:title
        8.1.3 ttm:desc
        8.1.4 ttm:copyright
        8.1.5 ttm:agent
        8.1.6 ttm:name
        8.1.7 ttm:actor
    8.2 Attribute Vocabulary
        8.2.1 ttm:agent
        8.2.2 ttm:cell-resolution
        8.2.3 ttm:content-extent
        8.2.4 ttm:content-origin
        8.2.5 ttm:default-time-metric
        8.2.6 ttm:frame-extent
        8.2.7 ttm:frame-origin
        8.2.8 ttm:frame-rate
        8.2.9 ttm:pixel-aspect-ratio
        8.2.10 ttm:role

Appendices

A Schemas (Normative)
    A.1 Relax NG Schema
        A.1.1 Driver
        A.1.2 Modules
            A.1.2.1 Classes Module
            A.1.2.2 Content Module
            A.1.2.3 Core Attributes Module
            A.1.2.4 Data Types Module
            A.1.2.5 Document Module
            A.1.2.6 Header Module
            A.1.2.7 Layout Module
            A.1.2.8 Metadata Module
            A.1.2.9 Metadata Items Module
            A.1.2.10 Metadata Attributes Module
            A.1.2.11 Styling Attributes Module
            A.1.2.12 Styling Module
            A.1.2.13 Timing Attributes Module
    A.2 XML Schema Definition (XSD) Schema
        A.2.1 Driver
        A.2.2 Modules
B References (Normative)
C Other References (Non-Normative)
D Acknowledgments (Non-Normative)


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.

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

Note:

It is intended that a more feature-rich profile, known presently as the Authoring Format Exchange Profile (AFXP), be developed and published to address the full set of documented requirements.

1.1 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/2004/10/ttaf1">
  <head>
    <meta/>
    <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
<meta xmlns:ttm="http://www.w3.org/2004/10/ttaf1#metadata">
  <ttm:title>Timed Text DFXP Example</ttm:title>
  <ttm:copyright>The Authors (c) 2004</ttm:copyright>
</meta>

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, five 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/2004/10/ttaf1#styling">
  <!-- s1 specifies default color, font, and text alignment -->
  <style id="s1"
    tts:color="white"
    tts:font-family="proportional-sans-serif"
    tts:font-size="22px"
    tts:text-align="center"
  />
  <!-- alternative using yellow text but otherwise the same as style s1 -->
  <style id="s2" style="s1" tts:color="yellow"/>
  <!-- a style based on s2 but justified to the right -->
  <style id="s2Right" style="s2" tts:text-align="after" />     
  <!-- alternative using green text but otherwise the same as style s1 -->
  <style id="s3" style="s1" tts:color="green" />          
  <!-- a style based on s3 but justified to the left -->
  <style id="s3Left" style="s3" tts:text-align="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/2004/10/ttaf1#styling">
  <region id="subtitleArea"
    style="s1"
    tts:extent="560px;62px"
    tts:background-color="black"
    tts:display-align="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 id="subtitle1" begin="0.76" end="2.45">
      I see Lisa's moving in then?
    </p>
    <p id="subtitle2" begin="5.0" end="10.0">
      Nothing gets past you does it?
    </p>
    <p id="subtitle3" begin="10.0" end="13.0" style="s2">
      What's with all this car business?
    </p>
    <p id="subtitle4" begin="15.2" end="18.0">
      Dad's setting up on his own.
    </p>
    <p id="subtitle5" begin="19.0" end="25.0">
      He's got to shift<br/>
      these for his cash flow.
    </p>
    <p id="subtitle6a" begin="30.0" end="36.6" style="s3Left">
      Hey, come on slave, stop slacking.
    </p>
    <p id="subtitle6b" begin="30.0" end="36.6" style="s2Right">
      Watch it you.
    </p>
    <p id="subtitle7a" begin="39.0" end="45.0" style="s3">
      Mel, race you to the front door.
    </p>
    <p id="subtitle7b" begin="39.0" end="45.0" style="s2Right">
      Right, you're on.
    </p>
    <p id="subtitle8" begin="47.3" end="49.0">
      Lisa!
    </p>
  </div>    
</body>

The first subtitle Subtitle 1 – Time Interval [0.76, 2.45) is presented during the time interval 0.76 to 2.45 seconds. In this example, the default units for time are seconds since no ttm:default-time-metric metadata attribute is specified in the document. 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.

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

The second subtitle uses the same style as the first subtitle, and is presented during the interval starting at 5.0 seconds and continuing to 10.0 seconds. Since no time container attribute is specified, the division and each paragraph have parallel time containment semantics, which means that the begin and end times specified on each subtitle paragraph are relative to the start of their parent division's time interval.

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. Note that content is presented at the bottom (after edge) of the containing region due to the tts:display-align="after" being specified on the region definition.

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

The fourth subtitle reverts to the default style.

Subtitle 4 – Time Interval [15.2, 18.0)
Subtitle 4

The fifth 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:text-align="center" to specify the paragraph's alignment in the inline progression direction.

Subtitle 5 – Time Interval [19.0, 25.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 the appear in the content hierarchy.

Subtitles 6a and 6b – Time Interval [30.0, 36.6)
Subtitles 6a and 6b

The next subtitles follow the same pattern except that the first subtitle specifies a different style override, resulting in a paragraph centered in the inline progression direction.

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

The final (eighth) subtitle removes all style overrides and does not temporally overlap any other content elements.

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

The examples shown above demonstrate the primary types of information that may be authored using the 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.

1.2 Vocabulary Namespaces

The namespace URIs specified in this section are normative.

The DFXP 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 DFXP 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/2004/10/ttaf1
TT Style tts: http://www.w3.org/2004/10/ttaf1#style
TT Style Extension ttsx: http://www.w3.org/2004/10/ttaf1#style-extension
TT Metadata ttm: http://www.w3.org/2004/10/ttaf1#metadata
TT Metadata Extension ttmx: http://www.w3.org/2004/10/ttaf1#metadata-extension

Editorial note: GA 2004-10-25
The namespace URIs specified above are expected to change prior to final publishing of this specification, and, therefore, should be treated as provisional. In particular, the embedded year (2004) may change and the embedded month (10) will be removed.

1.3 Vocabulary Overview

The vocabulary categories and identifiers specified in this section are normative.

This section provides an overview of the element and attribute vocabulary defined for use with the DFXP. In addition, certain tokens used to specify groups of elements or attributes are defined herein.

The element vocabulary specified for use with the DFXP is enumerated in Table 2 – Element Vocabulary.

Table 2 – Element Vocabulary
Module Elements
Content body, div, p, span, br
Document tt
Head head
Layout layout, region
Metadata meta
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 DFXP element types are enumerated in Table 3 – Element Vocabulary Groups.

Table 3 – Element Vocabulary Groups
Group Elements
Block.class div, p
Inline.class span
Meta.class meta, ttm:copyright, ttm:desc, ttm:title

The attribute vocabulary specified for use with the DFXP is enumerated in Table 4 – Attribute Vocabulary.

Table 4 – Attribute Vocabulary
Module Attributes
Core Attributes id, xml:lang, xml:space
Layout region
Metadata Attributes ttm:agent, ttm:cell-resolution, ttm:content-extent, ttm:content-origin, ttm:default-time-metric, ttm:frame-rate, ttm:frame-extent, ttm:pixel-aspect-ratio, ttm:role
Styling style
Styling Attributes tts:background-color, tts:color, tts:display-align, tts:extent, tts:font-family, tts:font-size, tts:font-style, tts:font-weight, tts:line-height, tts:origin, tts:overflow, tts:text-align, tts:text-outline, tts:wrap-option, tts:writing-mode, tts:z-index
Timing Attributes begin, end, dur, timeContainer, timeAction

2 Definitions

2.1 Acronyms

AFXP

Authoring Format Exchange Profile

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

Attribute Information Item

Each specified or defaulted attribute of an XML document corresponds with an attribugte 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.

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.

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 DFXP processors are permitted to, but need not behave as described.

should

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

must

Conforming documents and/or DFXP 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 below; 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.

Editorial note: GA 2004-10-25
Either need to add hyperlinks to instances of element names that appear in a grammar fragment as described above or to remove the last sentence of the above paragraph.

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/2004/10/ttaf1">
  <head>
    <meta/>
    <styling/>
    <layout/>
  </head>
  <body/>
</tt>

Editorial notes are shown with a light brown background and include the label "Editorial Note", such as in the following:

Editorial note: GA 2004-10-25
Remove all editorial notes and the above paragraph prior to final publishing of this document.

3 Conformance

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

3.1 Content Conformance

Editorial note: GA 2004-10-25
Need to specify normative DFXP content representation conformance requirements.

3.2 Processor Conformance

Editorial note: GA 2004-10-25
Need to specify normative DFXP processor conformance requirements.

4 Content

This section specifies the content matter of the DFXP.

4.1 Element Vocabulary

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

  • tt

  • head

  • body

  • div

  • p

  • span

  • br

4.1.1 tt

The tt element serves as the root, document element of a DFXP 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
  id = ID
  xml:lang = string
  xml:space = (default|preserve)>
  Content: head?, body?
</tt>

An xml:lang attribute must be specified on the tt element. If the attribute value is empty, it signfies that there is no default language that applies 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.

Editorial note: GA 2004-10-25
Need to define semantics of default value for xml:space attribute.

Editorial note: GA 2004-10-25
Consider adding a profile attribute in order to allow (or require) author to specify the TT AF profile with which the content conforms. The value of this attribute may be a profile specific URI, such as http://www.w3.org/2004/10/ttaf1#profile-dfxp.

4.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 Meta.class element group, followed by zero or one styling element, followed by zero or one layout element.

Any metadata specified by children in the Meta.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
  id = ID
  xml:lang = string
  xml:space = (default|preserve)>
  Content: Meta.class*, styling?, layout?
</head>

4.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 Meta.class element group, followed by zero or more div elements.

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

XML Representation – Element Information Item: body
<body
  begin = <time-expression>
  dur = <time-expression>
  end = <time-expression>
  id = ID
  region = IDREF
  style = IDREFS
  timeAction = (display|visiblity)
  timeContainer = (par|seq)
  xml:lang = string
  xml:space = (default|preserve)
  {any attribute in TT Style namespace ...}
  {any attribute not in default or any TT namespace ...}>
  Content: Meta.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 containing timed text media, as determined by an external application or presentation. Similarly, if the end point of this interval remains unspecified, then the end point is interpreted as the end point of the containing timed text media, as determined by an external application or presentation. The temporal begin and end points determined by an external application or presentation are referred to subsequently as the external time interval.

Note:

If a DFXP document instance is referenced by a SMIL presentation, then the active time interval specified by that presentation determines the external time interval of the DFXP document instance.

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 the DFXP 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.

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 to a body element in a DFXP document instance are available for style inheritence by descendant content elements such as div, p, and span.

4.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 Meta.class element group, followed by zero or more p elements.

Note:

The DFXP 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 DFXP was designed to interoperate.

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

XML Representation – Element Information Item: div
<div
  begin = <time-expression>
  dur = <time-expression>
  end = <time-expression>
  id = ID
  region = IDREF
  style = IDREFS
  timeAction = (display|visiblity)
  timeContainer = (par|seq)
  ttm:agent = IDREFS
  ttm:role = NMTOKENS
  xml:lang = string
  xml:space = (default|preserve)
  {any attribute in TT Style namespace ...}
  {any attribute not in default or any TT namespace ...}>
  Content: Meta.class*, p*
</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 DFXP document instance are available for style inheritence by descendant content elements such as p and span.

4.1.5 p

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

When presented on a visual medium, a p element is intended to generate a single block area containing one or more line areas, which, in turn, contain one or more glyph areas.

XML Representation – Element Information Item: p
<p
  begin = <time-expression>
  dur = <time-expression>
  end = <time-expression>
  id = ID
  region = IDREF
  style = IDREFS
  timeAction = (display|visiblity)
  timeContainer = (par|seq)
  ttm:agent = IDREFS
  ttm:role = NMTOKENS
  xml:lang = string
  xml:space = (default|preserve)
  {any attribute in TT Style namespace ...}
  {any attribute not in default or any TT namespace ...}>
  Content: Meta.class*, (#PCDATA|span|br)*
</p>

A p element is selected into either zero or one region. When not selected into any region, it is not presented; otherwise, it is presented into the selected region. In no case in the DFXP is a single p element selected into more than one region at a single point in time; as a consequence, a p element must not generate more than one block area.

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.

4.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.

XML Representation – Element Information Item: span
<span
  begin = <time-expression>
  dur = <time-expression>
  end = <time-expression>
  id = ID
  region = IDREF
  style = IDREFS
  timeAction = (display|visiblity)
  timeContainer = (par|seq)
  ttm:agent = IDREFS
  ttm:role = NMTOKENS
  xml:lang = string
  xml:space = (default|preserve)
  {any attribute in TT Style namespace ...}
  {any attribute not in default or any TT namespace ...}>
  Content: Meta.class*, (#PCDATA|br)*
</span>

4.1.7 br

The br element denotes an explicit line break.

When presented on a visual medium, the presence of a br element must be interpreted as if a LINE SEPARATOR (&0x2028;) character were specified in its place.

XML Representation – Element Information Item: br
<br
  id = ID
  xml:lang = string
  xml:space = (default|preserve)>
  Content: EMPTY
</br>

4.2 Attribute Vocabulary

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

  • id

  • xml:lang

  • xml:space

4.2.1 id

The id attribute is used to uniquely identify elements in a DFXP document instance.

The id attribute may be used with any element in the DFXP.

4.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 DFXP.

4.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 DFXP.

In the DFXP, the semantics of the value default are fixed to mean that whitespace need not be preserved.

5 Styling

This section specifies the styling matter of the DFXP, 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.

5.1 Element Vocabulary

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

  • styling

  • style

5.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 Meta.class element group, followed by zero or more style elements.

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

5.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 meta elements.

XML Representation – Element Information Item: style
<style
  id = ID
  style = IDREFS
  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: Meta.class*
</style>

A style element is considered to define a computed style specifiation 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 specifiation 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.

5.2 Attribute Vocabulary

This section defines the 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:

  • tts:background-color

  • tts:color

  • tts:display-align

  • tts:extent

  • tts:font-family

  • tts:font-size

  • tts:font-style

  • tts:font-weight

  • tts:line-height

  • tts:origin

  • tts:overflow

  • tts:text-align

  • tts:text-outline

  • tts:wrap-option

  • tts:writing-mode

  • tts:z-index

Note:

This specification makes use of hyphenated local names for style properties that are based upon like-named properties defined by [XSL 1.0].

Editorial note: GA 2004-10-21
Need to consider adding tts:display with values auto and none, to be used with proposed timeAction="style" mentioned in editorial note under 7.2.4 timeAction

Editorial note: GA 2004-10-21
Need to consider adding tts:visible with values visible and hidden, to be used with proposed timeAction="style" mentioned in editorial note under 7.2.4 timeAction

5.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:

  • body

  • div

  • p

  • region

  • span

  • style

Note:

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

5.2.2 tts:background-color

The tts:background-color 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> | transparent | inherit
Initial: transparent
Applies to: region, div, p, span
Inherited: no

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

Example Fragment – Background Color
<region id="r1" tts:background-color="red" tts:display-align="after"/>
...
<p region="r1" tts:text-align="center">It's secret agent Bluebottle!</p>

Example Rendition – Background Color
DFXP background-color 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.

5.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> | transparent | inherit
Initial: transparent
Applies to: span
Inherited: yes

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 id="r1">
  <style tts:background-color="black"/>
  <style tts:color="white"/>
  <style tts:display-align="after"/>
  <style tts:text-align="center"/>
</region>
...
<p region="r1">
  I challenge you to a
  <span tts:color="green">battle of wits;</span>
  namely, a 19th-century underpant-wearing contest.
</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.

5.2.4 tts:display-align

The tts:display-align 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: auto | before | center | after | inherit
Initial: auto
Applies to: region
Inherited: yes

Editorial note: GA 2004-10-25
Need to define semantics of auto value.

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

Example Fragment – Display Align
<region id="r1">
  <style tts:extent="369px;135px"/>
  <style tts:background-color="black"/>
  <style tts:color="white"/>
  <style tts:display-align="before"/>
  <style tts:text-align="start"/>
</region>
...
<div region="r1">
  <p>Spriggs: Are you pulling my leg?</p>
  <p>Grytpype: No, why?</p>
  <p>Spriggs: It's just dropped off.</p>
  <p>Grytpype: I see. Well, don't wake it up, then.</p>
</div>

Example Rendition – Display Align
DFXP display-align 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.

5.2.5 tts:extent

The tts:extent attribute is used to specify the width and height of 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: auto | <length> S* ";" S* <length> | inherit
Initial: auto
Applies to: region
Inherited: no

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 the ttm:content-extent metadata item that applies to the DFXP document instance, if present, or by the external authoring context, if not present.

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

Example Fragment – Extent
<region id="r1">
  <style tts:extent="305px;86px"/>
  <style tts:background-color="black"/>
  <style tts:color="white"/>
  <style tts:display-align="after"/>
  <style tts:text-align="center"/>
</region>
...
<p region="r1">
  Very well, Mr. Dyall, the floor is yours.<br/>
  But remember, the roof is ours.
</p>

Example Rendition – Extent
DFXP extent style property

5.2.6 tts:font-family

The tts:font-family 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: (<family-name> | <generic-family-name>) (S* "," S* (<family-name> | <generic-family-name>))* | inherit
Initial: default
Applies to: span
Inherited: yes

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 5.3.4 <generic-family-name> below.

The tts:font-family style is illustrated by the following example.

Example Fragment – Font Family
<region id="r1">
  <style tts:background-color="black"/>
  <style tts:color="white"/>
  <style tts:display-align="after"/>
  <style tts:text-align="start"/>
  <style tts:font-family="proportional-sans-serif"/>
</region>
...
<div region="r1">
  <p>
    May I interrupt you<br/>
    for a second?
  </p>
  <p tts:text-align="end" tts:font-family="monospace-serif">
    Yes, what<br/>
    do you want?
  </p>
  <p>
    Nothing, I just want<br/>
    to interrupt.
  </p>
</div>

Example Rendition – Font Family
DFXP font-family 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.

5.2.7 tts:font-size

The tts:font-size 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.

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> | inherit
Initial: see prose
Applies to: span
Inherited: yes

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.

Editorial note: GA 2004-10-25
Need to define initial value.

The tts:font-size style is illustrated by the following example.

Example Fragment – Font Size
<region id="r1">
  <style tts:background-color="black"/>
  <style tts:color="white"/>
  <style tts:display-align="after"/>
  <style tts:text-align="center"/>
  <style tts:font-family="proportional-sans-serif"/>
  <style tts:font-size="18px"/>
</region>
...
<p region="r1">
  The fog was so thick that<br/>
  I had to walk in front of myself<br/>
  with a <span tts:font-size="24px">blazing</span> torch.
</p>

Example Rendition – Font Size
DFXP font-size 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.

5.2.8 tts:font-style

The tts:font-style 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.

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 | inherit
Initial: normal
Applies to: span
Inherited: yes

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:font-style style is illustrated by the following example.

Example Fragment – Font Style
<region id="r1">
  <style tts:background-color="black"/>
  <style tts:color="white"/>
  <style tts:display-align="after"/>
  <style tts:text-align="center"/>
  <style tts:font-family="proportional-sans-serif"/>
</region>
...
<p region="r1">
  I'll not be forestalled or fivestalled.<br/>
  <span tts:font-style="italic">Out of my way!</span>
</p>

Example Rendition – Font Style
DFXP font-style 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.

5.2.9 tts:font-weight

The tts:font-weight 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.

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

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:font-weight style is illustrated by the following example.

Example Fragment – Font Weight
<region id="r1">
  <style tts:background-color="black"/>
  <style tts:color="white"/>
  <style tts:display-align="after"/>
  <style tts:text-align="center"/>
  <style tts:font-family="proportional-sans-serif"/>
</region>
...
<p region="r1">
  Yimbum bullaboo, itchy kitchy coo,<br/>
  toolatoola yakadoola, and your <span tts:font-weight="bold">father,</span> too.
</p>

Example Rendition – Font Weight
DFXP font-weight 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.

5.2.10 tts:line-height

The tts:line-height 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

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.

The tts:line-height style is illustrated by the following example.

Example Fragment – Line Height
<region id="r1">
  <style tts:extent="257px;160px"/>
  <style tts:background-color="black"/>
  <style tts:color="white"/>
  <style tts:display-align="center"/>
  <style tts:text-align="start"/>
  <style tts:font-family="proportional-sans-serif"/>
  <style tts:font-size="16px"/>
  <style tts:line-height="32px"/>
</region>
...
<p region="r1">
  Seagoon and Bloodnok pored over the plans.
  Sometimes they poured on the floor, sometimes
  they poured in the glass. But mostly, they
  pored over the plans.
</p>

Example Rendition – Line Height
DFXP line-height 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.

5.2.11 tts:origin

The tts:origin attribute is used to specify the x and y cordinates 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> S* ";" S* <length> | inherit
Initial: auto
Applies to: region
Inherited: no

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 either by the ttm:content-origin metadata item that applies to the DFXP document instance, if present, or by the external authoring context, if not present.

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

Example Fragment – Origin
<region id="r1">
  <style tts:origin="40px;40px"/>
  <style tts:extent="275px;70px"/>
  <style tts:background-color="black"/>
  <style tts:color="white"/>
  <style tts:display-align="after"/>
  <style tts:text-align="center"/>
</region>
...
<p region="r1">
  Bloodnok:<br/>
  Rice puddings fired from catapults!
</p>

Example Rendition – Origin
DFXP origin style property

5.2.12 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 | inherit
Initial: visible
Applies to: region
Inherited: no

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

Example Fragment – Overflow
<region id="r1">
  <style tts:extent="240px;117px"/>
  <style tts:background-color="black"/>
  <style tts:color="red"/>
  <style tts:display-align="after"/>
  <style tts:text-align="start"/>
  <style tts:font-family="proportional-sans-serif"/>
  <style tts:font-size="18px"/>
  <style tts:wrap-option="no-wrap"/>
  <style tts:overflow="visible"/>
</region>
...
<div region="r1">
  <p>Seagoon: Oh, these jungle roads. Why are they so dusty?</p>
  <p>Bloodnok: We can't get a cleaner.</p>
</div>

Example Rendition – Overflow
DFXP overflow style property

Note:

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

5.2.13 tts:text-align

The tts:text-align 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: start | center | end | inherit
Initial: start
Applies to: p
Inherited: yes

The tts:text-align style is illustrated by the following example.

Example Fragment – Text Align
<region id="r1">
  <style tts:extent="354px;85px"/>
  <style tts:background-color="black"/>
  <style tts:color="white"/>
  <style tts:text-align="end"/>
</region>
...
<p>
  Gentlemen, there has<br/>
  been an outbreak<br/>
  of exploding shirt-tails<br/>
  in the British Army.
</p>

Example Rendition – Text Align
DFXP text-align 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.

5.2.14 tts:text-outline

The tts:text-outline 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 | <length> <length>? <color>? inherit
Initial: none
Applies to: span
Inherited: yes

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 the value of this attribute consists of one or two <length> terms optionally followed by a <color> term, then the first length term denotes the outline thickness and the second length term, if present, indicates the blur radius. 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 tts:text-outline style is illustrated by the following example.

Example Fragment – Text Outline
<region id="r1">
  <style tts:background-color="transparent"/>
  <style tts:color="yellow"/>
  <style tts:display-align="after"/>
  <style tts:text-align="center"/>
  <style tts:text-outline="black 2px 0px"/>
  <style tts:font-family="proportional-sans-serif"/>
  <style tts:font-size="24px"/>
</region>
...
<p>
  At the time I was asleep in my electrified elephant hammock,
  when through the pigeon hole flew a carrier pigeon. There was
  something strapped to its leg -- it was a postman.
</p>

Example Rendition – Text Outline
background-color style property

5.2.15 tts:wrap-option

The tts:wrap-option 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 | no-wrap | inherit
Initial: wrap
Applies to: span
Inherited: yes

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:wrap-option style is illustrated by the following example.

Example Fragment – Wrap Option
<region id="r1">
  <style tts:extent="310px;110px"/>
  <style tts:background-color="black"/>
  <style tts:color="white"/>
  <style tts:display-align="after"/>
  <style tts:text-align="start"/>
  <style tts:overflow="hidden"/>
  <style tts:wrap-option="no-wrap"/>
</region>
...
<p>
  Kindly remain in a condition of serenity and calm,<br/>
  and I will explain the whole principal of the idea.
</p>

Example Rendition – Wrap Option
DFXP wrap-option 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.

5.2.16 tts:writing-mode

The tts:writing-mode 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: lr-tb | rl-tb | tb-rl | tb-lr | lr | rl | tb | inherit
Initial: see prose
Applies to: region
Inherited: no

Editorial note: GA 2004-10-12
Define initial value in a manner that depends upon characterization of content in region as opposed to assigning a culturally specific value that may be wrong.

Editorial note: GA 2004-10-12
Need to indicate difference from [XSL 1.0] with respect to inheritance.

The tts:writing-mode style is illustrated by the following example.

Example Fragment – Writing Mode
<region id="r1">
  <style tts:extent="310px;110px"/>
  <style tts:background-color="black"/>
  <style tts:color="white"/>
  <style tts:display-align="before"/>
  <style tts:text-align="start"/>
  <style tts:writing-mode="tb-rl"/>
</region>
...
<p>
  Why is that tiger wearing brown boots?<br/>
  Because his black ones are at the menders.
</p>

Example Rendition – Writing Mode
DFXP writing-mode style property

Note:

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

5.2.17 tts:z-index

The tts:background-color 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

Editorial note: GA 2004-10-25
Need to define semantics of auto value that apply to explicit regions which are effectively nested in an unspecified root container region. Need to define rendering order for overlapping regions that share same z-index.

The tts:z-index style is illustrated by the following example.

Example Fragment – Z Index
<region id="r1">
  <style tts:origin="0px;0px"/>
  <style tts:extent="265px;100px"/>
  <style tts:background-color="black"/>
  <style tts:color="white"/>
  <style tts:display-align="before"/>
  <style tts:text-align="start"/>
  <style tts:z-index="0"/>
</region>
<region id="r2">
  <style tts:origin="205px;60px"/>
  <style tts:extent="290px;100px"/>
  <style tts:background-color="red"/>
  <style tts:color="white"/>
  <style tts:display-align="before"/>
  <style tts:text-align="end"/>
  <style tts:z-index="1"/>
</region>
<region id="r3">
  <style tts:origin="0px;120px"/>
  <style tts:extent="265px;100px"/>
  <style tts:background-color="black"/>
  <style tts:color="white"/>
  <style tts:display-align="after"/>
  <style tts:text-align="start"/>
  <style tts:z-index="2"/>
</region>
...
<p region="r1">
  It's a secret tune that goes like this<br/>
  (<span tts:font-style="italic">whistles the Hungarian Rhapsody<span>).
</p>
<p region="r2">
  Wait! That's the <span tts:font-style="italic">Hungarian Rhapsody<span>.<br/>
  What's secret about that?
</p>
<p region="r3">
  Fool! Didn't you notice?<br/>
  I was whistling it in English.
</p>

Example Rendition – Z Index
DFXP z-index 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.

5.3 Style Value Expressions

Style property values include the use of the following expressions:

  • <color>

  • <digit>

  • <family-name>

  • <generic-family-name>

  • <hex-digit>

  • <integer>

  • <named-color>

  • <quoted-string>

  • <string>

5.3.1 <color>

A <color> expression is used to specify a named or exact RGB color triple.

Syntax Representation – <color>
<color>
  : "#" rr gg bb
  | "rgb" "(" S* r-value S* "," S* g-value S* "," S* b-value S* ")"
  | <named-color>
rr | gg | bb
  : <hex-digit> <hex-digit>
r-value | g-value | b-value
  : component-value
component-value
  : non-negative-integer                    // valid range: [0,255]
non-negative-integer
  : <digit>+

5.3.2 <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"

5.3.3 <family-name>

A <family-name> expression specifies a font family name.

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

Syntax Representation – <family-name>
<family-name>
  : <string>
  | <quoted-string>

5.3.4 <generic-family-name>

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

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

Syntax Representation – <generic-family-name>
<generic-family-name>
  : "default"
  | "monospace-sans-serif"
  | "monospace-serif"
  | "proportional-sans-serif"
  | "proportional-serif"

Editorial note: GA 2004-10-25
Need to define semantics of default value.

5.3.5 <hex-digit>

A <hex-digit> 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 – <hex-digit>
<hex-digit>
  : <digit>
  | "a" | "b" | "c" | "d" | "e" | "f"
  | "A" | "B" | "C" | "D" | "E" | "F"

5.3.6 <integer>

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

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

5.3.7 <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>
  : non-negative-number units?
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"

5.3.8 <named-color>

A <named-color> is used to express an RGB color with a convenient name.

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

Syntax Representation – <named-color>
<named-color>
  : "black"                                 // #000000
  | "silver"                                // #c0c0c0
  | "gray"                                  // #808080
  | "white"                                 // #ffffff
  | "maroon"                                // #800000
  | "red"                                   // #ff0000
  | "purple"                                // #800080
  | "fuchsia"                               // #ff00ff
  | "green"                                 // #008000
  | "lime"                                  // #00ff00
  | "olive"                                 // #808000
  | "yellow"                                // #ffff00
  | "navy"                                  // #000080
  | "blue"                                  // #0000ff
  | "teal"                                  // #008080
  | "aqua"                                  // #00ffff

5.3.9 <quoted-string>

A <quoted-string> 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 – <quoted-string>
<quoted-string>
  : "\"" ( char - { "\"" } )* "\""
  | "\'" ( char - { "\'" } )* "\'"

Editorial note: GA 2004-10-13
Need to consider whether <quoted-string> should be generalized to accomodate an arbitrary mix of embedded quotation delimiters, or other characters not represented in lexical syntax.

5.3.10 <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 | "\"" | "\'" } )+

5.4 Style Association

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

  • inline styling

  • referential styling

  • chained referential styling

5.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" are not associated with a color style property; rather, they inherit their color style from their parent p element as described in 5.5.1 Content Style Inheritance below.

5.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 evaulated 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 5.4.1 Inline Styling.

Example – Referential Styling
<style id="s1" tts:color="white"/>
<style 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" are not associated with a color style property; rather, they inherit their color style from their parent p element as described in 5.5.1 Content Style Inheritance below.

5.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 first 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.

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 5.4.1 Inline Styling.

Example – Chained Referential Styling
<style id="s1" style tts:color="white" tts:font-family="monospace-serif"/>
<style id="s2" style="s1" tts:color="yellow"/>
...
<p style="s1">White Monospace</p>
<p style="s2">Yellow Monospace</p>

5.5 Style Inheritance

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

  • content style inheritance

  • region style inheritance

5.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 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:font-family="monospace-sans-serif">
  <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:font-family style property and this property is inheritable; therefore, the value of the tts:font-family 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.

5.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 6.1.2 region below, and

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

Example – Region Style Inheritance
<region id="r1">
  <style tts:color="yellow"/>
  <style tts:font-family="monospace-serif"/>
</region>
...
<p region="r1">Yellow Monospace</p>

6 Layout

This section specifies the layout matter of the DFXP, 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 DFXP content author may choose to embed (inline) style matter directly into layout or content matter. In such cases, an alternative exists in which the style matter is not embedded (inlined).

6.1 Element Vocabulary

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

  • layout

  • region

6.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 Meta.class element group, followed by zero or more region elements.

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

6.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 Meta.class element group, followed by zero or more style elements.

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

A region element is considered to define a computed style specifiation 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 specifiation 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 the computed style specification set of a region does not contain a specification of the tts:extent style property, then no content is flowed into the region for the purpose of presentation.

6.2 Attribute Vocabulary

This section defines the region attribute used with content elements.

6.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:

  • body

  • div

  • p

  • span

Note:

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

6.3 Line Layout

Editorial note: GA 2004-10-12
Need to describe line stacking strategy that applies to line area stacking. As defined above, tts:line-height is geared towards use with a fixed line stacking strategy value of font-height, to use [XSL 1.0] terminology; which is to say, use the nominal-requested-line-rectangle for each line area, where the determination of this rectangle is based upon the line height applied to the containing p element.

6.4 Region Layout and Presentation

Editorial note: GA 2004-10-13
Define temporal region layout in terms of the following algorithm which employs a logical two step process, where the first step can be characterized as prune-in-space and the second step as prune-and-flatten-in-time.

PREPARE-CONTENT(D) := 
 foreach R in SELECT ( D, "/tt/head/layout/region" )
   APPEND-CHILDREN ( R, SELECT ( D, "/tt/body" ) )
   foreach E in POST-ORDER-TRAVERSE(R)
     if CONTENT? ( E ) then
       S := REGION-OF ( E )
       if S != R AND EMPTY? ( E )
         then PRUNE ( E )
         else REMOVE-ATTRIBUTE ( E, "region" )
  PRUNE ( SELECT ( D, "/tt/body" ) )
 
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 ) )

Editorial note: GA 2004-10-22
Need to indicate that background color of region is depicted only when some content is actively targeting region.

Editorial note: GA 2004-10-22
Need to define rendering order in case that multiple regions have same z-index.

7 Timing

This section specifies the timing matter of the DFXP, 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.

7.1 Element Vocabulary

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

7.2 Attribute Vocabulary

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

  • begin

  • end

  • dur

  • timeAction

In addition, this section defines the timeContainer for use with content elements that serve simultaneously as both content and timing containers.

7.2.1 begin

The begin attribute is used to specify the begin point of a temporal interval associated with a content element. If specified, the value of a begin attribute must adhere to a <time-expression> specification as defined by 7.3.5 <time-expression>.

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

7.2.2 end

The end attribute is used to specify the ending point of a temporal interval associated with a content element. If specified, the value of a end attribute must adhere to a <time-expression> specification as defined by 7.3.5 <time-expression>.

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 an active temporal interval include the frame immediately prior to the frame equal to or immediately following the time specified by the ending point, but do not extend into this latter frame.

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).

7.2.3 dur

The dur attribute is used to specify the duration of a temporal interval associated with a content element. If specified, the value of a dur attribute must adhere to a <media-time-expression> specification as defined by 7.3.2 <media-time-expression>.

7.2.4 timeAction

The timeAction attribute is used to specify the semantic effect of temporal activation and deactivation.

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

  • display

  • visibility

If the time action of an element instance is display, then temporal activation of the element must be interpreted as meaning that the element is a candidate for spatial flow in any layout region with which it is associated, while temporal deactivation must be interpreted as the converse. The process of temporally activating or deactiviting an element with time action semantics of display must cause a reflow (re-layout) event in any affected presentation of that content.

If the time action of an element instance is visibility, then temporal activation of the element must be interpreted as meaning that the element is a candidate for manifest presentation independently of its layout (flow), while temporal deactivation must be interpreted as the converse. The process of temporally activating or deactiviting an element with time action semantics of visibility must not cause a reflow (re-layout) event in any affected presentation of that content.

If a timeAction attribute is not specified on a content element, then display time action semantics must apply.

Editorial note: GA 2004-10-21
Need to consider adding style value for timeAction, with semantics: apply inline styles specified for that element during the active temporal interval, with display and visibility intepreted as auto and visible, respectively, whether or not interval is active.

7.2.5 timeContainer

The timeContainer attribute is used to specify the temporal relationships among child content elements and between these child elements and the element instance on which the attribute is specified.

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 a content element, then par time container semantics must apply unless it is a body element, in which case seq time container semantics must apply.

Time container semantics applies only to the following (content) element types:

  • body

  • div

  • p

  • span

7.3 Time Value Expressions

Timing attribute values include the use of the following expressions:

  • <media-marker-expression>

  • <media-time-expression>

  • <smpte-frame-label>

  • <smpte-marker-expression>

  • <time-expression>

7.3.1 <media-marker-expression>

A <media-marker-expression> is used to reference a label used to mark a temporal position in an implicit or explicitly related media object.

Note:

The only type of media marker supported in the DFXP is the time code defined by [SMPTE 12M].

Syntax Representation – <media-marker-expression>
<media-marker-expression>
  : <smpte-marker-expression>

A temporal duration must not be expressed in terms of a <media-marker-expression>.

Note:

In the general case, an ordering relationship does not necessarily apply when labeling contiguous media elements with media markers; i.e., two arbitrary contiguous frames in a related video media object need not be labeled with media markers that denote contiguous positions in time. For example, consider a recording of the video frames produced by playing a video media object in reverse scan mode, in which case multiple frames are typically dropped. If such a recording were to also record media marker labels of recorded frames, then, if such labels were originally in contiguous temporal order for normal forward playback, they are now in reverse order with discontinuities representing dropped frames.

7.3.2 <media-time-expression>

A <media-time-expression> is used to reference a media time, also known as normal play time (NPT), in an implicit or explicitly related media object.

For the purpose of resolving media times, in the case no other media object applies, then the implied media object is the DFXP document instance itself.

Media times may be expressed in temporal units, such as seconds, or in timed content units, such as frames. In the case that a media time is expressed in frames, it can be converted to and from a temporal unit by using implicit or explicit frame rate metadata.

Note:

See 8.2.8 ttm:frame-rate for further information on explicit specification of frame rate metadata.

Syntax Representation – <media-time-expression>
<media-time-expression>
  : hours ":" minutes ":" seconds ( fraction | ":" frames )?
  | time-count fraction? metric?
hours
  : <digit>+
minutes | seconds | frames
  : <digit> <digit>
fraction
  : "." <digit>+
time-count
  : <digit>+
metric
  : "h"                 // hours
  | "m"                 // minutes
  | "s"                 // seconds
  | "ms"                // milliseconds
  | "f"                 // frames

If a <media-time-expression> is expressed in terms of a time-count and no metric term is specified, then the default metric specified by a ttm:default-time-metric metadata item is used. If no default metric is specified, then the time count must be interpreted as seconds.

Note:

The non-terminal symbols hours, minutes, seconds, and frames employed in the syntax shown above are private to the definition of <media-time-expression>, and, in particular, are not the same as the non-terminal symbols of the same name used below in 7.3.4 <smpte-marker-expression>.

7.3.3 <smpte-frame-label>

A <smpte-frame-label> expression is used to indicate a discrete frame rate and mode as defined by [SMPTE 12M].

Syntax Representation – <smpte-frame-label>
<smpte-frame-label>
  : "smpte"             // same as smpte-30-drop
  | "smpte-24"          // 24.00fps, progressive
  | "smpte-25"          // 25.00fps, interlaced
  | "smpte-30"          // 30.00fps, interlaced
  | "smpte-30-drop"     // 29.97fps, interlaced
  | "smpte-50"          // 50.00fps, interlaced
  | "smpte-50-prog"     // 50.00fps, progressive
  | "smpte-60"          // 60.00fps, interlaced
  | "smpte-60-drop"     // 59.97fps, interlaced
  | "smpte-60-prog"     // 60.00fps, progressive

7.3.4 <smpte-marker-expression>

A <smpte-marker-expression> is used to reference a label used to mark a temporal position in an implicit or explicitly related media object, where the label takes the form of a time code as defined by [SMPTE 12M].

Syntax Representation – <smpte-marker-expression>
<smpte-marker-expression>
  : <smpte-frame-label> "(" smpte-time-expression ")"
smpte-time-expression
  : hours ":" minutes ":" seconds ( ":" frames ( "." subframes )? )?
hours
  : <digit> <digit>                         // 00 - 23
minutes
  : <digit> <digit>                         // 00 - 59
seconds
  : <digit> <digit>                         // 00 - 59
frames
  : <digit> <digit>                         // see prose
subframes
  : <digit> <digit>                         // see prose

The frames term of a <smpte-marker-expression> must be constrained to the interval 0 through N, where N is the closest integer to the frame rate as determined by the smpte-frame-label term.

The subframes term of a <smpte-marker-expression> must be interpreted as a percentage of a frame's time period. In the case of progressive frame rates, a subframe in the range 0 to 49 must be interpreted as if the subframe were 0, and a subframe in the range 50 to 99 must be interpreted as if the frame were incremented by one and the subframe were 0. In the case of interlaced frame rates, a subframe in the range 0 to 49 must be interpreted as the first field of the specified frame, and a subframe in the range 50 to 99 must be interpreted as the second field of the specified frame.

Note:

The non-terminal symbols hours, minutes, seconds, and frames employed in the syntax shown above are private to the definition of <smpte-marker-expression>, and, in particular, are not the same as the non-terminal symbols of the same name used above in 7.3.2 <media-time-expression>.

7.3.5 <time-expression>

A <time-expression> is used to explicitly specify the begin and/or end time of a temporal interval, but not to express durations.

Syntax Representation – <time-expression>
<time-expression>
  : <media-time-expression>
  | <media-marker-expression>

Note:

Durations are expressed using <media-time-expression>. See 7.3.1 <media-marker-expression> for further information on why <media-marker-expression> is not generally available for use in expressing durations.

7.4 Time Intervals

Editorial note: GA 2004-10-21
Need to specify time interval semantics; in particular, need to specify how active time intervals are resolved and/or constrained using combinations of begin, dur, end, and parent time bases based on parallel and sequential temporal containment. Need to formally define active duration.

8 Metadata

This section specifies the metadata matter of the DFXP, 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 DFXP 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 the DFXP.

8.1 Element Vocabulary

The meta 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 DFXP document instances:

  • ttm:title

  • ttm:desc

  • ttm:copyright

  • ttm:agent

  • ttm:name

  • ttm:actor

8.1.1 meta

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

Metadata information may be expressed by a meta 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 meta child elements that express metadata. Both types of metadata are referred to in this document as metadata items.

XML Representation – Element Information Item: meta
<meta
  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}*
</meta>

Note:

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

8.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
  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.

8.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
  id = ID
  role = NMTOKENS
  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.

8.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 DFXP 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.

8.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
  id = ID
  type = (person|character|group|organization)
  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

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.

Note:

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

Editorial note: GA 2004-10-18
Need to specify contexts in which ttm:agent can be defined for the purpose of associating content with the agent. Two likely contexts include: (1) child of /tt/head/meta, and (2) child of content element to be associated with agent.

Editorial note: GA 2004-10-18
Should consider supporting multiple ttm:actor children of a ttm:agent element in order to handle case where more than one actor plays the part of a character.

8.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
  id = ID
  type = (full|family|given|alias|other)
  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.

8.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
  id = ID
  agent = IDREF
  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 another ttm:agent element that denotes the person, group, or organization acting the part of a character.

8.2 Attribute Vocabulary

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

  • ttm:agent

  • ttm:cell-resolution

  • ttm:content-extent

  • ttm:content-origin

  • ttm:default-time-metric

  • ttm:frame-extent

  • ttm:frame-origin

  • ttm:frame-rate

  • ttm:pixel-aspect-ratio

  • ttm:role

Note:

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

8.2.1 ttm:agent

The ttm:agent attribute takes a IDREF 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 DFXP document instance of the referring element.

8.2.2 ttm:cell-resolution

The ttm:cell-resolution attribute may be used by a DFXP content author to express 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 – ttm:cell-resolution
ttm:cell-resolution
  : rows ";" cols
rows | cols
  : <digit>+

If not specified, the number of rows and cols must be considered to be the same as the number of pixels in horizontal and vertical dimensions as specified by the ttm:content-extent metadata attribute.

A ttm:cell-resolution attribute is considered to be significant only when specified on a meta child of the head element. In the case that more than one meta child of the head element specifies this attribute, then only the first instance shall be considered significant.

8.2.3 ttm:content-extent

The ttm:content-extent attribute is used to specify the extent of the root container region area, with respect to which the region areas defined by the current DFXP document instance are positioned.

The value of this attribute must take the same form as the tts:extent attribute.

If not specified, the content extent must be considered to be the same as the frame extent, about which see 8.2.6 ttm:frame-extent.

A ttm:content-extent attribute is considered to be significant only when specified on a meta child of the head element. In the case that more than one meta child of the head element specifies this attribute, then only the first instance shall be considered significant.

8.2.4 ttm:content-origin

The ttm:content-origin attribute is used to specify the origin of the root container region area with respect to an explicit or implicit frame area.

The value of this attribute must take the same form as the tts:origin attribute.

If not specified, the content origin must be considered to be the same as the frame origin, about which see 8.2.7 ttm:frame-origin.

A ttm:content-origin attribute is considered to be significant only when specified on a meta child of the head element. In the case that more than one meta child of the head element specifies this attribute, then only the first instance shall be considered significant.

8.2.5 ttm:default-time-metric

The ttm:default-time-metric attribute is used to specify the default metric to use when interpreting a time-count term used in a <media-time-expression> in the case that no metric term is provided.

The value of this attribute must take the same form as the metric term of the <media-time-expression>.

If not specified, the default time metric must be considered to be seconds.

A ttm:default-time-metric attribute is considered to be significant only when specified on a meta child of the head element. In the case that more than one meta child of the head element specifies this attribute, then only the first instance shall be considered significant.

8.2.6 ttm:frame-extent

The ttm:frame-extent attribute is used to specify the extent of the external frame region area, with respect to which the root container region area defined by the ttm:content-origin and ttm:content-extent attributes is positioned.

If specified, the value of this attribute must take the same form as the tts:extent attribute.

If not specified, the frame extent must be considered to be infinite in horizontal and vertical dimensions.

A ttm:frame-extent attribute is considered to be significant only when specified on a meta child of the head element. In the case that more than one meta child of the head element specifies this attribute, then only the first instance shall be considered significant.

Note:

The ttm:frame-extent attribute provides a mechanism by means of which an author can record information about the context in which a DFXP document instance was generated or the intention of the author in how it may be subject to subsequent reprocessing.

8.2.7 ttm:frame-origin

The ttm:frame-origin attribute is used to specify the origin of the external frame region area, with respect to some application defined coordinate system.

If specified, the value of this attribute must take the same form as the tts:origin attribute.

If not specified, the frame origin must be considered to be the origin of the application defined coordinate system.

A ttm:frame-origin attribute is considered to be significant only when specified on a meta child of the head element. In the case that more than one meta child of the head element specifies this attribute, then only the first instance shall be considered significant.

8.2.8 ttm:frame-rate

The ttm:frame-rate attribute is used to specify the frame rate of a related media object or the intrinsic frame rate of the DFXP 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 – ttm:frame-rate
ttm:frame-rate
  : <smpte-frame-label>
  | <digit>+ ( "." <digit>+ )?

If the value takes the form of a <smpte-frame-label>, then the frame rate is the rate designated by that label as defined by 7.3.3 <smpte-frame-label> above; otherwise, if the value takes the form of a real number, then that number must be interpreted as the (possibly non-integral) number of frames per second.

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 one frame per second.

A ttm:frame-rate attribute is considered to be significant only when specified on a meta child of the head element. In the case that more than one meta child of the head element specifies this attribute, then only the first instance shall be considered significant.

8.2.9 ttm:pixel-aspect-ratio

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

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

Syntax Representation – ttm:pixel-aspect-ratio
ttm:pixel-aspect-ratio
  : <digit>+ ":" <digit>+

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

A ttm:pixel-aspect-ratio attribute is considered to be significant only when specified on a meta child of the head element. In the case that more than one meta child of the head element specifies this attribute, then only the first instance shall be considered significant.

8.2.10 ttm:role

The ttm:role attribute may be used by a DFXP 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"
  | "kinesic"
  | "music"
  | "lyrics"
  | "sound"
  | "thought"
  | "title"
  | 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 Schemas (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.

A.1 Relax NG Schema

This section specifies a Relax NG Compact Syntax (RNC) [RELAX NG] based schema for the DFXP.

A.1.1 Driver

# .......................................................................
# TT-AF 1.0 Distribution Format Exchange Profile (DFXP) Schema ..........
# .......................................................................
# default namespace
default namespace tt = "http://www.w3.org/2004/10/ttaf1"
# generic tt modules
include "ttaf1-dfxp-datatypes.rnc"
include "ttaf1-dfxp-classes.rnc"
include "ttaf1-dfxp-core-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-layout.rnc"
include "ttaf1-dfxp-content.rnc"
include "ttaf1-dfxp-head.rnc"
include "ttaf1-dfxp-document.rnc"
start = TTAF.tt
# .......................................................................
# .......................................................................
# .......................................................................

A.1.2 Modules

A.1.2.1 Classes Module
# .......................................................................
# TT-AF 1.0 DFXP Class Declarations Module ..............................
# .......................................................................
# attribute group classes
TTAF.Core.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.Block.class = empty
TTAF.BlockNoDiv.class = empty
TTAF.Inline.class = empty
TTAF.InlineNoSpan.class = empty
TTAF.Metadata.class = empty
TTAF.MetadataItems.class = empty
# .......................................................................
# .......................................................................
# .......................................................................
A.1.2.2 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.Styled.attrib.class,
  TTAF.TimedContainer.attrib.class
TTAF.body.content.extra = empty
TTAF.body.content =
  (TTAF.Metadata.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.Styled.attrib.class,
  TTAF.TimedContainer.attrib.class
TTAF.div.content.extra = empty
TTAF.div.content =
  (TTAF.Metadata.class*,
   (TTAF.BlockNoDiv.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.Styled.attrib.class,
  TTAF.TimedContainer.attrib.class
TTAF.p.content.extra = empty
TTAF.p.content =
  (TTAF.Metadata.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.Styled.attrib.class,
  TTAF.TimedContainer.attrib.class
TTAF.span.content.extra = empty
TTAF.span.content =
  (TTAF.Metadata.class*,
   (TTAF.InlineNoSpan.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.br.content = empty
# 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
# .......................................................................
# .......................................................................
# .......................................................................
A.1.2.3 Core Attributes Module
# .......................................................................
# TT-AF 1.0 DFXP Core Attributes Module .................................
# .......................................................................
TTAF.id.attrib
  = attribute id { xsd:ID }?
TTAF.lang.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
# .......................................................................
# .......................................................................
# .......................................................................
A.1.2.4 Data Types Module
# .......................................................................
# TT-AF 1.1 DFXP Datatypes Module .......................................
# .......................................................................
TTAF.Agent.datatype =
  xsd:IDREFS
TTAF.Boolean.datatype =
  "false" |
  "true"
TTAF.CellResolution.datatype =
  string
TTAF.Color.datatype =
  string
TTAF.Coordinate.datatype =
  string
TTAF.Coordinates.datatype =
  string
TTAF.Dimension.datatype =
  string
TTAF.DisplayAlign.datatype =
  "auto" |
  "before" |
  "center" |
  "after" |
  "inherit"
TTAF.Extent.datatype =
  string
TTAF.FontFamily.datatype =
  string
TTAF.FontSize.datatype =
  TTAF.Length.datatype
TTAF.FontStyle.datatype =
  "normal" |
  "italic" |
  "oblique" |
  "inherit"
TTAF.FontWeight.datatype =
  "normal" |
  "bold" |
  "inherit"
TTAF.FrameRate.datatype =
  string
TTAF.LanguageCode.datatype = xsd:NMTOKEN
TTAF.LanguageCodes.datatype =
  string
TTAF.Length.datatype =
  string
TTAF.LineHeight.datatype =
  TTAF.Length.datatype
TTAF.MetadataNameType.datatype =
  "full" |
  "family" |
  "given" |
  "alias" |
  "other"
TTAF.Origin.datatype =
  string
TTAF.Overflow.datatype =
  "visible" |
  "hidden" |
  "inherit"
TTAF.Ratio.datatype =
  string
TTAF.Role.datatype =
  xsd:NMTOKENS
TTAF.TextAlign.datatype =
  "start" |
  "center" |
  "end" |
  "inherit"
TTAF.TextOutline.datatype =
  string
TTAF.TimeAction.datatype =
  "display" |
  "visibility"
TTAF.TimeContainer.datatype =
  "par" |
  "seq"
TTAF.TimeCoordinate.datatype =
  string
TTAF.TimeDuration.datatype =
  string
TTAF.TimeMetric.datatype =
  "h" |
  "m" |
  "s" |
  "ms" |
  "f"
TTAF.URI.datatype = xsd:anyURI
TTAF.WrapOption.datatype =
  "wrap" |
  "no-wrap" |
  "inherit"
TTAF.WritingMode.datatype =
  "lr-tb" |
  "rl-tb" |
  "tb-rl" |
  "tb-lr" |
  "lr" |
  "rl" |
  "tb" |
  "inherit"
TTAF.XMLSpace.datatype =
  "default" |
  "preserve"
TTAF.ZIndex.datatype =
  "auto" |
  xsd:integer |
  "inherit"
  
# .......................................................................
# .......................................................................
# .......................................................................
A.1.2.5 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.attrib.class
TTAF.tt.content =
  (TTAF.head?, TTAF.body?)
# .......................................................................
# .......................................................................
# .......................................................................
A.1.2.6 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*)
# .......................................................................
# .......................................................................
# .......................................................................
A.1.2.7 Layout Module
# .......................................................................
# TT-AF 1.0 DFXP Layout Module ..........................................
# .......................................................................
# region reference attribute; must reference /head/styling//region
TTAF.region.attrib
  = attribute region { xsd:IDREF }?
# 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.Styling.attrib.class |
   TTAF.Styling.ForeignExtension.attrib+ )
TTAF.layout.region.content.extra = empty
TTAF.layout.region.content =
  (TTAF.Metadata.class*,
   TTAF.styling.style*,
   TTAF.layout.region.content.extra*)
# .......................................................................
# .......................................................................
# .......................................................................
A.1.2.8 Metadata Module
# .......................................................................
# TT-AF 1.0 DFXP Metadata Module ........................................
# .......................................................................
# namespace prefix bindings
namespace tt = "http://www.w3.org/2004/10/ttaf1"
namespace local = ""
# meta - generic metadata
TTAF.meta =
  element meta {
    TTAF.meta.attlist,
    TTAF.meta.content
  }
TTAF.meta.attlist &=
  TTAF.Core.attrib.class
TTAF.External.class =
  element * - tt:* {
    ( attribute * - local:* { text }
      | text
      | TTAF.External.class
    )*
  }
TTAF.meta.content.extra = empty
TTAF.meta.content =
  ((TTAF.MetadataItems.class |
    TTAF.External.class |
    TTAF.meta.content.extra)*)
TTAF.Metadata.class |= TTAF.meta
# .......................................................................
# .......................................................................
# .......................................................................
A.1.2.9 Metadata Items Module
# .......................................................................
# TT-AF 1.0 DFXP Metadata Items Module ......................................
# .......................................................................
namespace ttm = "http://www.w3.org/2004/10/ttaf1#metadata"
namespace ttmx = "http://www.w3.org/2004/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
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,
  attribute role { xsd:NMTOKENS }?
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,
  attribute role { xsd:NMTOKENS }?
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.agent |
  TTAF.meta.desc |
  TTAF.meta.title |
  TTAF.MetadataItems.extra
TTAF.Metadata.class |=
  TTAF.meta.title |
  TTAF.meta.desc |
  TTAF.meta.copyright
# .......................................................................
# .......................................................................
# .......................................................................
A.1.2.10 Metadata Attributes Module
# .......................................................................
# TT-AF 1.0 DFXP Metadata Attributes Module ..............................
# .......................................................................
namespace tt = "http://www.w3.org/2004/10/ttaf1"
namespace ttm = "http://www.w3.org/2004/10/ttaf1#metadata"
namespace ttmx = "http://www.w3.org/2004/10/ttaf1#metadata-extension"
namespace local = ""
# Standard Metadata Attributes
TTAF.agent.attrib
  = attribute ttm:agent { TTAF.Agent.datatype }?
TTAF.cell-resolution.attrib
  = attribute ttm:cell-resolution { TTAF.CellResolution.datatype }?
TTAF.content-extent.attrib
  = attribute ttm:content-extent { TTAF.Extent.datatype }?
TTAF.content-origin.attrib
  = attribute ttm:content-extent { TTAF.Origin.datatype }?
TTAF.default-time-metric.attrib
  = attribute ttm:default-time-metric { TTAF.TimeMetric.datatype }?
TTAF.frame-extent.attrib
  = attribute ttm:frame-extent { TTAF.Extent.datatype }?
TTAF.frame-origin.attrib
  = attribute ttm:frame-extent { TTAF.Origin.datatype }?
TTAF.frame-rate.attrib
  = attribute ttm:frame-rate { TTAF.FrameRate.datatype }?
TTAF.pixel-aspect-ratio.attrib
  = attribute ttm:pixel-aspect-ratio { TTAF.Ratio.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
# .......................................................................
# .......................................................................
# .......................................................................
A.1.2.11 Styling Attributes Module
# .......................................................................
# TT-AF 1.0 DFXP Styling Attributes Module ..............................
# .......................................................................
namespace tt = "http://www.w3.org/2004/10/ttaf1"
namespace tts = "http://www.w3.org/2004/10/ttaf1#style"
namespace ttsx = "http://www.w3.org/2004/10/ttaf1#style-extension"
namespace local = ""
# Standard Style Attributes
TTAF.background-color.attrib
  = attribute tts:background-color { TTAF.Color.datatype }?
TTAF.color.attrib
  = attribute tts:color { TTAF.Color.datatype }?
TTAF.display-align.attrib
  = attribute tts:display-align { TTAF.DisplayAlign.datatype }?
TTAF.extent.attrib
  = attribute tts:extent { TTAF.Extent.datatype }?
TTAF.font-family.attrib
  = attribute tts:font-family { TTAF.FontFamily.datatype }?
TTAF.font-size.attrib
  = attribute tts:font-size { TTAF.FontSize.datatype }?
TTAF.font-style.attrib
  = attribute tts:font-style { TTAF.FontStyle.datatype }?
TTAF.font-weight.attrib
  = attribute tts:font-weight { TTAF.FontWeight.datatype }?
TTAF.line-height.attrib
  = attribute tts:line-height { TTAF.LineHeight.datatype }?
TTAF.origin.attrib
  = attribute tts:origin { TTAF.Origin.datatype }?
TTAF.overflow.attrib
  = attribute tts:overflow { TTAF.Overflow.datatype }?
TTAF.text-align.attrib
  = attribute tts:text-align { TTAF.TextAlign.datatype }?
TTAF.text-outline.attrib
  = attribute tts:text-outline { TTAF.TextOutline.datatype }?
TTAF.wrap-option.attrib
  = attribute tts:wrap-option { TTAF.WrapOption.datatype }?
TTAF.writing-mode.attrib
  = attribute tts:writing-mode { TTAF.WritingMode.datatype }?
TTAF.z-index.attrib
  = attribute tts:z-index { 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.background-color.attrib,
  TTAF.color.attrib,
  TTAF.display-align.attrib,
  TTAF.extent.attrib,
  TTAF.font-family.attrib,
  TTAF.font-size.attrib,
  TTAF.font-style.attrib,
  TTAF.font-weight.attrib,
  TTAF.line-height.attrib,
  TTAF.origin.attrib,
  TTAF.overflow.attrib,
  TTAF.text-align.attrib,
  TTAF.text-outline.attrib,
  TTAF.wrap-option.attrib,
  TTAF.writing-mode.attrib,
  TTAF.z-index.attrib
# Style Binding Attribute Class
TTAF.StyleBinding.attrib.class &=
  TTAF.style.attrib,
  TTAF.region.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
# .......................................................................
# .......................................................................
# .......................................................................
A.1.2.12 Styling Module
# .......................................................................
# TT-AF 1.0 DFXP Styling Module .........................................
# .......................................................................
# style reference attribute; must reference /head/styling//(g|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.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
# .......................................................................
# .......................................................................
# .......................................................................
A.1.2.13 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 }?
TTAF.timing.timeAction.attrib
  = attribute timeAction { TTAF.TimeAction.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.timing.timeAction.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
# .......................................................................
# .......................................................................
# .......................................................................

A.2 XML Schema Definition (XSD) Schema

This section specifies a W3C XML Schema Definition (XSD) [XML Schema Part 1] based schema for the DFXP.

A.2.1 Driver

Editorial note: GA 2004-10-18
Supply an XSD schema driver for the DFXP.

A.2.2 Modules

Editorial note: GA 2004-10-18
Supply XSD schema modules for the DFXP.

B References (Normative)

RELAX NG
ISO/IEC 19757-2, Information technology – Document Schema Definition Language (DSDL) – Part 2: Regular-grammar-based validation – RELAX NG, International Standards Organization.
SMPTE 12M
ANSI/SMPTE 12M, Television, Audio and Film – Time and Control Code, SMPTE Standard.
XML 1.1
Tim Bray et al. Extensible Markup Language (XML) 1.1, W3C Recommendation, 04 Feb 2004, updated 15 Apr 2004. (See http://www.w3.org/TR/2004/REC-xml11-20040204/.)
XML InfoSet
John Cowan and Richard Tobin, XML Information Set (Second Edition), W3C Recommendation, 04 Feb 2004. (See http://www.w3.org/TR/2004/REC-xml-infoset-20040204/.)
XML Namespaces 1.1
Tim Bray et al. Namespaces in XML 1.1, W3C Recommendation, 04 Feb 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. (See http://www.w3.org/TR/xmlschema-1/.)
XML Schema Part 2
Paul Biron and Ashok Malhotra, XML Schema Part 2: Datatypes, W3C Recommendation. (See http://www.w3.org/TR/xmlschema-2/.)

C Other References (Non-Normative)

TTAF1-REQ
Glenn Adams, Editor, Timed Text (TT) Authoring Format 1.0 Use Cases and Requirements, W3C Working Draft, 15 Sep 2003. (See http://www.w3.org/TR/2003/WD-tt-af-1-0-req-20030915/.)
XSL 1.0
Sharon Adler, Anders Berglund, et al., Eds., Extensible Stylesheet Language, Version 1.0, W3C Recommendation. (See http://www.w3.org/TR/2001/REC-xsl-20011015/.)

D 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 members of the Timed Text Working Group are:

Glenn Adams, Extensible Formatting Systems, Inc. (chair); Kaes Blom, CWI; Brad Botkin, WGBH; Dick Bulterman, CWI; Michael Dolan, Invited Expert; Gerry Fields, WGBH; Geoff Freed, WGBH; 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); David Singer, Apple Computer.

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).

Editorial note: GA 2004-10-25
Add acknowledgments for sources of captioning material used in examples.