[html5] r5079 - [giow] (0) Captions - Stage 9: The beginnings of the syntax and parser rules for [...]

whatwg at whatwg.org whatwg at whatwg.org
Wed May 5 13:23:23 PDT 2010


Author: ianh
Date: 2010-05-05 13:23:21 -0700 (Wed, 05 May 2010)
New Revision: 5079

Modified:
   complete.html
   index
   source
Log:
[giow] (0) Captions - Stage 9: The beginnings of the syntax and parser rules for WebSRT.

Modified: complete.html
===================================================================
--- complete.html	2010-05-05 08:24:28 UTC (rev 5078)
+++ complete.html	2010-05-05 20:23:21 UTC (rev 5079)
@@ -26193,16 +26193,88 @@
   <p>The WebSRT format (Web Subtitle Resource Tracks) is a format
   intended for marking up external timed track resources.</p>
 
+
   <h6 id=syntax-0><span class=secno>4.8.10.11.1 </span>Syntax</h6>
 
-  <p class=XXX>...
+  <p>A <dfn id=websrt-file>WebSRT file</dfn> must consist of a <a href=#websrt-file-body>WebSRT file
+  body</a> encoded as UTF-8.</p>
 
+  <p>A <dfn id=websrt-file-body>WebSRT file body</dfn> consists of zero or more <a href=#websrt-cue title="WebSRT cue">WebSRT cues</a> separated from each other by
+  two or more <a href=#websrt-line-terminator title="WebSRT line terminator">WebSRT line
+  terminators</a>.</p>
+
+  <p>A <dfn id=websrt-cue>WebSRT cue</dfn> consists of the following components, in
+  the given order:</p>
+
+  <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>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>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>
+   <li>Zero or more <a href=#websrt-line-terminator title="WebSRT line terminator">WebSRT line terminators</a>.</li>
+  </ol><p>A <dfn id=websrt-line-terminator>WebSRT line terminator</dfn> consists of one of the
+  following:</p>
+
+  <ul class=brief><li>A U+000D CARRIAGE RETURN U+000A LINE FEED (CRLF) character pair.</li>
+   <li>A single U+000A LINE FEED (LF) character.</li>
+   <li>A single U+000D CARRIAGE RETURN (CR) character.</li>
+  </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="">--></code>"
+  (U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS, U+003E GREATER-THAN
+  SIGN).</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
+  order:</p>
+
+  <ol><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>The string "<code title="">--></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 <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><li class=XXX>...
+
+  </ol><p class=XXX><dfn id=websrt-voice-declaration>WebSRT voice declaration</dfn>; <dfn id=websrt-cue-text-line>WebSRT cue text line</dfn>; <dfn id=websrt-timestamp>WebSRT timestamp</dfn></p>
+
+
+  <div class=impl>
+
   <h6 id=parsing-0><span class=secno>4.8.10.11.2 </span>Parsing</h6>
 
-  <p class=XXX>...
+  <p>A <dfn id=websrt-parser>WebSRT parser</dfn>, given an input byte stream, must
+  convert the bytes into Unicode characters by interpreting them as
+  UTF-8. Bytes or sequences of bytes that are not valid UTF-8
+  sequences must be interpreted as a U+FFFD REPLACEMENT CHARACTER. All
+  U+0000 NULL characters must be replaced by U+FFFD REPLACEMENT
+  CHARACTERs.</p>
 
+  <p>The Unicode characters from a string that must be parsed
+  according to the following algorithm:</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 class=XXX>...</li>
+
+  </ol></div>
+
+
   <h5 id=user-interface><span class=secno>4.8.10.12 </span>User interface</h5>
 
   <p>The <dfn id=attr-media-controls title=attr-media-controls><code>controls</code></dfn>

Modified: index
===================================================================
--- index	2010-05-05 08:24:28 UTC (rev 5078)
+++ index	2010-05-05 20:23:21 UTC (rev 5079)
@@ -26094,16 +26094,88 @@
   <p>The WebSRT format (Web Subtitle Resource Tracks) is a format
   intended for marking up external timed track resources.</p>
 
+
   <h6 id=syntax-0><span class=secno>4.8.10.11.1 </span>Syntax</h6>
 
-  <p class=XXX>...
+  <p>A <dfn id=websrt-file>WebSRT file</dfn> must consist of a <a href=#websrt-file-body>WebSRT file
+  body</a> encoded as UTF-8.</p>
 
+  <p>A <dfn id=websrt-file-body>WebSRT file body</dfn> consists of zero or more <a href=#websrt-cue title="WebSRT cue">WebSRT cues</a> separated from each other by
+  two or more <a href=#websrt-line-terminator title="WebSRT line terminator">WebSRT line
+  terminators</a>.</p>
+
+  <p>A <dfn id=websrt-cue>WebSRT cue</dfn> consists of the following components, in
+  the given order:</p>
+
+  <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>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>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>
+   <li>Zero or more <a href=#websrt-line-terminator title="WebSRT line terminator">WebSRT line terminators</a>.</li>
+  </ol><p>A <dfn id=websrt-line-terminator>WebSRT line terminator</dfn> consists of one of the
+  following:</p>
+
+  <ul class=brief><li>A U+000D CARRIAGE RETURN U+000A LINE FEED (CRLF) character pair.</li>
+   <li>A single U+000A LINE FEED (LF) character.</li>
+   <li>A single U+000D CARRIAGE RETURN (CR) character.</li>
+  </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="">--></code>"
+  (U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS, U+003E GREATER-THAN
+  SIGN).</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
+  order:</p>
+
+  <ol><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>The string "<code title="">--></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 <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><li class=XXX>...
+
+  </ol><p class=XXX><dfn id=websrt-voice-declaration>WebSRT voice declaration</dfn>; <dfn id=websrt-cue-text-line>WebSRT cue text line</dfn>; <dfn id=websrt-timestamp>WebSRT timestamp</dfn></p>
+
+
+  <div class=impl>
+
   <h6 id=parsing-0><span class=secno>4.8.10.11.2 </span>Parsing</h6>
 
