html5/spec Overview.html,1.2267,1.2268

Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv21271

Modified Files:
	Overview.html 
Log Message:
iCalendar output support. (whatwg r3110)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.2267
retrieving revision 1.2268
diff -u -d -r1.2267 -r1.2268
--- Overview.html	16 May 2009 10:43:01 -0000	1.2267
+++ Overview.html	16 May 2009 11:24:25 -0000	1.2268
@@ -40086,7 +40086,185 @@
   </ol><p class="note">This algorithm can generate invalid vCard output, if
   the input does not conform to the rules described for the <code title="md-vcard"><a href="#md-vcard">vcard</a></code> <a href="#predefined-type">predefined type</a> and <a href="#predefined-property-name" title="predefined property name">predefined property
   names</a>.</p><!-- of course since vcard doesn't define error
-  handling, this is somewhat problematic. --><h4 id="icalendar"><span class="secno">5.5.4 </span>iCalendar</h4><p class="XXX">...</p><!-- prodid and version are required in output --><!-- value datetime vs date for dtstart, dtend, rdate, exdate; must include new dtstamp --><h4 id="bibtex-0"><span class="secno">5.5.5 </span>BibTeX</h4><p class="XXX">...<h2 id="browsers"><span class="secno">6 </span>Web browsers</h2><div class="impl">
+  handling, this is somewhat problematic. --><h4 id="icalendar"><span class="secno">5.5.4 </span>iCalendar</h4><p>Given a node <var title="">node</var> in a <code>Document</code>,
+  a user agent must run the following algorithm to extract any <code title="md-vevent"><a href="#md-vevent">vevent</a></code> data represented by that node:<ol><li>
+
+    <p>If <var title="">node</var> is not an element that is an <a href="#concept-item" title="concept-item">item</a> with the type <code title="md-vevent"><a href="#md-vevent">vevent</a></code>, then run these substeps:</p>
+
+    <ol><li><p>If <var title="">node</var> has no parent, then there is
+     no event to output. Abort the algorithm, returning
+     nothing.</li>
+
+     <li><p>Let <var title="">node</var> be <var title="">node</var>'s
+     parent.</li>
+
+     <li><p>Restart the entire algorithm with the new value of <var title="">node</var>.</li>
+
+    </ol></li>
+
+   <li><p>Let <var title="">output</var> be an empty string.</li>
+
+   <li><p><a href="#add-an-icalendar-line">Add an iCalendar line</a> with the type "<code title="">BEGIN</code>" and the value "<code title="">VCALENDAR</code>"
+   to <var title="">output</var>.</li>
+
+   <li><p><a href="#add-an-icalendar-line">Add an iCalendar line</a> with the type "<code title="">PRODID</code>" and the value equal to a user-agent
+   specific string representing the user agent to <var title="">output</var>.</li>
+
+   <li><p><a href="#add-an-icalendar-line">Add an iCalendar line</a> with the type "<code title="">VERSION</code>" and the value "<code title="">2.0</code>"
+   to <var title="">output</var>.</li>
+
+   <li><p><a href="#add-an-icalendar-line">Add an iCalendar line</a> with the type "<code title="">BEGIN</code>" and the value "<code title="">VEVENT</code>"
+   to <var title="">output</var>.</li>
+
+   <li><p><a href="#add-an-icalendar-line">Add an iCalendar line</a> with the type "<code title="">DTSTAMP</code>" and a value consisting of an iCalendar
+   DATE-TIME string representing the current date and time, with the
+   annotation "<code title="">VALUE=DATE-TIME</code>", to <var title="">output</var>.</li>
+
+   <li><p>If there is a property named <code title="md-about"><a href="#md-about">about</a></code> whose <a href="#concept-item-corresponding" title="concept-item-corresponding">corresponding item</a> is
+   <var title="">node</var> and the element of the first such property
+   is a <a href="#url-property-elements" title="URL property elements">URL property
+   element</a> and has a <a href="#concept-property-value" title="concept-property-value">value</a> that is not an <a href="#concept-item" title="concept-item">item</a>, <a href="#add-an-icalendar-line">add an iCalendar line</a>
+   with the type "<code title="">UID</code>" and that property's
+   <a href="#concept-property-value" title="concept-property-value">value</a> as the value to
+   <var title="">output</var>.</li>
+
+   <li>
+
+    <p>For each element <var title="">element</var> that has one or
+    more <a href="#property-names">property names</a> and whose <a href="#concept-item-corresponding" title="concept-item-corresponding">corresponding item</a> is
+    <var title="">node</var>: for each name <var title="">name</var>
+    in <var title="">element</var>'s <a href="#property-names">property names</a>, run
+    the appropriate set of substeps from the following list:</p>
+
+    <dl><dt>If <var title="">name</var> is equal to the string "<code title="md-about"><a href="#md-about">about</a></code>"</dt>
+
+     <dt>If the property's <a href="#concept-property-value" title="concept-property-value">value</a> is an <a href="#concept-item" title="concept-item">item</a></dt>
+
+     <dd>
+
+      <p>Skip the property.</p>
+
+     </dd>
+
+
+     <dt>If <var title="">element</var> is a <code><a href="#the-time-element">time</a></code>
+     element</dt>
+
+     <dd>
+
+      <p>Let <var title="">value</var> be the result of stripping
+      all U+002D HYPHEN-MINUS (-) and U+003A COLON (:) characters
+      from the property's <a href="#concept-property-value" title="concept-property-value">value</a>.</p>
+
+      <p>If the property's <a href="#concept-property-value" title="concept-property-value">value</a> is a <a href="#valid-date-string">valid
+      date string</a> then <a href="#add-an-icalendar-line">add an iCalendar line</a>
+      with the type <var title="">name</var> and the value <var title="">value</var> to <var title="">output</var>, with the
+      annotation "<code title="">VALUE=DATE</code>".</p>
+
+      <p>Otherwise, if the property's <a href="#concept-property-value" title="concept-property-value">value</a> is a <a href="#valid-global-date-and-time-string">valid
+      global date and time string</a> then <a href="#add-an-icalendar-line">add an iCalendar
+      line</a> with the type <var title="">name</var> and the
+      value <var title="">value</var> to <var title="">output</var>,
+      with the annotation "<code title="">VALUE=DATE-TIME</code>".</p>
+
+      <p>Otherwise skip the property.</p>
+
+     </dd>
+
+
+     <dt>Otherwise</dt>
+
+     <dd>
+
+      <p><a href="#add-an-icalendar-line">Add an iCalendar line</a> with the type <var title="">name</var> and the value <var title="">value</var> to
+      <var title="">output</var>.</p>
+
+     </dd>
+
+    </dl></li>
+
+   <li><p><a href="#add-an-icalendar-line">Add an iCalendar line</a> with the type "<code title="">END</code>" and the value "<code title="">VEVENT</code>"
+   to <var title="">output</var>.</li>
+
+   <li><p><a href="#add-an-icalendar-line">Add an iCalendar line</a> with the type "<code title="">END</code>" and the value "<code title="">VCALENDAR</code>" to <var title="">output</var>.</li>
+
+  </ol><p>When the above algorithm says that the user agent is to <dfn id="add-an-icalendar-line">add
+  an iCalendar line</dfn> consisting of a type <var title="">type</var>, a value <var title="">value</var>, and
+  optinally an annotation, to a string <var title="">output</var>, it
+  must run the following steps:<ol><li><p>Let <var title="">line</var> be an empty string.</li>
+
+   <li><p>Append <var title="">type</var>, <a href="#converted-to-uppercase">converted to
+   uppercase</a>, to <var title="">line</var>.</li>
+
+   <li>
+
+    <p>If there is an annotation:</p>
+
+    <ol><li><p>Append a U+003B SEMICOLON character (;) to <var title="">line</var>.</li>
+
+     <li><p>Append the annotation to <var title="">line</var>.</li>
+
+    </ol></li>
+
+   <li><p>Append a U+003A COLON character (:) to <var title="">line</var>.</li>
+
+   <li><p>Prefix every U+005C REVERSE SOLIDUS character (\) in
+   <var title="">value</var> with another U+005C REVERSE SOLIDUS
+   character (\).</li>
+
+   <li><p>Prefix every U+002C COMMA character (,) in <var title="">value</var> with a U+005C REVERSE SOLIDUS character
+   (\).</li>
+
+   <li><p>Prefix every U+003B SEMICOLON character (;) in <var title="">value</var> with a U+005C REVERSE SOLIDUS character
+   (\).</li>
+
+   <li><p>Replace every U+000D CARRIAGE RETURN U+000A LINE FEED
+   character pair (CRLF) in <var title="">value</var> with a
+   U+005C REVERSE SOLIDUS character (\) followed by a U+006E
+   LATIN SMALL LETTER N.</li>
+
+   <li><p>Replace every remaining U+000D CARRIAGE RETURN (CR) or
+   U+000A LINE FEED (LF) character in <var title="">value</var>
+   with a U+005C REVERSE SOLIDUS character (\) followed by a
+   U+006E LATIN SMALL LETTER N.</li>
+
+   <li><p>Append <var title="">value</var> to <var title="">line</var>.</li>
+
+   <li><p>Let <var title="">maximum length</var> be 75.</li>
+
+   <li>
+
+    <p>If and while <var title="">line</var> is longer than <var title="">maximum length</var> Unicode code points long, run the
+    following substeps:</p>
+
+    <ol><li><p>Append the first <var title="">maximum length</var>
+     Unicode code points of <var title="">line</var> to <var title="">output</var>.</li>
+
+     <li><p>Remove the first <var title="">maximum length</var>
+     Unicode code points from <var title="">line</var>.</li>
+
+     <li><p>Append a U+000D CARRIAGE RETURN character (CR) to <var title="">output</var>.</li>
+
+     <li><p>Append a U+000A LINE FEED character (LF) to <var title="">output</var>.</li>
+
+     <li><p>Append a U+0020 SPACE character to <var title="">output</var>.</li>
+
+     <li><p>Let <var title="">maximum length</var> be 74.</li>
+
+    </ol></li>
+
+   <li><p>Append (what remains of) <var title="">line</var> to <var title="">output</var>.</li>
+
+   <li><p>Append a U+000D CARRIAGE RETURN character (CR) to <var title="">output</var>.</li>
+
+   <li><p>Append a U+000A LINE FEED character (LF) to <var title="">output</var>.</li>
+
+  </ol><p class="note">This algorithm can generate invalid iCalendar
+  output, if the input does not conform to the rules described for the
+  <code title="md-vevent"><a href="#md-vevent">vevent</a></code> <a href="#predefined-type">predefined type</a>
+  and <a href="#predefined-property-name" title="predefined property name">predefined property
+  names</a>.</p><!-- of course since icalendar doesn't define
+  error handling, this is somewhat problematic. --><h4 id="bibtex-0"><span class="secno">5.5.5 </span>BibTeX</h4><p class="XXX">...<h2 id="browsers"><span class="secno">6 </span>Web browsers</h2><div class="impl">
 
   <p>This section describes features that apply most directly to Web
   browsers. Having said that, unless specified elsewhere, the

Received on Saturday, 16 May 2009 11:24:42 UTC