Skip to content

Commit

Permalink
[giow] (0) Captions - Stage 14: Define the output of parsing a WebSRT…
Browse files Browse the repository at this point in the history
… text cue.

git-svn-id: http://svn.whatwg.org/webapps@5126 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jul 1, 2010
1 parent 739042a commit 0a038c0
Show file tree
Hide file tree
Showing 3 changed files with 329 additions and 42 deletions.
120 changes: 105 additions & 15 deletions complete.html
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
<hgroup><h1>Web Applications 1.0</h1>
<h2 class="no-num no-toc">Draft Standard &mdash; 30 June 2010</h2>
<h2 class="no-num no-toc">Draft Standard &mdash; 1 July 2010</h2>
</hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
<p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
<!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
Expand Down Expand Up @@ -565,7 +565,8 @@ <h2 class="no-num no-toc" id=contents>Table of contents</h2>
<ol>
<li><a href=#syntax-0><span class=secno>4.8.10.11.1 </span>Syntax</a></li>
<li><a href=#parsing-0><span class=secno>4.8.10.11.2 </span>Parsing</a></li>
<li><a href=#websrt-cue-text-parsing-and-rendering-rules><span class=secno>4.8.10.11.3 </span>WebSRT cue text parsing and rendering rules</a></ol></li>
<li><a href=#websrt-cue-text-parsing-rules><span class=secno>4.8.10.11.3 </span>WebSRT cue text parsing rules</a></li>
<li><a href=#websrt-cue-text-dom-construction-rules><span class=secno>4.8.10.11.4 </span>WebSRT cue text DOM construction rules</a></ol></li>
<li><a href=#user-interface><span class=secno>4.8.10.12 </span>User interface</a></li>
<li><a href=#time-ranges><span class=secno>4.8.10.13 </span>Time ranges</a></li>
<li><a href=#mediaevents><span class=secno>4.8.10.14 </span>Event summary</a></li>
Expand Down Expand Up @@ -26597,7 +26598,7 @@ <h6 id=guidelines-for-exposing-cues-in-various-formats-as-timed-track-cues><span
<dd>
<p>Should be set to false unless the format uses a rendering and
positioning model for cues that is largely consistent with the
<a href=#websrt-cue-text-parsing-and-rendering-rules>WebSRT cue text parsing and rendering rules</a>.</p>
<a href=#websrt-cue-text-rendering-rules>WebSRT cue text rendering rules</a>.</p>
</dd>

<dt>The <a href=#timed-track-cue-line-position>timed track cue line position</a>
Expand All @@ -26606,9 +26607,9 @@ <h6 id=guidelines-for-exposing-cues-in-various-formats-as-timed-track-cues><span
<dt>The <a href=#timed-track-cue-alignment>timed track cue alignment</a>
</dt></dt></dt><dd>
<p>If the the format uses a rendering and positioning model for
cues that can be largely simulated using the <a href=#websrt-cue-text-parsing-and-rendering-rules>WebSRT cue text
parsing and rendering rules</a>, then these should be set to
the values that would give the same effect for <a href=#websrt>WebSRT</a>
cues that can be largely simulated using the <a href=#websrt-cue-text-rendering-rules>WebSRT cue text
rendering rules</a>, then these should be set to the values
that would give the same effect for <a href=#websrt>WebSRT</a>
cues. Otherwise, they should be set to zero.</p>
</dd>

Expand Down Expand Up @@ -26720,7 +26721,7 @@ <h6 id=cue-events><span class=secno>4.8.10.10.6 </span>Event definitions</h6>

<h5 id=websrt-0><span class=secno>4.8.10.11 </span>WebSRT</h5>

<p>The <dfn id=websrt>WebSRT</dfn>s format (Web Subtitle Resource Tracks) is a
<p>The <dfn id=websrt>WebSRT</dfn> format (Web Subtitle Resource Tracks) is a
format intended for marking up external timed track resources.</p>


