Skip to content

Commit

Permalink
[c] (0) Captions - Stage 11.4: Finish defining the settings and timin…
Browse files Browse the repository at this point in the history
…gs part of the syntax.

git-svn-id: http://svn.whatwg.org/webapps@5112 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jun 25, 2010
1 parent d6428a5 commit c28fc1b
Show file tree
Hide file tree
Showing 3 changed files with 303 additions and 34 deletions.
103 changes: 91 additions & 12 deletions complete.html
Original file line number Diff line number Diff line change
Expand Up @@ -26695,9 +26695,9 @@ <h6 id=syntax-0><span class=secno>4.8.10.11.1 </span>Syntax</h6>

<ol><li>Optionally, a <a href=#websrt-cue-identifier>WebSRT cue identifier</a>.</li>
<li><a href=#websrt-cue-timings>WebSRT cue timings</a>.</li>
<li>Optionally, <a href=#websrt-cue-settings>WebSRT cue settings</a>.</li>
<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>.</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>One or more <a href=#websrt-cue-text-line title="WebSRT cue text line">WebSRT cue text lines</a>, each separated from the next by a <a href=#websrt-line-terminator>WebSRT line terminator</a>.</li>
</ol><p>A <dfn id=websrt-line-terminator>WebSRT line terminator</dfn> consists of one of the
following:</p>
Expand All @@ -26714,30 +26714,109 @@ <h6 id=syntax-0><span class=secno>4.8.10.11.1 </span>Syntax</h6>
cue</a> consists of the following components, in the given
order:</p>

<ol><li>A <a href=#websrt-timestamp>WebSRT timestamp</a> representing the start time
<ol><!-- we could allow leading and trailing spaces and tabs, and make
the space between the arrow either optional or allow multiple
spaces or tabs --><li>A <a href=#websrt-timestamp>WebSRT timestamp</a> representing the start time
offset of the cue.</li>

<li>Optionally, a U+0020 SPACE character.</li>
<li>A U+0020 SPACE character.</li>

<li>The string "<code title="">--&gt;</code>" (U+002D HYPHEN-MINUS,
U+002D HYPHEN-MINUS, U+003E GREATER-THAN SIGN).</li>

<li>Optionally, a U+0020 SPACE character.</li>
<li>A U+0020 SPACE character.</li>

<li>A <a href=#websrt-timestamp>WebSRT timestamp</a> representing the end time
offset of the cue.</li>

</ol><p>The <dfn id=websrt-cue-settings>WebSRT cue settings</dfn> part of a <a href=#websrt-cue>WebSRT
cue</a> consists of the following components, in the given
order:</p>
</ol><p>A <dfn id=websrt-timestamp>WebSRT timestamp</dfn> representing hour <var title="">hours</var>, minutes <var title="">minutes</var>, seconds
<var title="">seconds</var>, and thousandths of a second <var title="">seconds-frac</var>, consists of the following components,
in the given order:</p>

<ol><li>Optionally (required if <var title="">hour</var> is non-zero):

<ol><li class=XXX>...
<ol><li>Two or more characters in the range U+0030 DIGIT ZERO (0) to
U+0039 DIGIT NINE (9), representing the <var title="">hours</var>
as a base ten integer.</li>

</ol><p>A <dfn id=websrt-timestamp>WebSRT timestamp</dfn> consists of the following
components, in the given order:</p>
<li>A U+003A COLON character (:)</li>

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

<li>Two characters in the range U+0030 DIGIT ZERO (0) to U+0039
DIGIT NINE (9), representing the <var title="">minutes</var> as a
base ten integer in the range 0&nbsp;&le;&nbsp;<var title="">minutes</var>&nbsp;&le;&nbsp;59.</li>

<li>A U+003A COLON character (:)</li>

<li>Two characters in the range U+0030 DIGIT ZERO (0) to U+0039
DIGIT NINE (9), representing the <var title="">seconds</var> as a
base ten integer in the range 0&nbsp;&le;&nbsp;<var title="">seconds</var>&nbsp;&le;&nbsp;59.</li>

<li>A U+003A COLON character (:)</li>

<li>Either a U+002E FULL STOP character (.) or a U+002C COMMA
character (,).</li>

<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, in the range
0&nbsp;&le;&nbsp;<var title="">second-frac</var>&nbsp;&lt;&nbsp;1000.</li>

</ol><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
component must not be included more than once per <a href=#websrt-cue-settings>WebSRT cue
settings</a> string.</p>

