[ttml2] add tts:border styling attribute (issue 20)
authorGlenn Adams <glenn@skynav.com>
Sat, 24 Aug 2013 14:42:57 -0600
changeset 480 9b0f69325bde
parent 479 34acc1a0f5f7
child 481 bcffddd09978
[ttml2] add tts:border styling attribute (issue 20)
ttml2/spec/profiles/dfxp-full.xml
ttml2/spec/profiles/dfxp-presentation.xml
ttml2/spec/profiles/dfxp-transformation.xml
ttml2/spec/rnc/ttml2-datatypes.rnc
ttml2/spec/rnc/ttml2-styling-attribs.rnc
ttml2/spec/ttml2-changes.html
ttml2/spec/ttml2.xml
ttml2/spec/xsd/ttml2-datatypes.xsd
ttml2/spec/xsd/ttml2-styling-attribs.xsd
--- a/ttml2/spec/profiles/dfxp-full.xml	Sat Aug 24 12:04:08 2013 -0600
+++ b/ttml2/spec/profiles/dfxp-full.xml	Sat Aug 24 14:42:57 2013 -0600
@@ -9,6 +9,7 @@
     <feature value="required">#backgroundColor-region</feature>
     <feature value="required">#backgroundColor</feature>
     <feature value="required">#bidi</feature>
+    <feature value="required">#border</feature>
     <feature value="required">#cellResolution</feature>
     <feature value="required">#clockMode-gps</feature>
     <feature value="required">#clockMode-local</feature>
--- a/ttml2/spec/profiles/dfxp-presentation.xml	Sat Aug 24 12:04:08 2013 -0600
+++ b/ttml2/spec/profiles/dfxp-presentation.xml	Sat Aug 24 14:42:57 2013 -0600
@@ -17,6 +17,7 @@
     <feature value="optional">#backgroundColor-region</feature>
     <feature value="optional">#backgroundColor</feature>
     <feature value="optional">#bidi</feature>
+    <feature value="optional">#border</feature>
     <feature value="optional">#cellResolution</feature>
     <feature value="optional">#clockMode-gps</feature>
     <feature value="optional">#clockMode-local</feature>
--- a/ttml2/spec/profiles/dfxp-transformation.xml	Sat Aug 24 12:04:08 2013 -0600
+++ b/ttml2/spec/profiles/dfxp-transformation.xml	Sat Aug 24 14:42:57 2013 -0600
@@ -17,6 +17,7 @@
     <feature value="optional">#backgroundColor-region</feature>
     <feature value="optional">#backgroundColor</feature>
     <feature value="optional">#bidi</feature>
+    <feature value="optional">#border</feature>
     <feature value="optional">#cellResolution</feature>
     <feature value="optional">#clockMode-gps</feature>
     <feature value="optional">#clockMode-local</feature>
--- a/ttml2/spec/rnc/ttml2-datatypes.rnc	Sat Aug 24 12:04:08 2013 -0600
+++ b/ttml2/spec/rnc/ttml2-datatypes.rnc	Sat Aug 24 14:42:57 2013 -0600
@@ -8,6 +8,9 @@
 TTAF.Agent.datatype =
   xsd:IDREFS
 
+TTAF.Border.datatype =
+  string
+
 TTAF.CellResolution.datatype =
   string
 
--- a/ttml2/spec/rnc/ttml2-styling-attribs.rnc	Sat Aug 24 12:04:08 2013 -0600
+++ b/ttml2/spec/rnc/ttml2-styling-attribs.rnc	Sat Aug 24 14:42:57 2013 -0600
@@ -10,6 +10,8 @@
 
 TTAF.backgroundColor.attrib
   = attribute tts:backgroundColor { TTAF.Color.datatype }?
+TTAF.border.attrib
+  = attribute tts:border { TTAF.Border.datatype }?
 TTAF.color.attrib
   = attribute tts:color { TTAF.Color.datatype }?
 TTAF.direction.attrib
@@ -66,6 +68,7 @@
 
 TTAF.Styling.attrib.class &=
   TTAF.backgroundColor.attrib,
+  TTAF.border.attrib,
   TTAF.color.attrib,
   TTAF.direction.attrib,
   TTAF.display.attrib,