Expand All @@ -26745,7 +26746,7 @@ <h6 id=syntax-0><span class=secno>4.8.10.11.1 </span>Syntax</h6>
<li>Optionally, one or more U+0020 SPACE characters or U+0009 CHARACTER TABULATION (tab) characters followed by <a href=#websrt-cue-settings>WebSRT cue settings</a>.</li>
<li>A <a href=#websrt-line-terminator>WebSRT line terminator</a>.</li>
<li>Optionally, a <a href=#websrt-voice-declaration>WebSRT voice declaration</a> followed by zero or more U+0020 SPACE characters or U+0009 CHARACTER TABULATION (tab) characters.</li>
<li><span title="WebSRT cue text line">WebSRT cue text</span>.</li>
<li><a href=#websrt-cue-text>WebSRT cue text</a>.</li>
</ol><p>A <dfn id=websrt-line-terminator>WebSRT line terminator</dfn> consists of one of the
following:</p>

Expand Down Expand Up @@ -27581,15 +27582,104 @@ <h6 id=parsing-0><span class=secno>4.8.10.11.2 </span>Parsing</h6>
steps.</li>

<li><p>Let the <a href=#timed-track-cue-text>timed track cue text</a> of <var title="">cue</var> be the substring of <var title="">input</var>
from the position indicated by <var title="">input</var> to the end
of the <var title="">input</var>, and let the rules for its
interpretation be the <a href=#websrt-cue-text-parsing-and-rendering-rules>WebSRT cue text parsing and rendering
rules</a> defined below.</li>
from the position indicated by <var title="">position</var> to the
end of the <var title="">input</var>, and let the rules for its
interpretation be the <a href=#websrt-cue-text-parsing-rules>WebSRT cue text parsing rules</a>,
the <a href=#websrt-cue-text-rendering-rules>WebSRT cue text rendering rules</a>, and the
<a href=#websrt-cue-text-dom-construction-rules>WebSRT cue text DOM construction rules</a>.</li>

</ol><h6 id=websrt-cue-text-parsing-and-rendering-rules><span class=secno>4.8.10.11.3 </span><dfn>WebSRT cue text parsing and rendering rules</dfn></h6>
</ol><h6 id=websrt-cue-text-parsing-rules><span class=secno>4.8.10.11.3 </span><dfn>WebSRT cue text parsing rules</dfn></h6>

<p class=XXX>...</p>
<p>A <dfn id=websrt-node-object>WebSRT Node Object</dfn> is a conceptual construct used to
represent components of <a href=#websrt-cue-text>WebSRT cue text</a> so that its
processing can be described without reference to the underlying
syntax.</p>

<p>There are two broad classes of <a href=#websrt-node-object title="WebSRT Node
Object">WebSRT Node Objects</a>: <a href=#websrt-internal-node-object title="WebSRT Internal
Node Object">WebSRT Internal Node Objects</a> and <a href=#websrt-leaf-node-object title="WebSRT Leaf Node Object">WebSRT Leaf Node Objects</a>.</p>

<p><dfn id=websrt-internal-node-object title="WebSRT Internal Node Object">WebSRT Internal Node
Objects</dfn> are those that can contain further <a href=#websrt-node-object title="WebSRT
Node Object">WebSRT Node Objects</a>. They are conceptually
similar to elements in HTML or the DOM. <a href=#websrt-internal-node-object title="WebSRT Internal
Node Object">WebSRT Internal Node Objects</a> have an ordered
list of child <a href=#websrt-node-object title="WebSRT Node Object">WebSRT Node
Objects</a>. The <a href=#websrt-internal-node-object>WebSRT Internal Node Object</a> is said
to be the <i>parent</i> of the children. Cycles do not occur; the
parent-child relationships so constructed form a tree structure.</p>

<p>There are five concrete classes of <a href=#websrt-internal-node-object title="WebSRT Internal
Node Object">WebSRT Internal Node Objects</a>:</p>

<dl><dt><dfn id=list-of-websrt-node-objects title="List of WebSRT Node Objects">Lists of WebSRT Node Objects</dfn></dt>
<dd>
<p>These are used as root nodes for trees of <a href=#websrt-node-object title="WebSRT
Node Object">WebSRT Node Objects</a>.</p>
</dd>

