Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[ac] (0) Captions - Stage 11.8: Finishing off the WebSRT syntax defin…
…ition

git-svn-id: http://svn.whatwg.org/webapps@5119 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jun 29, 2010
1 parent 3fc2ac9 commit f54a339
Show file tree
Hide file tree
Showing 3 changed files with 256 additions and 12 deletions.
87 changes: 82 additions & 5 deletions complete.html
Expand Up @@ -26689,7 +26689,8 @@ <h6 id=syntax-0><span class=secno>4.8.10.11.1 </span>Syntax</h6>
</ul><p>A <dfn id=websrt-cue-identifier>WebSRT cue identifier</dfn> is any sequence of one or more
characters not containing the substring "<code title="">--&gt;</code>"
(U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS, U+003E GREATER-THAN
SIGN).</p>
SIGN), nor containing any U+000A LINE FEED (LF) characters or U+000D
CARRIAGE RETURN (CR) characters.</p>

<p>The <dfn id=websrt-cue-timings>WebSRT cue timings</dfn> part of a <a href=#websrt-cue>WebSRT
cue</a> consists of the following components, in the given
Expand Down Expand Up @@ -26742,7 +26743,12 @@ <h6 id=syntax-0><span class=secno>4.8.10.11.1 </span>Syntax</h6>
<li>Three characters in the range U+0030 DIGIT ZERO (0) to U+0039
DIGIT NINE (9), representing the thousandths of a second <var title="">seconds-frac</var> as a base ten integer.</li>

</ol><p>The <dfn id=websrt-cue-settings>WebSRT cue settings</dfn> part of a <a href=#websrt-cue>WebSRT
</ol><p>Each <a href=#websrt-timestamp>WebSRT timestamp</a> in a <a href=#websrt-file>WebSRT file</a>
must represent a time greater than than all the times represented by
<a href=#websrt-timestamp title="WebSRT timestamp">WebSRT timestamps</a> earlier in
the file.</p>

<p>The <dfn id=websrt-cue-settings>WebSRT cue settings</dfn> part of a <a href=#websrt-cue>WebSRT
cue</a> consists of zero or more of the following components, in
any order, separated from each other by one or more U+0020 SPACE
characters or U+0009 CHARACTER TABULATION (tab) characters. Each
Expand Down Expand Up @@ -26797,10 +26803,81 @@ <h6 id=syntax-0><span class=secno>4.8.10.11.1 </span>Syntax</h6>
<ol><li>A U+0041 LATIN CAPITAL LETTER A character.</li>
<li>A U+003A COLON character (:).</li>
<li>One of the following strings: "<code title="">start</code>", "<code title="">middle</code>", "<code title="">end</code>"</li>
</ol><p class=XXX><dfn id=websrt-voice-declaration>WebSRT voice declaration</dfn>; <dfn id=websrt-cue-text-line>WebSRT cue text line</dfn></p>

</ol><p>A <dfn id=websrt-voice-declaration>WebSRT voice declaration</dfn> consists of the following
components, in the order given:</p>

<div class=impl>
<ol><li>A U+003C LESS-THAN SIGN character (&lt;).</li>
<li>One of the following:
<ul class=brief><li>One character in the range U+0031 DIGIT ONE (1) to U+0039
DIGIT NINE (9), followed by zero or more characters in the range
U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9)
<li>The string "<code title="">narrator</code>".</li>
<li>The string "<code title="">music</code>".</li>
<li>The string "<code title="">sound</code>".</li> <!-- for audio fx descriptions -->
<li>The string "<code title="">comment</code>".</li> <!-- for annotations -->
<li>The string "<code title="">credit</code>".</li>
</ul></li>
<li>A U+003E GREATER-THAN SIGN character (&gt;).</li>
</ol><p>A <dfn id=websrt-cue-text-line>WebSRT cue text line</dfn> consists of one or more of the
following components, in any order:</p>

<ul><li>A <a href=#websrt-cue-text-span>WebSRT cue text span</a>, representing text of the cue.</li>
<li>A <a href=#websrt-cue-amp-escape>WebSRT cue amp escape</a>, representing a "&amp;" character in the text of the cue.</li>
<li>A <a href=#websrt-cue-lt-escape>WebSRT cue lt escape</a>, representing a "&lt;" character in the text of the cue.</li>
<li>A <a href=#websrt-cue-timestamp>WebSRT cue timestamp</a>.</li>
<li>A <a href=#websrt-cue-italics-span>WebSRT cue italics span</a>.</li>
<li>A <a href=#websrt-cue-bold-span>WebSRT cue bold span</a>.</li>
<li>A <a href=#websrt-cue-ruby-span>WebSRT cue ruby span</a>.</li>
</ul><p>A <dfn id=websrt-cue-text-span>WebSRT cue text span</dfn> consists of one or more
characters other than U+000A LINE FEED (LF) characters, U+000D
CARRIAGE RETURN (CR) characters, U+0026 AMPERSAND characters (&amp;),
and U+003C LESS-THAN SIGN characters (&lt;).</p>