<ul class=brief><li>A <a href=#websrt-line-position-cue-setting>WebSRT line position cue setting</a>.</li>
<li>A <a href=#websrt-text-position-cue-setting>WebSRT text position cue setting</a>.</li>
<li>A <a href=#websrt-alignment-cue-setting>WebSRT alignment cue setting</a>.</li>
<li>A <a href=#websrt-size-cue-setting>WebSRT size cue setting</a>.</li>
<li>A <a href=#websrt-vertical-text-cue-setting>WebSRT vertical text cue setting</a>.</li>
</ul><p>A <dfn id=websrt-line-position-cue-setting>WebSRT line position cue setting</dfn> consists of the
following components, in the order given:</p>

<ol><li><p>A U+004C LATIN CAPITAL LETTER L character.</li>
<li><p>A U+003A COLON character (:).</li>
<li>Either:
<dl><dt>To represent a specific position relative to the video frame</dt>
<dd>
<ol><li>One or more characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9).</li>
<li>A U+0025 PERCENT SIGN character (%).</li>
</ol></dd>
<dt>To represent a line number</dt>
<dd>
<ol><li>Optionally a U+002D HYPHEN-MINUS character (-).</li>
<li>One or more characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9).</li>
</ol></dd>
</dl></li>
</ol><p>A <dfn id=websrt-text-position-cue-setting>WebSRT text position cue setting</dfn> consists of the
following components, in the order given:</p>

<ol><li>A U+0054 LATIN CAPITAL LETTER T character.</li>
<li>A U+003A COLON character (:).</li>
<li>One or more characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9).</li>
<li>A U+0025 PERCENT SIGN character (%).</li>
</ol><p>A <dfn id=websrt-alignment-cue-setting>WebSRT alignment cue setting</dfn> consists of the
following components, in the order given:</p>

<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>A <dfn id=websrt-size-cue-setting>WebSRT size cue setting</dfn> consists of the
following components, in the order given:</p>

<ol><li>A U+0053 LATIN CAPITAL LETTER S character.</li>
<li>A U+003A COLON character (:).</li>
<li>One or more characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9).</li>
<li>A U+0025 PERCENT SIGN character (%).</li>
</ol><p>A <dfn id=websrt-vertical-text-cue-setting>WebSRT vertical text cue setting</dfn> consists of the
following components, in the order given:</p>

<ol><li>A U+0044 LATIN CAPITAL LETTER D character.</li>
<li>A U+003A COLON character (:).</li>
<li>The string "<code title="">vertical</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>


Expand Down
103 changes: 91 additions & 12 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -26628,9 +26628,9 @@ CueEvent

<ol><li>Optionally, a <a href=#websrt-cue-identifier>WebSRT cue identifier</a>.</li>
<li><a href=#websrt-cue-timings>WebSRT cue timings</a>.</li>
<li>Optionally, <a href=#websrt-cue-settings>WebSRT cue settings</a>.</li>
<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>.</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>One or more <a href=#websrt-cue-text-line title="WebSRT cue text line">WebSRT cue text lines</a>, each separated from the next by a <a href=#websrt-line-terminator>WebSRT line terminator</a>.</li>
</ol><p>A <dfn id=websrt-line-terminator>WebSRT line terminator</dfn> consists of one of the
following:</p>
Expand All @@ -26647,30 +26647,109 @@ CueEvent
cue</a> consists of the following components, in the given
order:</p>

<ol><li>A <a href=#websrt-timestamp>WebSRT timestamp</a> representing the start time
<ol><!-- we could allow leading and trailing spaces and tabs, and make
the space between the arrow either optional or allow multiple
spaces or tabs --><li>A <a href=#websrt-timestamp>WebSRT timestamp</a> representing the start time
offset of the cue.</li>

<li>Optionally, a U+0020 SPACE character.</li>
<li>A U+0020 SPACE character.</li>

<li>The string "<code title="">--&gt;</code>" (U+002D HYPHEN-MINUS,
U+002D HYPHEN-MINUS, U+003E GREATER-THAN SIGN).</li>

<li>Optionally, a U+0020 SPACE character.</li>
<li>A U+0020 SPACE character.</li>

<li>A <a href=#websrt-timestamp>WebSRT timestamp</a> representing the end time
offset of the cue.</li>