--- a/ttml2/spec/ttml2-changes.html	Sat Aug 24 12:04:08 2013 -0600
+++ b/ttml2/spec/ttml2-changes.html	Sat Aug 24 14:42:57 2013 -0600
@@ -2,7 +2,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<title>TTML 1.1 - List of changes</title>
+<title>TTML 2 - List of changes</title>
 <style type="text/css">
 div.exampleInner pre { margin-left: 1em;
                        margin-top: 0em; margin-bottom: 0em}
@@ -19,7 +19,7 @@
 <link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/base.css"/>
 </head>
 <body>
-<h1>Timed Text Markup Language (TTML) 2 Change Summary</h1>
+<h1>Timed Text Markup Language 2 (TTML2) Change Summary</h1>
 <p>1 <a href="#change-history">Change History</a> (Non-Normative)<br/>
     1.1 <a href="#change-history-ttml1-rec-2e-to-ttml2-fpwd">Draft Changes from TTML1 (2nd Ed.) to TTML2 First Public Working Draft</a><br/>
 </p>
@@ -35,33 +35,54 @@
 
 * In 6.1.1, add 'combine' attribute to ttp:profile element, including normative
   processing semantics.
+
 * In 6.1.3, add 'prohibited' value to 'value' attribute of ttp:feature element,
   including normative processing semantics.
+
 * In 6.1.5, add 'prohibited' value to 'value' attribute of ttp:extension element,
   including normative processing semantics.
+
 * In 7.1.7, add region attribute to 'br' element.
+
 * In 7.1.7, add timing attributes to 'br' element.
+
 * In 8.1.2, add Metadata.class children to 'style' element.
+
+* In 8.2, add tts:border styling attribute.
+
 * In 8.2.1, add 'set' element to enumeration of element types to which 'style'
   attribute applies.
+
+* In 8.3, add &lt;border-color&gt;, &lt;border-style&gt;, and &lt;border-width&gt;
+  value expressions.
+
 * In 8.4.4, add semantics for determining specified style set and computed style set
   for 'set' element.
+
 * In 11.1.1, add 'style' attribute to 'set' element.
+
 * In 11.1.1, permit multiple attributes from TT Style Namespace on 'set' element.
+
 * In Appendix C, remove contents for mediate type registration, since registration
   has (will have) already occurred (by the time TTML2 goes to FPWD).
+
+* In D.1, add #border feature designator.
+
 * In Appendix O, change appendix designation to normative, effectively changing
   the informative concrete encoding recommendation to a normative recommendation.
+
 * In Appendix N, change appendix designation to normative, effectively making
   the time expression semantics normatively applicable.
 
 <span class="strong">Editorial Changes</span>
 
-* In 8.2.7, correct typo where "initial" value was written, but "computed" value
+* In 8.2.4, correct typo where "initial" value was written, but "computed" value
   intended.
-* In 8.2.12, correct typo where "initial" value was written, but "computed" value
+
+* In 8.2.13, correct typo where "initial" value was written, but "computed" value
   intended.
-* In 8.2.13, correct typo where "initial" value was written, but "computed" value
+
+* In 8.2.14, correct typo where "initial" value was written, but "computed" value
   intended.
 </pre>
 </div>
--- a/ttml2/spec/ttml2.xml	Sat Aug 24 12:04:08 2013 -0600
+++ b/ttml2/spec/ttml2.xml	Sat Aug 24 14:42:57 2013 -0600
@@ -1657,6 +1657,7 @@
 </td>
 <td>
 <loc href="#style-attribute-backgroundColor">tts:backgroundColor</loc>,
+<loc href="#style-attribute-border">tts:border</loc>,
 <loc href="#style-attribute-color">tts:color</loc>,
 <loc href="#style-attribute-direction">tts:direction</loc>,
 <loc href="#style-attribute-display">tts:display</loc>,
@@ -3481,6 +3482,7 @@
 that support inline style specifications:</p>
 <ulist>
 <item><p><specref ref="style-attribute-backgroundColor"/></p></item>
+<item><p><specref ref="style-attribute-border"/></p></item>
 <item><p><specref ref="style-attribute-color"/></p></item>
 <item><p><specref ref="style-attribute-direction"/></p></item>
 <item><p><specref ref="style-attribute-display"/></p></item>
@@ -3505,6 +3507,13 @@
 <item><p><specref ref="style-attribute-writingMode"/></p></item>
 <item><p><specref ref="style-attribute-zIndex"/></p></item>
 </ulist>