<p>A <dfn id=websrt-cue-amp-escape>WebSRT cue amp escape</dfn> is the five character string
consisting of a U+0026 AMPERSAND character (&amp;), a U+0061 LATIN SMALL
LETTER A character, a U+006D LATIN SMALL LETTER M character, a
U+0070 LATIN SMALL LETTER P character, and a U+003B SEMICOLON
character (;).

<p>A <dfn id=websrt-cue-lt-escape>WebSRT cue lt escape</dfn> is the five character string
consisting of a U+0026 AMPERSAND character (&amp;), a U+006C LATIN SMALL
LETTER L character, a U+0074 LATIN SMALL LETTER T character, and a
U+003B SEMICOLON character (;).

<p>A <dfn id=websrt-cue-timestamp>WebSRT cue timestamp</dfn> consists of a U+003C LESS-THAN
SIGN character (&lt;), followed by a <a href=#websrt-timestamp>WebSRT timestamp</a>
representing the time that the given point in the cue becomes
active, followed by a U+003E GREATER-THAN SIGN character (&gt;).</p>

<p>A <dfn id=websrt-cue-italics-span>WebSRT cue italics span</dfn> consists of a U+003C
LESS-THAN SIGN character (&lt;), a U+0069 LATIN SMALL LETTER I
character, and a U+003E GREATER-THAN SIGN character (&gt;), then a
<a href=#websrt-cue-text-line>WebSRT cue text line</a> representing the italicized text, and finally a U+003C LESS-THAN
SIGN character (&lt;), a U+002F SOLIDUS character (/), a U+0069 LATIN
SMALL LETTER I character, and a U+003E GREATER-THAN SIGN character
(&gt;).</p>

<p>A <dfn id=websrt-cue-bold-span>WebSRT cue bold span</dfn> consists of a U+003C LESS-THAN
SIGN character (&lt;), a U+0062 LATIN SMALL LETTER B character, and a
U+003E GREATER-THAN SIGN character (&gt;), then a <a href=#websrt-cue-text-line>WebSRT cue text
line</a> representing the bolded text, and finally a U+003C
LESS-THAN SIGN character (&lt;), a U+002F SOLIDUS character (/), a
U+0062 LATIN SMALL LETTER B character, and a U+003E GREATER-THAN
SIGN character (&gt;).</p>

<p>A <dfn id=websrt-cue-ruby-span>WebSRT cue ruby span</dfn> consists of the following
components, in the order given:</p>

<ol><li>The string "<code title="">&lt;ruby&gt;</code>".</li>
<li>One or more occurances of the following group of components, in the order given:
<ol><li>A <a href=#websrt-cue-text-line>WebSRT cue text line</a>, representing the ruby base.</li>
<li>The string "<code title="">&lt;rt&gt;</code>".</li>
<li>A <a href=#websrt-cue-text-line>WebSRT cue text line</a>, representing the ruby text component of th ruby annotation.</li>
<li>The string "<code title="">&lt;/rt&gt;</code>".</li>
</ol></li>
<li>Zero or more U+0020 SPACE characters or U+0009 CHARACTER TABULATION (tab) characters.</li>
<li>The string "<code title="">&lt;/ruby&gt;</code>".</li>
</ol><div class=impl>

<h6 id=parsing-0><span class=secno>4.8.10.11.2 </span>Parsing</h6>

Expand Down
87 changes: 82 additions & 5 deletions index
Expand Up @@ -26616,7 +26616,8 @@ CueEvent
</ul><p>A <dfn id=websrt-cue-identifier>WebSRT cue identifier</dfn> is any sequence of one or more
characters not containing the substring "<code title="">--&gt;</code>"
(U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS, U+003E GREATER-THAN
SIGN).</p>
SIGN), nor containing any U+000A LINE FEED (LF) characters or U+000D
CARRIAGE RETURN (CR) characters.</p>