</ol><p>The <dfn id=websrt-cue-settings>WebSRT cue settings</dfn> part of a <a href=#websrt-cue>WebSRT
cue</a> consists of the following components, in the given
order:</p>
</ol><p>A <dfn id=websrt-timestamp>WebSRT timestamp</dfn> representing hour <var title="">hours</var>, minutes <var title="">minutes</var>, seconds
<var title="">seconds</var>, and thousandths of a second <var title="">seconds-frac</var>, consists of the following components,
in the given order:</p>

<ol><li>Optionally (required if <var title="">hour</var> is non-zero):

<ol><li class=XXX>...
<ol><li>Two or more characters in the range U+0030 DIGIT ZERO (0) to
U+0039 DIGIT NINE (9), representing the <var title="">hours</var>
as a base ten integer.</li>

</ol><p>A <dfn id=websrt-timestamp>WebSRT timestamp</dfn> consists of the following
components, in the given order:</p>
<li>A U+003A COLON character (:)</li>

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

<li>Two characters in the range U+0030 DIGIT ZERO (0) to U+0039
DIGIT NINE (9), representing the <var title="">minutes</var> as a
base ten integer in the range 0&nbsp;&le;&nbsp;<var title="">minutes</var>&nbsp;&le;&nbsp;59.</li>

<li>A U+003A COLON character (:)</li>

<li>Two characters in the range U+0030 DIGIT ZERO (0) to U+0039
DIGIT NINE (9), representing the <var title="">seconds</var> as a
base ten integer in the range 0&nbsp;&le;&nbsp;<var title="">seconds</var>&nbsp;&le;&nbsp;59.</li>

<li>A U+003A COLON character (:)</li>

<li>Either a U+002E FULL STOP character (.) or a U+002C COMMA
character (,).</li>

<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, in the range
0&nbsp;&le;&nbsp;<var title="">second-frac</var>&nbsp;&lt;&nbsp;1000.</li>

</ol><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
component must not be included more than once per <a href=#websrt-cue-settings>WebSRT cue
settings</a> string.</p>

<ul class=brief><li>A <a href=#websrt-line-position-cue-setting>WebSRT line position cue setting</a>.</li>
<li>A <a href=#websrt-text-position-cue-setting>WebSRT text position cue setting</a>.</li>
<li>A <a href=#websrt-alignment-cue-setting>WebSRT alignment cue setting</a>.</li>
<li>A <a href=#websrt-size-cue-setting>WebSRT size cue setting</a>.</li>
<li>A <a href=#websrt-vertical-text-cue-setting>WebSRT vertical text cue setting</a>.</li>
</ul><p>A <dfn id=websrt-line-position-cue-setting>WebSRT line position cue setting</dfn> consists of the
following components, in the order given:</p>

<ol><li><p>A U+004C LATIN CAPITAL LETTER L character.</li>
<li><p>A U+003A COLON character (:).</li>
<li>Either:
<dl><dt>To represent a specific position relative to the video frame</dt>
<dd>
<ol><li>One or more characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9).</li>
<li>A U+0025 PERCENT SIGN character (%).</li>
</ol></dd>
<dt>To represent a line number</dt>
<dd>
<ol><li>Optionally a U+002D HYPHEN-MINUS character (-).</li>
<li>One or more characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9).</li>
</ol></dd>
</dl></li>
</ol><p>A <dfn id=websrt-text-position-cue-setting>WebSRT text position cue setting</dfn> consists of the
following components, in the order given:</p>

<ol><li>A U+0054 LATIN CAPITAL LETTER T character.</li>
<li>A U+003A COLON character (:).</li>
<li>One or more characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9).</li>
<li>A U+0025 PERCENT SIGN character (%).</li>
</ol><p>A <dfn id=websrt-alignment-cue-setting>WebSRT alignment cue setting</dfn> consists of the
following components, in the order given:</p>

<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>A <dfn id=websrt-size-cue-setting>WebSRT size cue setting</dfn> consists of the
following components, in the order given:</p>

<ol><li>A U+0053 LATIN CAPITAL LETTER S character.</li>
<li>A U+003A COLON character (:).</li>
<li>One or more characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9).</li>
<li>A U+0025 PERCENT SIGN character (%).</li>
</ol><p>A <dfn id=websrt-vertical-text-cue-setting>WebSRT vertical text cue setting</dfn> consists of the
following components, in the order given:</p>

<ol><li>A U+0044 LATIN CAPITAL LETTER D character.</li>
<li>A U+003A COLON character (:).</li>
<li>The string "<code title="">vertical</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>


Expand Down
Loading

0 comments on commit c28fc1b

Please sign in to comment.