-  <p class=XXX>...
+  <p>A <dfn id=websrt-parser>WebSRT parser</dfn>, given an input byte stream, must
+  convert the bytes into Unicode characters by interpreting them as
+  UTF-8. Bytes or sequences of bytes that are not valid UTF-8
+  sequences must be interpreted as a U+FFFD REPLACEMENT CHARACTER. All
+  U+0000 NULL characters must be replaced by U+FFFD REPLACEMENT
+  CHARACTERs.</p>
 
+  <p>The Unicode characters from a string that must be parsed
+  according to the following algorithm:</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 class=XXX>...</li>
+
+  </ol></div>
+
+
   <h5 id=user-interface><span class=secno>4.8.10.12 </span>User interface</h5>
 
   <p>The <dfn id=attr-media-controls title=attr-media-controls><code>controls</code></dfn>

Modified: source
===================================================================
--- source	2010-05-05 08:24:28 UTC (rev 5078)
+++ source	2010-05-05 20:23:21 UTC (rev 5079)
@@ -28303,16 +28303,108 @@
   <p>The WebSRT format (Web Subtitle Resource Tracks) is a format
   intended for marking up external timed track resources.</p>
 
+
   <h6>Syntax</h6>
 
-  <p class="XXX">...
+  <p>A <dfn>WebSRT file</dfn> must consist of a <span>WebSRT file
+  body</span> encoded as UTF-8.</p>
 
+  <p>A <dfn>WebSRT file body</dfn> consists of zero or more <span
+  title="WebSRT cue">WebSRT cues</span> separated from each other by
+  two or more <span title="WebSRT line terminator">WebSRT line
+  terminators</span>.</p>
+
+  <p>A <dfn>WebSRT cue</dfn> consists of the following components, in
+  the given order:</p>
+
+  <ol>
+   <li>Optionally, a <span>WebSRT cue identifier</span>.</li>
+   <li><span>WebSRT cue timings</span>.</li>
+   <li>Optionally, <span>WebSRT cue settings</span>.</li>
+   <li>A <span>WebSRT line terminator</span>.</li>
+   <li>Optionally, a <span>WebSRT voice declaration</span>.</li>
+   <li>One or more <span title="WebSRT cue text line">WebSRT cue text lines</span>, each separated from the next by a <span>WebSRT line terminator</span>.</li>
+   <li>Zero or more <span title="WebSRT line terminator">WebSRT line terminators</span>.</li>
+  </ol>
+
+  <p>A <dfn>WebSRT line terminator</dfn> consists of one of the
+  following:</p>
+
+  <ul class="brief">
+   <li>A U+000D CARRIAGE RETURN U+000A LINE FEED (CRLF) character pair.</li>
+   <li>A single U+000A LINE FEED (LF) character.</li>
+   <li>A single U+000D CARRIAGE RETURN (CR) character.</li>
+  </ul>
+
+  <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>
+
+  <p>The <dfn>WebSRT cue timings</dfn> part of a <span>WebSRT
+  cue</span> consists of the following components, in the given
+  order:</p>
+
+  <ol>
+
+   <li>A <span>WebSRT timestamp</span> representing the start time
+   offset of the cue.</li>
+
+   <li>Optionally, a U+0020 SPACE character.</li>
+
+   <li>The string "<code title="">--></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 <span>WebSRT timestamp</span> representing the end time
+   offset of the cue.</li>
+
+  </ol>
+
+  <p>The <dfn>WebSRT cue settings</dfn> part of a <span>WebSRT
+  cue</span> consists of the following components, in the given
+  order:</p>
+
+  <ol>
+
+   <li class="XXX">...
+
+  </ol>
+
+  <p class="XXX"><dfn>WebSRT voice declaration</dfn>; <dfn>WebSRT cue text line</dfn>; <dfn>WebSRT timestamp</dfn></p>
+
+
+  <div class="impl">
+
   <h6>Parsing</h6>
 
-  <p class="XXX">...
+  <p>A <dfn>WebSRT parser</dfn>, given an input byte stream, must
+  convert the bytes into Unicode characters by interpreting them as
+  UTF-8. Bytes or sequences of bytes that are not valid UTF-8
+  sequences must be interpreted as a U+FFFD REPLACEMENT CHARACTER. All
+  U+0000 NULL characters must be replaced by U+FFFD REPLACEMENT
+  CHARACTERs.</p>
 
+  <p>The Unicode characters from a string that must be parsed
+  according to the following algorithm:</p>
 
+  <ol>
 
+   <li><p>Let <var title="">input</var> be the string being
+   parsed.</p></li>
+
+   <li><p>Let <var title="">position</var> be a pointer into <var
+   title="">input</var>, initially pointing at the start of the
+   string.</p></li>
+
+   <li><p class="XXX">...</p></li>
+
+  </ol>
+
+  </div>
+
+
   <h5>User interface</h5>
 
   <p>The <dfn title="attr-media-controls"><code>controls</code></dfn>




More information about the Commit-Watchers mailing list