<p>The <dfn id=websrt-cue-timings>WebSRT cue timings</dfn> part of a <a href=#websrt-cue>WebSRT
cue</a> consists of the following components, in the given
Expand Down Expand Up @@ -26669,7 +26670,12 @@ CueEvent
<li>Three characters in the range U+0030 DIGIT ZERO (0) to U+0039
DIGIT NINE (9), representing the thousandths of a second <var title="">seconds-frac</var> as a base ten integer.</li>

</ol><p>The <dfn id=websrt-cue-settings>WebSRT cue settings</dfn> part of a <a href=#websrt-cue>WebSRT
</ol><p>Each <a href=#websrt-timestamp>WebSRT timestamp</a> in a <a href=#websrt-file>WebSRT file</a>
must represent a time greater than than all the times represented by
<a href=#websrt-timestamp title="WebSRT timestamp">WebSRT timestamps</a> earlier in
the file.</p>

<p>The <dfn id=websrt-cue-settings>WebSRT cue settings</dfn> part of a <a href=#websrt-cue>WebSRT
cue</a> consists of zero or more of the following components, in
any order, separated from each other by one or more U+0020 SPACE
characters or U+0009 CHARACTER TABULATION (tab) characters. Each
Expand Down Expand Up @@ -26724,10 +26730,81 @@ CueEvent
<ol><li>A U+0041 LATIN CAPITAL LETTER A character.</li>
<li>A U+003A COLON character (:).</li>
<li>One of the following strings: "<code title="">start</code>", "<code title="">middle</code>", "<code title="">end</code>"</li>
</ol><p class=XXX><dfn id=websrt-voice-declaration>WebSRT voice declaration</dfn>; <dfn id=websrt-cue-text-line>WebSRT cue text line</dfn></p>

</ol><p>A <dfn id=websrt-voice-declaration>WebSRT voice declaration</dfn> consists of the following
components, in the order given:</p>

<div class=impl>
<ol><li>A U+003C LESS-THAN SIGN character (&lt;).</li>
<li>One of the following:
<ul class=brief><li>One character in the range U+0031 DIGIT ONE (1) to U+0039
DIGIT NINE (9), followed by zero or more characters in the range
U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9)
<li>The string "<code title="">narrator</code>".</li>
<li>The string "<code title="">music</code>".</li>
<li>The string "<code title="">sound</code>".</li> <!-- for audio fx descriptions -->
<li>The string "<code title="">comment</code>".</li> <!-- for annotations -->
<li>The string "<code title="">credit</code>".</li>
</ul></li>
<li>A U+003E GREATER-THAN SIGN character (&gt;).</li>
</ol><p>A <dfn id=websrt-cue-text-line>WebSRT cue text line</dfn> consists of one or more of the
following components, in any order:</p>

<ul><li>A <a href=#websrt-cue-text-span>WebSRT cue text span</a>, representing text of the cue.</li>
<li>A <a href=#websrt-cue-amp-escape>WebSRT cue amp escape</a>, representing a "&amp;" character in the text of the cue.</li>
<li>A <a href=#websrt-cue-lt-escape>WebSRT cue lt escape</a>, representing a "&lt;" character in the text of the cue.</li>
<li>A <a href=#websrt-cue-timestamp>WebSRT cue timestamp</a>.</li>
<li>A <a href=#websrt-cue-italics-span>WebSRT cue italics span</a>.</li>
<li>A <a href=#websrt-cue-bold-span>WebSRT cue bold span</a>.</li>
<li>A <a href=#websrt-cue-ruby-span>WebSRT cue ruby span</a>.</li>
</ul><p>A <dfn id=websrt-cue-text-span>WebSRT cue text span</dfn> consists of one or more
characters other than U+000A LINE FEED (LF) characters, U+000D
CARRIAGE RETURN (CR) characters, U+0026 AMPERSAND characters (&amp;),
and U+003C LESS-THAN SIGN characters (&lt;).</p>

<p>A <dfn id=websrt-cue-amp-escape>WebSRT cue amp escape</dfn> is the five character string
consisting of a U+0026 AMPERSAND character (&amp;), a U+0061 LATIN SMALL
LETTER A character, a U+006D LATIN SMALL LETTER M character, a
U+0070 LATIN SMALL LETTER P character, and a U+003B SEMICOLON
character (;).

<p>A <dfn id=websrt-cue-lt-escape>WebSRT cue lt escape</dfn> is the five character string
consisting of a U+0026 AMPERSAND character (&amp;), a U+006C LATIN SMALL
LETTER L character, a U+0074 LATIN SMALL LETTER T character, and a
U+003B SEMICOLON character (;).

