From W3C Wiki
Jump to: navigation, search

< Change Proposal Index

Amendments to the extent and origin Attribute - CLOSED-IMPLEMENTED

  • The following is a Change Proposal for Issue 176
  • Owner: Jerry Smith.
  • Date: April 18, 2012.


A common industry practice today is to apply positioning on a per-caption basis. Carrying positioning information in a succinct manner is therefore essential to successfully replicating 608 in IP delivery.

Since TTML currently models captions as content, styles, and regions, the presentation of an individually positioned caption necessitates the presence of precursor style and region information. This requires the retransmission of this static state at frequent intervals. It also places burden on the client to apply the set of rules for determining temporal positioning and styling by aggregating the three types of data.

CEA-608 captions, in contrast, are flat and self-contained. You can enter the stream at any individual caption and all the information needed to present that caption is sent at the time of presentation. Optional components are not sent, only the attributes which have been selected or overridden.

The proposal would update

to allow a caption in its simplest (and most common form) could be represented by:

   <p begin="nn:nn:nn:nn" end="nn:nn:nn:nn" 
      tts:origin="10% 75%" tts:extent="1em 20em">
      The quick brown fox</p>

This would result in dramatic simplification for this most common case, allowing smaller "headless" TTML documents, reduced XML tree sizes, and easier parsing both by tools and rendering agents.

Furthermore, this will make TTML more amenable to read/write situations where tools needed to import existing TTML and edit it. It is currently difficult to map TTML to today's caption editing experiences. One can envision a day when tools will emerge that facilitate TTML's unique content model, but they do not exist today.

Tools which can import/export many other caption formats would benefit from being able to read TTML with as much ease as alternate formats. Making positioning a direct attribute of content serves this scenario and makes it easier to parse back into discrete caption attributes.

It should be noted that this usage actually validates today under W3C XSD schema for TTML and that large captioning tools providers have already begun producing such TTML, making this a not unlikely de facto practice.

The proposal is that that the specification be updated to formally allow this.


origin and extent applies to

8.2.14 tts:origin and tts:extent would need to have "applies to" amended to include all block elements as well as regions.

Add section 9.3.5 Elaborated Example 2 (Informative)

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

Example – Sample Source Document

<tt tts:extent="640px 480px" xml:lang="en"
   <body xml:id="b1">
    <div xml:id="d1" begin="0s" dur="2s">
      <p xml:id="p1" tts:origin="10px 300px" tts:extent="300px 40px">Text 1</p>
      <p xml:id="p2" tts:origin="20px 300px" tts:extent="290px 40px">Text 2</p>


<tt tts:extent="640px 480px" xml:lang="en"
      <region xml:id="default">
        <style tts:origin="0% 0%"/>
        <style tts:extent="100% 100%"/>
   	<body xml:id="b1">
  	  <div xml:id="d1" begin="0s" dur="2s">
  	    <p xml:id="p1" tts:origin="10px 300px" tts:extent="300px 40px">Text 1</p>
  	    <p xml:id="p2" tts:origin="20px 300px" tts:extent="290px 40px">Text 2</p>

Example – XSL FO Document – [0s,2s)

<fo:root xmlns:fo="">
    <fo:simple-page-master master-name="m1"
      page-width="640px" page-height="480px">
  <fo:page-sequence master-reference="m1">
    <fo:flow flow-name="xsl-region-body">
      <!-- region (default) -->
      <fo:block-container id="default" absolute-position="fixed"
        left="0%" top="0%" width="100%" height="100%">
        <!-- body (b1) -->
        <fo:block id="b1">
          <!-- div (d1) -->
          <fo:block id="d1">
            <!-- p (p1) -->
            <fo:block-container id="p1-1" absolute-position="fixed"
                  left="20px" top="300px" width="300px" height="40px">
              <fo:block id="p1">
                <fo:inline>Text 1</fo:inline>
              <!-- TBD do we need filler here?-->
            <fo:block-container id="p1-2" absolute-position="fixed"
                   left="10px" top="300px" width="290px" height="40px">
              <fo:block id="p1">
                <fo:inline>Text 2</fo:inline>
              <!-- TBD do we need filler here?-->
      <!-- body's space filler -->


  • Brings specification in line with current practice permitted by schema.
  • Produces succinct documents for common case captioning scenarios.
  • Reduces document size and XML tree size.
  • Makes content model more consistent with CSS content positioning behavior.


[GA] Implemented in and Note that while implementation provides functional equivalence to the detailed proposed changes above, it does so in a different fashion that treats the use of tts:{extent,origin} on a block level content element as an implied region specification. As a consequence, the proposed examples shown above were modified to conform to the implemented mechanism. See for further details.