+<ednote>
+<name>Additional Border Styling Attributes</name>
+<date>2013-08-24</date>
+<edtext>Consider adding support for <code>tts:borderColor</code>, <code>tts:borderStyle</code>, and <code>tts:borderWidth</code>
+in order to provide a means to independently express styling of the four different borders (top, right, bottom, left). As currently specified, i.e., with only the
+<code>tts:border</code> attribute, one can only express the four borders using the same color, style, and width.</edtext>
+</ednote>
 <p>Unless explicitly stated otherwise, linear white-space (LWSP) must
 appear between adjacent non-terminal components of a value of a TT
 Style or TT Style Extension
@@ -3646,6 +3655,117 @@
 that defined by <bibref ref="xsl11"/>, &sect; 7.8.2.</p>
 </note>
 </div3>
+
+<div3 id="style-attribute-border">
+<head>tts:border</head>
+<p>The <att>tts:border</att> attribute is used to specify a style property that
+defines the border of a region or an area generated by content flowed into a region.</p>
+<p>This attribute may be specified by any
+element type
+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.</p>
+<table id="style-property-details-border" role="common">
+<col width="25%"/>
+<col/>
+<tbody>
+<tr>
+<td><emph>Values:</emph></td>
+<td>
+[
+<loc href="#style-value-border-width">&lt;border-width&gt;</loc> ||
+<loc href="#style-value-border-style">&lt;border-style&gt;</loc> ||
+<loc href="#style-value-border-color">&lt;border-color&gt;</loc>
+]
+</td>
+</tr>
+<tr>
+<td><emph>Initial:</emph></td>
+<td><code>none</code></td>
+</tr>
+<tr>
+<td><emph>Applies to:</emph></td>
+<td>
+<loc href="#document-structure-vocabulary-body"><el>body</el></loc>,
+<loc href="#content-vocabulary-div"><el>div</el></loc>,
+<loc href="#content-vocabulary-p"><el>p</el></loc>,
+<loc href="#layout-vocabulary-region"><el>region</el></loc>,
+<loc href="#content-vocabulary-span"><el>span</el></loc>
+</td>
+</tr>
+<tr>
+<td><emph>Inherited:</emph></td>
+<td>no</td>
+</tr>
+<tr>
+<td><emph>Percentages:</emph></td>
+<td>N/A</td>
+</tr>
+<tr>
+<td><emph>Animatable:</emph></td>
+<td>discrete</td>
+</tr>
+</tbody>
+</table>
+<p>For the purpose of determining applicability of this style property,
+each character child of a <el>p</el> element is considered to be enclosed in an anonymous
+span.</p>
+<p>If no border width is specified in the value of the <att>tts:border</att> property,
+then the border width must be interpreted as if a width of
+<code>medium</code> were specified.</p>
+<p>If no border style is specified in the value of the <att>tts:border</att> property,
+then the border style must be interpreted as if a style of
+<code>none</code> were specified.</p>
+<p>If no border color is specified in the value of the <att>tts:border</att> property,
+then the border color must be interpreted as if a color equal
+to the computed value of the element's <code>tts:color</code> property were specified.</p>
+<p>The <att>tts:border</att> style is illustrated by the following example.</p>
+<table id="style-attribute-border-example-1" role="example">
+<caption>Example Fragment &ndash; Background Color</caption>
+<tbody>
+<tr>
+<td>
+<eg xml:space="preserve">
+&lt;region xml:id="r1"&gt;
+  &lt;style tts:extent="306px 114px"/&gt;
+  &lt;style <phrase role="strong">tts:border="2px solid red"</phrase>/&gt;
+  &lt;style tts:color="white"/&gt;
+  &lt;style tts:displayAlign="after"/&gt;
+  &lt;style tts:padding="3px 40px"/&gt;
+&lt;/region&gt;
+...
+&lt;p region="r1" <phrase role="strong">tts:border="4px solid green"</phrase> tts:textAlign="center"&gt;
+  Twinkle, twinkle, little bat!&lt;br/&gt;
+  How &lt;span <phrase role="strong">tts:border="8px solid blue"</phrase>&gt;I wonder&lt;/span&gt; where you're at!
+&lt;/p&gt;
+</eg>
+</td>
+</tr>
+</tbody>
+</table>
+<p></p>
+<ednote>
+<name>Border Example Image</name>
+<date>2013-08-24</date>
+<edtext>Insert image of border example.</edtext>
+</ednote>
+<!--
+<table id="style-attribute-border-example-1-images" role="example-images">
+<caption>Example Rendition &ndash; Border</caption>
+<tbody>
+<tr>
+<td>
+<graphic source="images/border.png" alt="TTML border style property"/>
+</td>
+</tr>
+</tbody>
+</table>
+-->
+<note role="derivation">
+<p>The semantics of the style property represented by this attribute are based upon 
+that defined by <bibref ref="xsl11"/>, &sect; 7.31.3.</p>
+</note>
+</div3>
+
 <div3 id="style-attribute-color">
 <head>tts:color</head>
 <p>The <att>tts:color</att> attribute is used to specify a style property that