<p>A <dfn id=websrt-cue-timestamp>WebSRT cue timestamp</dfn> consists of a U+003C LESS-THAN
SIGN character (&lt;), followed by a <a href=#websrt-timestamp>WebSRT timestamp</a>
representing the time that the given point in the cue becomes
active, followed by a U+003E GREATER-THAN SIGN character (&gt;).</p>

<p>A <dfn id=websrt-cue-italics-span>WebSRT cue italics span</dfn> consists of a U+003C
LESS-THAN SIGN character (&lt;), a U+0069 LATIN SMALL LETTER I
character, and a U+003E GREATER-THAN SIGN character (&gt;), then a
<a href=#websrt-cue-text-line>WebSRT cue text line</a> representing the italicized text, and finally a U+003C LESS-THAN
SIGN character (&lt;), a U+002F SOLIDUS character (/), a U+0069 LATIN
SMALL LETTER I character, and a U+003E GREATER-THAN SIGN character
(&gt;).</p>

<p>A <dfn id=websrt-cue-bold-span>WebSRT cue bold span</dfn> consists of a U+003C LESS-THAN
SIGN character (&lt;), a U+0062 LATIN SMALL LETTER B character, and a
U+003E GREATER-THAN SIGN character (&gt;), then a <a href=#websrt-cue-text-line>WebSRT cue text
line</a> representing the bolded text, and finally a U+003C
LESS-THAN SIGN character (&lt;), a U+002F SOLIDUS character (/), a
U+0062 LATIN SMALL LETTER B character, and a U+003E GREATER-THAN
SIGN character (&gt;).</p>

<p>A <dfn id=websrt-cue-ruby-span>WebSRT cue ruby span</dfn> consists of the following
components, in the order given:</p>

<ol><li>The string "<code title="">&lt;ruby&gt;</code>".</li>
<li>One or more occurances of the following group of components, in the order given:
<ol><li>A <a href=#websrt-cue-text-line>WebSRT cue text line</a>, representing the ruby base.</li>
<li>The string "<code title="">&lt;rt&gt;</code>".</li>
<li>A <a href=#websrt-cue-text-line>WebSRT cue text line</a>, representing the ruby text component of th ruby annotation.</li>
<li>The string "<code title="">&lt;/rt&gt;</code>".</li>
</ol></li>
<li>Zero or more U+0020 SPACE characters or U+0009 CHARACTER TABULATION (tab) characters.</li>
<li>The string "<code title="">&lt;/ruby&gt;</code>".</li>
</ol><div class=impl>

<h6 id=parsing-0><span class=secno>4.8.10.11.2 </span>Parsing</h6>

Expand Down
94 changes: 92 additions & 2 deletions source
Expand Up @@ -28895,7 +28895,8 @@ CueEvent
<p>A <dfn>WebSRT cue identifier</dfn> is any sequence of one or more
characters not containing the substring "<code title="">--></code>"
(U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS, U+003E GREATER-THAN
SIGN).</p>
SIGN), nor containing any U+000A LINE FEED (LF) characters or U+000D
CARRIAGE RETURN (CR) characters.</p>

<p>The <dfn>WebSRT cue timings</dfn> part of a <span>WebSRT
cue</span> consists of the following components, in the given
Expand Down Expand Up @@ -28967,6 +28968,11 @@ CueEvent

</ol>

<p>Each <span>WebSRT timestamp</span> in a <span>WebSRT file</span>
must represent a time greater than than all the times represented by
<span title="WebSRT timestamp">WebSRT timestamps</span> earlier in
the file.</p>

<p>The <dfn>WebSRT cue settings</dfn> part of a <span>WebSRT
cue</span> consists of zero or more of the following components, in
any order, separated from each other by one or more U+0020 SPACE
Expand Down Expand Up @@ -29046,8 +29052,92 @@ CueEvent
<li>One of the following strings: "<code title="">start</code>", "<code title="">middle</code>", "<code title="">end</code>"</li>
</ol>

<p class="XXX"><dfn>WebSRT voice declaration</dfn>; <dfn>WebSRT cue text line</dfn></p>
<p>A <dfn>WebSRT voice declaration</dfn> consists of the following
components, in the order given:</p>

