$Id: Overview.xml,v 1.9 2004/10/19 03:31:57 glenn Exp $

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

W3C Working Draft DD Month YYYY

This version:
http://www.w3.org/TR/2003/WD-tt-af-1-0-dfxp-yyyymmdd/
Latest version:
http://www.w3.org/TR/tt-af-1-0-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 document is an editor's copy that has no official standing.

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 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 Vocabulary Namespaces
    1.2 Vocabulary Overview
2 Definitions
    2.1 Acronyms
    2.2 Terminology
    2.3 Notations
3 Content
    3.1 Element Vocabulary
        3.1.1 tt
        3.1.2 head
        3.1.3 body
        3.1.4 div
        3.1.5 p
        3.1.6 span
        3.1.7 br
    3.2 Attribute Vocabulary
        3.2.1 id
        3.2.2 xml:lang
        3.2.3 xml:space
4 Styling
    4.1 Element Vocabulary
        4.1.1 styling
        4.1.2 style
    4.2 Attribute Vocabulary
        4.2.1 style
        4.2.2 tts:background-color
        4.2.3 tts:color
        4.2.4 tts:display-align
        4.2.5 tts:extent
        4.2.6 tts:font-family
        4.2.7 tts:font-size
        4.2.8 tts:font-style
        4.2.9 tts:font-weight
        4.2.10 tts:line-height
        4.2.11 tts:origin
        4.2.12 tts:overflow
        4.2.13 tts:text-align
        4.2.14 tts:text-outline
        4.2.15 tts:wrap-option
        4.2.16 tts:writing-mode
        4.2.17 tts:z-index
    4.3 Style Value Expressions
        4.3.1 <color>
        4.3.2 <digit>
        4.3.3 <family-name>
        4.3.4 <generic-family-name>
        4.3.5 <hex-digit>
        4.3.6 <integer>
        4.3.7 <length>
        4.3.8 <named-color>
        4.3.9 <quoted-string>
        4.3.10 <string>
    4.4 Style Association
        4.4.1 Inline Styling
        4.4.2 Referential Styling
        4.4.3 Chained Referential Styling
    4.5 Style Inheritance
        4.5.1 Content Style Inheritance
        4.5.2 Region Style Inheritance
5 Layout
    5.1 Element Vocabulary
        5.1.1 layout
        5.1.2 region
    5.2 Attribute Vocabulary
        5.2.1 region
    5.3 Region Layout
    5.4 Line Layout
6 Timing
    6.1 Element Vocabulary
    6.2 Attribute Vocabulary
        6.2.1 begin
        6.2.2 end
        6.2.3 dur
        6.2.4 timeAction
        6.2.5 timeContainer
    6.3 Time Value Expressions
        6.3.1 <media-marker-expression>
        6.3.2 <media-time-expression>
        6.3.3 <smpte-frame-label>
        6.3.4 <smpte-marker-expression>
        6.3.5 <time-expression>
7 Metadata
    7.1 Element Vocabulary
        7.1.1 meta
        7.1.2 ttm:title
        7.1.3 ttm:desc
        7.1.4 ttm:agent
        7.1.5 ttm:name
        7.1.6 ttm:actor
    7.2 Attribute Vocabulary
        7.2.1 ttm:agent
        7.2.2 ttm:cell-resolution
        7.2.3 ttm:content-extent
        7.2.4 ttm:content-origin
        7.2.5 ttm:frame-extent
        7.2.6 ttm:frame-origin
        7.2.7 ttm:frame-rate
        7.2.8 ttm:pixel-aspect-ratio
        7.2.9 ttm:role

Appendices

A Schemas
    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
C Other References (Non-Normative)
D Acknowledgments (Non-Normative)


1 Introduction

Editorial note: GA 2004-10-18
Supply introduction, including fully worked out example, the text of which may be placed into an informative annex.

1.1 Vocabulary Namespaces

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/2003/10/tt-af-1-0
TT Style tts: http://www.w3.org/2003/10/tt-af-1-0#style
TT Style Extension ttsx: http://www.w3.org/2003/10/tt-af-1-0#style-extension
TT Metadata ttm: http://www.w3.org/2003/10/tt-af-1-0#metadata
TT Metadata Extension ttmx: http://www.w3.org/2003/10/tt-af-1-0#metadata-extension

1.2 Vocabulary Overview