@@ -5531,7 +5651,7 @@
 <caption>Example Rendition &ndash; Text Outline</caption>
 <tbody>
 <tr>
-<td><graphic source="images/textOutline.png" alt="backgroundColor style property"/></td>
+<td><graphic source="images/textOutline.png" alt="textOutline style property"/></td>
 </tr>
 </tbody>
 </table>
@@ -6098,6 +6218,9 @@
 <p>Style property values include the use of the following expressions:</p>
 <ulist>
 <item><p><specref ref="style-value-alpha"/></p></item>
+<item><p><specref ref="style-value-border-color"/></p></item>
+<item><p><specref ref="style-value-border-style"/></p></item>
+<item><p><specref ref="style-value-border-width"/></p></item>
 <item><p><specref ref="style-value-color"/></p></item>
 <item><p><specref ref="style-value-digit"/></p></item>
 <item><p><specref ref="style-value-familyName"/></p></item>
@@ -6140,6 +6263,81 @@
 valid opacity value, then it must interpret it as being equal to the
 closest supported value.</p>
 </div3>
+
+<div3 id="style-value-border-color">
+<head>&lt;border-color&gt;</head>
+<p>A &lt;border-color&gt; expression is used to express the color of one
+or more borders.</p>
+<table id="border-color-style-expression-syntax" role="syntax">
+<caption>Syntax Representation &ndash; &lt;border-color&gt;</caption>
+<tbody>
+<tr>
+<td>
+<eg xml:space="preserve">
+&lt;border-color&gt;
+  : <loc href="#style-value-color">&lt;color&gt;</loc>
+</eg>
+</td>
+</tr>
+</tbody>
+</table>
+</div3>
+
+<div3 id="style-value-border-style">
+<head>&lt;border-style&gt;</head>
+<p>A &lt;border-style&gt; expression is used to express the style of one
+or more borders.</p>
+<table id="border-style-style-expression-syntax" role="syntax">
+<caption>Syntax Representation &ndash; &lt;border-style&gt;</caption>
+<tbody>
+<tr>
+<td>
+<eg xml:space="preserve">
+&lt;border-style&gt;
+  : none
+  | dotted
+  | dashed
+  | solid
+  | double
+</eg>
+</td>
+</tr>
+</tbody>
+</table>
+<p>The interpretation of <code>dotted</code>, <code>dashed</code>, and <code>double</code> are considered
+to be implementation dependent.</p>
+<p>If an implementation does not recognize or otherwise distinguish one of these border style values, then
+it must be interpreted as if a style of <code>solid</code> were specified; however, an implementation that
+supports borders must minimally support the <code>none</code> and <code>solid</code> values.</p>
+</div3>
+
+<div3 id="style-value-border-width">
+<head>&lt;border-width&gt;</head>
+<p>A &lt;border-width&gt; expression is used to express the width of one
+or more borders.</p>
+<table id="border-width-style-expression-syntax" role="syntax">
+<caption>Syntax Representation &ndash; &lt;border-width&gt;</caption>
+<tbody>
+<tr>
+<td>
+<eg xml:space="preserve">
+&lt;border-width&gt;
+  : thin
+  | medium
+  | thick
+  | <loc href="#style-value-length">&lt;length&gt;</loc>
+</eg>
+</td>
+</tr>
+</tbody>
+</table>
+<p>The interpretation of <code>thin</code>, <code>medium</code>, and <code>thick</code> are considered
+to be implementation dependent; however, the resolved lengths of these widths must adhere to the following
+constraints: width(thin) &lt; width(medium); width(medium) &lt; width(thick).</p>
+<p>If a border width is expressed as a <loc href="#style-value-length">&lt;length&gt;</loc>,
+then it must not take the form of a percentage value; i.e., it must take the form of a scalar value.</p>
+</div3>
+
 <div3 id="style-value-color">
 <head>&lt;color&gt;</head>
 <p>A &lt;color&gt; expression is used to specify a named color, exact RGB color triple,