<ol>
<li>A U+003C LESS-THAN SIGN character (&lt;).</li>
<li>One of the following:
<ul class="brief">
<li>One character in the range U+0031 DIGIT ONE (1) to U+0039
DIGIT NINE (9), followed by zero or more characters in the range
U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9)
<li>The string "<code title="">narrator</code>".</li>
<li>The string "<code title="">music</code>".</li>
<li>The string "<code title="">sound</code>".</li> <!-- for audio fx descriptions -->
<li>The string "<code title="">comment</code>".</li> <!-- for annotations -->
<li>The string "<code title="">credit</code>".</li>
</ul>
</li>
<li>A U+003E GREATER-THAN SIGN character (>).</li>
</ol>

<p>A <dfn>WebSRT cue text line</dfn> consists of one or more of the
following components, in any order:</p>

<ul>
<li>A <span>WebSRT cue text span</span>, representing text of the cue.</li>
<li>A <span>WebSRT cue amp escape</span>, representing a "&amp;" character in the text of the cue.</li>
<li>A <span>WebSRT cue lt escape</span>, representing a "&lt;" character in the text of the cue.</li>
<li>A <span>WebSRT cue timestamp</span>.</li>
<li>A <span>WebSRT cue italics span</span>.</li>
<li>A <span>WebSRT cue bold span</span>.</li>
<li>A <span>WebSRT cue ruby span</span>.</li>
</ul>

<p>A <dfn>WebSRT cue text span</dfn> consists of one or more
characters other than U+000A LINE FEED (LF) characters, U+000D
CARRIAGE RETURN (CR) characters, U+0026 AMPERSAND characters (&amp;),
and U+003C LESS-THAN SIGN characters (&lt;).</p>

<p>A <dfn>WebSRT cue amp escape</dfn> is the five character string
consisting of a U+0026 AMPERSAND character (&amp;), a U+0061 LATIN SMALL
LETTER A character, a U+006D LATIN SMALL LETTER M character, a
U+0070 LATIN SMALL LETTER P character, and a U+003B SEMICOLON
character (;).

<p>A <dfn>WebSRT cue lt escape</dfn> is the five character string
consisting of a U+0026 AMPERSAND character (&amp;), a U+006C LATIN SMALL
LETTER L character, a U+0074 LATIN SMALL LETTER T character, and a
U+003B SEMICOLON character (;).

<p>A <dfn>WebSRT cue timestamp</dfn> consists of a U+003C LESS-THAN
SIGN character (&lt;), followed by a <span>WebSRT timestamp</span>
representing the time that the given point in the cue becomes
active, followed by a U+003E GREATER-THAN SIGN character (>).</p>

<p>A <dfn>WebSRT cue italics span</dfn> consists of a U+003C
LESS-THAN SIGN character (&lt;), a U+0069 LATIN SMALL LETTER I
character, and a U+003E GREATER-THAN SIGN character (>), then a
<span>WebSRT cue text line</span> representing the italicized text, and finally a U+003C LESS-THAN
SIGN character (&lt;), a U+002F SOLIDUS character (/), a U+0069 LATIN
SMALL LETTER I character, and a U+003E GREATER-THAN SIGN character
(>).</p>

<p>A <dfn>WebSRT cue bold span</dfn> consists of a U+003C LESS-THAN
SIGN character (&lt;), a U+0062 LATIN SMALL LETTER B character, and a
U+003E GREATER-THAN SIGN character (>), then a <span>WebSRT cue text
line</span> representing the bolded text, and finally a U+003C
LESS-THAN SIGN character (&lt;), a U+002F SOLIDUS character (/), a
U+0062 LATIN SMALL LETTER B character, and a U+003E GREATER-THAN
SIGN character (>).</p>

<p>A <dfn>WebSRT cue ruby span</dfn> consists of the following
components, in the order given:</p>

<ol>
<li>The string "<code title="">&lt;ruby&gt;</code>".</li>
<li>One or more occurances of the following group of components, in the order given:
<ol>
<li>A <span>WebSRT cue text line</span>, representing the ruby base.</li>
<li>The string "<code title="">&lt;rt&gt;</code>".</li>
<li>A <span>WebSRT cue text line</span>, representing the ruby text component of th ruby annotation.</li>
<li>The string "<code title="">&lt;/rt&gt;</code>".</li>
</ol>
</li>
<li>Zero or more U+0020 SPACE characters or U+0009 CHARACTER TABULATION (tab) characters.</li>
<li>The string "<code title="">&lt;/ruby&gt;</code>".</li>
</ol>

<div class="impl">

Expand Down

0 comments on commit f54a339

Please sign in to comment.