<dt><dfn id=websrt-italic-object title="WebSRT Italic Object">WebSRT Italic Objects</dfn></dt>
<dd>
<p>These represent spans of italic text (a <a href=#websrt-cue-italics-span>WebSRT cue
italics span</a>) in <a href=#websrt-cue-text>WebSRT cue text</a>.</p>
</dd>

<dt><dfn id=websrt-bold-object title="WebSRT Bold Object">WebSRT Bold Objects</dfn></dt>
<dd>
<p>These represent spans of bold text (a <a href=#websrt-cue-bold-span>WebSRT cue
bold span</a>) in <a href=#websrt-cue-text>WebSRT cue text</a>.</p>
</dd>

<dt><dfn id=websrt-ruby-object title="WebSRT Ruby Object">WebSRT Ruby Objects</dfn></dt>
<dd>
<p>These represent spans of ruby (a <a href=#websrt-cue-ruby-span>WebSRT cue
ruby span</a>) in <a href=#websrt-cue-text>WebSRT cue text</a>.</p>
</dd>

<dt><dfn id=websrt-ruby-text-object title="WebSRT Ruby Text Object">WebSRT Ruby Text Objects</dfn></dt>
<dd>
<p>These represent spans of ruby text (the component of a
<a href=#websrt-cue-ruby-span>WebSRT cue ruby span</a> that is between the "<code title="">&lt;rt&gt;</code>" and "<code title="">&lt;/rt&gt;</code>" strings) in <a href=#websrt-cue-text>WebSRT cue
text</a>.</p>
</dd>

</dl><p><dfn id=websrt-leaf-node-object title="WebSRT Leaf Node Object">WebSRT Leaf Node
Objects</dfn> are those that contain data, such as text, and cannot
contain child <a href=#websrt-node-object title="WebSRT Node Object">WebSRT Node
Objects</a>.</p>

<p>There are two concrete classes of <a href=#websrt-leaf-node-object title="WebSRT Leaf Node
Object">WebSRT Leaf Node Objects</a>:</p>

<dl><dt><dfn id=websrt-text-object title="WebSRT Text Object">WebSRT Text Objects</dfn></dt>
<dd>
<p>A fragment of text.</p>
</dd>

<dt><dfn id=websrt-timestamp-object title="WebSRT Timestamp Object">WebSRT Timestamp Objects</dfn></dt>
<dd>
<p>A timestamp.</p>
</dd>

</dl><p>To parse a string <var title="">input</var> supposedly containing
<a href=#websrt-cue-text>WebSRT cue text</a>, user agents must use the following
algorithm. This algorithm returns a <a href=#list-of-websrt-node-objects>list of WebSRT Node
Objects</a>.</p>

<ol><li><p>Let <var title="">input</var> be the string being
parsed.</li>

<li><p>Let <var title="">position</var> be a pointer into <var title="">input</var>, initially pointing at the start of the
string.</li>

<li><p>If <var title="">position</var> is past the end of <var title="">input</var>, return an error and abort these
steps.</li>

<li class=XXX>...</li>

</ol><h6 id=websrt-cue-text-dom-construction-rules><span class=secno>4.8.10.11.4 </span><dfn>WebSRT cue text DOM construction rules</dfn></h6>

<p class=XXX>...</p>

</div>

Expand Down Expand Up @@ -85142,7 +85232,7 @@ <h4 id=embedded-content-2><span class=secno>14.3.1 </span>Embedded content</h4>

<h4 id=timed-tracks-0><span class=secno>14.3.2 </span>Timed tracks</h4>

<p class=XXX>rendering model for timed tracks</p>
<p class=XXX><dfn id=websrt-cue-text-rendering-rules>WebSRT cue text rendering rules</dfn></p>

<p class=XXX>CSS extensions</p>

Expand Down
Loading

0 comments on commit 0a038c0

Please sign in to comment.