@@ -8886,6 +9084,27 @@
 href="#feature-writingMode-horizontal"><code>#writingMode-horizontal</code></loc></p></item>
 </ulist>
 </div3>
+<div3 id="feature-border">
+<head>#border</head>
+<p>A TTML transformation processor supports the
+<code>#border</code> feature if it recognizes and is capable of
+transforming the <loc
+href="#style-attribute-border"><att>tts:border</att></loc>
+attribute.</p>
+<p>A TTML presentation processor supports the
+<code>#border</code> feature if it (1) implements presentation semantic support
+for the <loc
+href="#style-attribute-border"><att>tts:border</att></loc>
+attribute
+and (2) is capable of displaying or generating an output display
+signal that distinguishes between at least sixteen (16) values of border colors,
+including all primary and secondary colors of the SRGB color space.</p>
+<ednote>
+<name>Features related to tts:border</name>
+<date>2013-08-23</date>
+<edtext>Add additional border related features.</edtext>
+</ednote>
+</div3>
 <div3 id="feature-cellResolution">
 <head>#cellResolution</head>
 <p>A TTML transformation processor supports the
@@ -10524,6 +10743,11 @@
 <td>O</td>
 </tr>
 <tr>
+<td><loc href="#feature-border"><code>#border</code></loc></td>
+<td>O</td>
+<td>O</td>
+</tr>
+<tr>
 <td><loc href="#feature-cellResolution"><code>#cellResolution</code></loc></td>
 <td>O</td>
 <td>O</td>
@@ -12381,6 +12605,13 @@
 <td>1,6</td>
 </tr>
 <tr>
+<td><loc href="#style-attribute-border"><code>tts:border</code></loc></td>
+<td><code>border</code></td>
+<td><bibref ref="xsl11"/></td>
+<td><code>-inherit</code></td>
+<td>1,6</td>
+</tr>
+<tr>
 <td><loc href="#style-attribute-color"><code>tts:color</code></loc></td>
 <td><code>color</code></td>
 <td><bibref ref="xsl11"/></td>
--- a/ttml2/spec/xsd/ttml2-datatypes.xsd	Sat Aug 24 12:04:08 2013 -0600
+++ b/ttml2/spec/xsd/ttml2-datatypes.xsd	Sat Aug 24 14:42:57 2013 -0600
@@ -8,6 +8,12 @@
   <xs:simpleType name="agent">
     <xs:restriction base="xs:IDREFS"/>
   </xs:simpleType>
+  <xs:simpleType name="border">
+    <xs:annotation>
+      <xs:documentation>[ borderWidth || borderStyle || borderColor ]</xs:documentation>
+    </xs:annotation>
+    <xs:restriction base="xs:string"/>
+  </xs:simpleType>
   <xs:simpleType name="cellResolution">
     <xs:annotation>
       <xs:documentation>positiveInteger positiveInteger</xs:documentation>
--- a/ttml2/spec/xsd/ttml2-styling-attribs.xsd	Sat Aug 24 12:04:08 2013 -0600
+++ b/ttml2/spec/xsd/ttml2-styling-attribs.xsd	Sat Aug 24 14:42:57 2013 -0600
@@ -6,6 +6,7 @@
   <xs:import namespace="http://www.w3.org/ns/ttml#datatype"
     schemaLocation="ttml2-datatypes.xsd"/>
   <xs:attribute name="backgroundColor" type="ttd:color"/>
+  <xs:attribute name="border" type="ttd:border"/>
   <xs:attribute name="color" type="ttd:color"/>
   <xs:attribute name="direction" type="ttd:direction"/>
   <xs:attribute name="display" type="ttd:display"/>
@@ -31,6 +32,7 @@
   <xs:attribute name="zIndex" type="ttd:zIndex"/>
   <xs:attributeGroup name="Styling.attrib.class">
     <xs:attribute ref="tts:backgroundColor"/>
+    <xs:attribute ref="tts:border"/>
     <xs:attribute ref="tts:color"/>
     <xs:attribute ref="tts:direction"/>
     <xs:attribute ref="tts:display"/>