This section provides an overview of the element and attribute vocabulary defined by 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:description, 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:title, ttm:desc

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

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 Notations

Editorial note: GA 2004-10-18
Document the notations used by this specification.

3 Content

This section specifies the content matter of the DFXP.

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

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

<tt
  id = ID
  xml:lang = string
  xml:space = (default|preserve)
  Content: head?, body?
</tt>

An xml:lang attribute shall 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 shall be considered as if the attribute had been specified with a value of default.

3.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 meta elements, followed by zero or one styling element, followed by zero or one layout element.

Any metadata specified by meta element children 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.

<head
  id = ID
  xml:lang = string
  xml:space = (default|preserve)
  Content: Meta.class*, styling?, layout?
</head>

3.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 meta elements, followed by zero or more div elements.

Any metadata specified by meta element children applies semantically to the body element as a whole.

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

3.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 meta elements, 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 meta element children applies semantically to the div element as a whole.

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

3.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 sequence of block areas, each containing one or more line areas, which, in turn, contain one or more glyph areas.

<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 none or one region when temporally active. 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 shall 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 shall be considered to be an anonymous span for the purpose of applying style properties that apply to span elements.

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

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

3.1.7 br

The br element denotes an explicit line break.

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

<br
  id = ID
  xml:lang = string
  xml:space = (default|preserve)>
  Content: EMPTY
</br>

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

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

3.2.2 xml:lang

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

The xml:lang attribute shall be specified on the tt element and may be specified by an instance of any other element type in the DFXP.

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

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

4.1 Element Vocabulary

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

  • styling

  • style

4.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 meta elements, followed by zero or more style elements.

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

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

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

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

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

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

<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 – tts:background-color
Rendition of DFXP background-color style property example

Note:

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

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

<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 – tts:color
Rendition of DFXP color style property example

Note:

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

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

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

<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 – tts:display-align
Rendition of DFXP display-align style property example

Note:

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

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

<region id="r1">
  <style tts:extent="305px;86px"/>
  <style tts:background-color="red"/>
  <style tts:color="white"/>
  <style tts:display-align="after"/>
  <style tts:text-align="center"/>
</region>
...
<p region="r1">It's secret agent Bluebottle!</p>

Example – tts:extent
Rendition of DFXP extent style property example

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

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

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

Example – tts:font-family
Rendition of DFXP font-family style property example

Note:

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

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

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

<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 – tts:font-size
Rendition of DFXP font-size style property example

Note:

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

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

<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 – tts:font-style
Rendition of DFXP font-style style property example

Note:

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

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

<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 – tts:font-weight
Rendition of DFXP font-weight style property example

Note:

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

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

<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>
...
<div region="r1">
  <p>Bluebottle: Do you know I learned all my boxing off comic strips?</p>
  <p>Have you ever seen a comic strip?</p>
  <p>Prince John: Only in a steam bath. It was ghastly.</p>
</div>

Example – tts:line-height
Rendition of DFXP line-height style property example

Editorial note: GA 2004-10-18
The above example does not correctly depict tts:line-height, and needs to be replaced or modified.

Note:

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

4.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 shall 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 shall 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, which, if the root container extent is 640 by 480 pixels, would result in placement of the region area such that the bottom of the region is positioned at the 9/10ths point downwards from the top edge of the root container, and the center of the region is positioned at the 5/10ths point rightwards from the left edge of the root container.

<region id="r1">
  <style tts:origin="167px;346px"/>
  <style tts:extent="305px;86px"/>
  <style tts:background-color="red"/>
  <style tts:color="white"/>
  <style tts:display-align="after"/>
  <style tts:text-align="center"/>
</region>
...
<p region="r1">It's secret agent Bluebottle!</p>

Example – tts:origin
Rendition of DFXP origin style property example

Editorial note: GA 2004-10-18
Replace above example with one that shows use of tts:origin with respect to a root container region area.

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

<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 – tts:overflow
Rendition of DFXP overflow style property example

Note:

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

4.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 | after | inherit
Initial: start
Applies to: p
Inherited: yes

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

<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 – tts:text-align
Rendition of DFXP text-align style property example

Note:

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

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

<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 0px 2px"/>
  <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 – tts:text-outline
Rendition of background-color style property example

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

<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 – tts:wrap-option
Rendition of DFXP wrap-option style property example

Note:

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

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

<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 – tts:writing-mode
Rendition of DFXP writing-mode style property example

Note:

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

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

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

<region id="r1">
  <style tts:origin="0px;0px"/>
  <style tts:extent="265px;100px"/>
  <style tts:background-color="black"/>
  <style tts:color="red"/>
  <style tts:display-align="before"/>
  <style tts:text-align="start"/>
  <style tts:z-index="0"/>
</region>
<region id="r2">
  <style tts:origin="0px;120px"/>
  <style tts:extent="265px;100px"/>
  <style tts:background-color="black"/>
  <style tts:color="red"/>
  <style tts:display-align="after"/>
  <style tts:text-align="start"/>
  <style tts:z-index="0"/>
</region>
<region id="r3">
  <style tts:origin="205px;60px"/>
  <style tts:extent="290px;100px"/>
  <style tts:background-color="red"/>
  <style tts:color="black"/>
  <style tts:display-align="before"/>
  <style tts:text-align="end"/>
  <style tts:z-index="1"/>
</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">
  Fool! Didn't you notice?<br/>
  I was whistling in English.
</p>
<p region="r3">
  Wait! That's the <span tts:font-style="italic">Hungarian Rhapsody<span>.<br/>
  What's secret about that?
</p>

Example – tts:z-index
Rendition of DFXP z-index style property example

Editorial note: GA 2004-10-18
Need to revise above example image to use opaque colors; DFXP doesn't support opacity.

Note:

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

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

4.3.1 <color>

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

<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>+

4.3.2 <digit>

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

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

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

<family-name>
  : <string>
  | <quoted-string>

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

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

4.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 shall be made between lower and upper case.

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

4.3.6 <integer>

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

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

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

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

4.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 shall be made between lower and upper case.

<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

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

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

4.3.10 <string>

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

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

4.4 Style Association

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

  • inline styling

  • referential styling

  • chained referential styling

4.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 4.5.1 Content Style Inheritance below.

4.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 4.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 4.5.1 Content Style Inheritance below.

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

4.5 Style Inheritance

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

  • content style inheritance

  • region style inheritance

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

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

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

5.1 Element Vocabulary

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

  • layout

  • region

5.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 meta elements, followed by zero or more region elements.

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

5.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 meta elements, followed by zero or more style elements.

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

5.2 Attribute Vocabulary

This section defines the region attribute used with content elements.

5.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 5.3 Region Layout below for further information on content flow in a region.

5.3 Region Layout

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

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

6.1 Element Vocabulary

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

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

6.2.1 begin

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

6.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 shall adhere to a <time-expression> specification as defined by 6.3.5 <time-expression>.

6.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 shall adhere to a <media-time-expression> specification as defined by 6.3.2 <media-time-expression>.

6.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 shall be one of the following:

  • display

  • visibility

If the time action of an element instance is display, then temporal activation of the element shall 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 shall be interpreted as the converse. The process of temporally activating or deactiviting an element with time action semantics of display shall 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 shall be interpreted as meaning that the element is a candidate for manifest presenation independently of its layout (flow), while temporal deactivation shall be interpreted as the converse. The process of temporally activating or deactiviting an element with time action semantics of visibilit shall 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 shall apply.

6.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 shall 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., simultanesouly 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 shall apply unless it is a body element, in which case seq time container semantics shall apply.

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

  • body

  • div

  • p

  • span

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

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

<media-marker-expression>
  : <smpte-marker-expression>

A temporal duration shall 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.

6.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 7.2.7 ttm:frame-rate for further information on explicit specification of frame rate metadata.

<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 is specified, then a metric of seconds shall apply.

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 6.3.4 <smpte-marker-expression>.

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

<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

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

<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> shall 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> shall 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 shall be interpreted as if the subframe were 0, and a subframe in the range 50 to 99 shall 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 shall be interpreted as the first field of the specified frame, and a subframe in the range 50 to 99 shall 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 6.3.2 <media-time-expression>.

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

<time-expression>
  : <media-time-expression>
  | <media-marker-expression>

Note:

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

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

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

  • ttm:name

  • ttm:actor

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

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

7.1.2 ttm:title

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

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

7.1.3 ttm:desc

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

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

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

<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 shall be specified on each ttm:agent element, and, if specified, shall 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.

7.1.5 ttm:name

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

<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 shall be specified on each ttm:name element, and, if specified, shall 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.

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

<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 shall reference another ttm:agent element that denotes the person, group, or organization acting the part of a character.

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

  • tts:agent

  • tts:content-extent

  • tts:content-origin

  • tts:frame-extent

  • tts:frame-origin

  • tts:frame-rate

  • tts:pixel-aspect-ratio

  • tts:resolution

  • tts:role

Note:

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

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

7.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 shall adhere to the following syntax:

ttm:cell-resolution
  : rows ":" cols
rows | cols
  : <digit>+

If not specified, then any reference to a cell by presentation syling matter shall be interpreted as equivalent to a pixel.

7.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 shall take the same form as the tts:extent attribute.

7.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 shall take the same form as the tts:origin attribute.

7.2.5 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 shall take the same form as the tts:extent attribute.

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.

7.2.6 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 shall take the same form as the tts:origin attribute.

7.2.7 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 shall adhere to the following syntax:

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 6.3.3 <smpte-frame-label> above; otherwise, if the value takes the form of a real number, then that number shall be interpreted as the (possibly non-integral) number of frames per second.

7.2.8 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 shall adhere to the following syntax:

ttm:pixel-aspect-ratio
  : <digit>+ ":" <digit>+

If not specified, then square pixels shall be assumed to apply.

7.2.9 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 shall adhere to the following syntax:

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

This annex specifies the following schemas for use with DFXP document instances:

In any case where a schema specified by this annex 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 shall take precedence.

A.1 Relax NG Schema

This sub-annex specifies a Relax NG Compact Syntax (RNC) 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/2003/10/tt-af-1-0"
# generic tt modules
include "tt-af-1-0-dfxp-datatypes.rnc"
include "tt-af-1-0-dfxp-classes.rnc"
include "tt-af-1-0-dfxp-core-attribs.rnc"
include "tt-af-1-0-dfxp-metadata-attribs.rnc"
include "tt-af-1-0-dfxp-styling-attribs.rnc"
include "tt-af-1-0-dfxp-timing-attribs.rnc"
include "tt-af-1-0-dfxp-metadata.rnc"
include "tt-af-1-0-dfxp-metadata-items.rnc"
include "tt-af-1-0-dfxp-styling.rnc"
include "tt-af-1-0-dfxp-layout.rnc"
include "tt-af-1-0-dfxp-content.rnc"
include "tt-af-1-0-dfxp-head.rnc"
include "tt-af-1-0-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.Boolean.datatype =
  "false" |
  "true"
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.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.RegionCombine.datatype =
  "append" |
  "overlay" |
  "replace"
TTAF.Overflow.datatype =
  "visible" |
  "hidden" |
  "inherit"
TTAF.TextAlign.datatype =
  "start" |
  "center" |
  "end" |
  "justify" |
  "inherit"
TTAF.TextOutline.datatype =
  string
TTAF.TimeAction.datatype =
  "display" |
  "visibility"
TTAF.TimeContainer.datatype =
  "par" |
  "seq"
TTAF.TimeCoordinate.datatype =
  string
TTAF.TimeDuration.datatype =
  string
TTAF.URI.datatype = xsd:anyURI
TTAF.WrapOption.datatype =
  "wrap" |
  "no-wrap" |
  "inherit"
TTAF.WritingMode.datatype =
  "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/2003/10/tt-af-1-0"
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/2003/10/tt-af-1-0#metadata"
namespace ttmx = "http://www.w3.org/2003/10/tt-af-1-0#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*)
## 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.desc |
  TTAF.meta.title
# .......................................................................
# .......................................................................
# .......................................................................
A.1.2.10 Metadata Attributes Module
# .......................................................................
# TT-AF 1.0 DFXP Metadata Attributes Module ..............................
# .......................................................................
namespace tt = "http://www.w3.org/2003/10/tt-af-1-0"
namespace ttm = "http://www.w3.org/2003/10/tt-af-1-0#metadata"
namespace ttmx = "http://www.w3.org/2003/10/tt-af-1-0#metadata-extension"
namespace local = ""
# Standard Metadata Attributes
TTAF.agent.attrib
  = attribute ttm:agent { xsd:IDREFS }?
TTAF.role.attrib
  = attribute ttm:role { xsd:NMTOKENS }?
# 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/2003/10/tt-af-1-0"
namespace tts = "http://www.w3.org/2003/10/tt-af-1-0#style"
namespace ttsx = "http://www.w3.org/2003/10/tt-af-1-0#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 sub-annex specifies a W3C XML Schema Definition (XSD) 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

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)

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