- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Mon, 31 Aug 2009 07:46:31 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv6773
Modified Files:
Overview.html
Log Message:
Move pubdate='' from <article> to <time>. (whatwg r3718)
Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.2896
retrieving revision 1.2897
diff -u -d -r1.2896 -r1.2897
--- Overview.html 31 Aug 2009 05:51:19 -0000 1.2896
+++ Overview.html 31 Aug 2009 07:46:28 -0000 1.2897
@@ -3397,6 +3397,12 @@
</ul></div><div class="impl">
+ <p>The <dfn id="best-representation-of-the-global-date-and-time-string">best representation of the global date and time
+ string</dfn> <var title="">datetime</var> is the <a href="#valid-global-date-and-time-string">valid global
+ date and time string</a> representing <var title="">datetime</var> with the last character of the string not
+ being a U+005A LATIN CAPITAL LETTER Z character, even if the
+ time zone is UTC.</p>
+
<p>The rules to <dfn id="parse-a-global-date-and-time-string">parse a global date and time string</dfn> are
as follows. This will either return a time in UTC, with associated
time-zone offset information for round tripping or display purposes,
@@ -3580,7 +3586,7 @@
<li><p>Return the week-year number <var title="">year</var> and the
week number <var title="">week</var>.</li>
- </ol></div><h5 id="vaguer-moments-in-time"><span class="secno">2.4.5.7 </span>Vaguer moments in time</h5><p>A <dfn id="date-or-time-string">date or time string</dfn> consists of either a <a href="#concept-date" title="concept-date">date</a>, a <a href="#concept-time" title="concept-time">time</a>, or a <a href="#concept-datetime" title="concept-datetime">global date and time</a>.<p>A string is a <dfn id="valid-date-or-time-string">valid date or time string</dfn> if it is also
+ </ol></div><h5 id="vaguer-moments-in-time"><span class="secno">2.4.5.7 </span>Vaguer moments in time</h5><p>A string is a <dfn id="valid-date-or-time-string">valid date or time string</dfn> if it is also
one of the following:<ul><li>A <a href="#valid-date-string">valid date string</a>.</li>
<li>A <a href="#valid-time-string">valid time string</a>.</li>
@@ -3590,9 +3596,18 @@
</ul><p>A string is a <dfn id="valid-date-or-time-string-in-content">valid date or time string in content</dfn> if
it consists of zero or more <a href="#white_space">White_Space</a> characters,
followed by a <a href="#valid-date-or-time-string">valid date or time string</a>, followed by
- zero or more further <a href="#white_space">White_Space</a> characters.<div class="impl">
+ zero or more further <a href="#white_space">White_Space</a> characters.<hr><p>A string is a <dfn id="valid-date-string-with-optional-time">valid date string with optional time</dfn> if
+ it is also one of the following:<ul><li>A <a href="#valid-date-string">valid date string</a>.</li>
- <p>The rules to <dfn id="parse-a-date-or-time-string">parse a date or time string</dfn> are as
+ <li>A <a href="#valid-global-date-and-time-string">valid global date and time string</a>.</li>
+
+ </ul><p>A string is a <dfn id="valid-date-string-in-content-with-optional-time">valid date string in content with optional
+ time</dfn> if it consists of zero or more <a href="#white_space">White_Space</a>
+ characters, followed by a <a href="#valid-date-string-with-optional-time">valid date string with optional
+ time</a>, followed by zero or more further
+ <a href="#white_space">White_Space</a> characters.<div class="impl">
+
+ <hr><p>The rules to <dfn id="parse-a-date-or-time-string">parse a date or time string</dfn> are as
follows. The algorithm is invoked with a flag indicating if the
<i>in attribute</i> variant or the <i>in content</i> variant is to
be used. The algorithm will either return a <a href="#concept-date" title="concept-date">date</a>, a <a href="#concept-time" title="concept-time">time</a>, a <a href="#concept-datetime" title="concept-datetime">global date and time</a>, or nothing. If
@@ -11246,13 +11261,8 @@
<dd><a href="#flow-content">Flow content</a>.</dd>
<dt>Content attributes:</dt>
<dd><a href="#global-attributes">Global attributes</a></dd>
- <dd><code title="attr-article-pubdate"><a href="#attr-article-pubdate">pubdate</a></code></dd>
<dt>DOM interface:</dt>
- <dd>
-<pre class="idl">interface <dfn id="htmlarticleelement">HTMLArticleElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
- attribute DOMString <a href="#dom-article-pubdate" title="dom-article-pubDate">pubDate</a>;
-};</pre>
- </dd>
+ <dd>Uses <code><a href="#htmlelement">HTMLElement</a></code>.</dd>
</dl><p>The <code><a href="#the-article-element">article</a></code> element <a href="#represents">represents</a> a
section of a page that consists of a composition that forms an
independent part of a document, page, application, or site. This
@@ -11269,15 +11279,7 @@
elements nested within the <code><a href="#the-article-element">article</a></code> element for the Web
log entry.<p>Author information associated with an <code><a href="#the-article-element">article</a></code>
element (q.v. the <code><a href="#the-address-element">address</a></code> element) does not apply to
- nested <code><a href="#the-article-element">article</a></code> elements.<p>The <dfn id="attr-article-pubdate" title="attr-article-pubdate"><code>pubdate</code></dfn>
- attribute may be used to specify the time and date that the article
- was first published. If present, the <code title="attr-article-pubdate"><a href="#attr-article-pubdate">pubdate</a></code> attribute must be a
- <a href="#valid-global-date-and-time-string">valid global date and time string</a> value.<div class="impl">
-
- <p>The <dfn id="dom-article-pubdate" title="dom-article-pubDate"><code>pubDate</code></dfn>
- IDL attribute must <a href="#reflect">reflect</a> the element's <code title="attr-article-pubdate"><a href="#attr-article-pubdate">pubdate</a></code> content attribute.</p>
-
- </div><h4 id="the-aside-element"><span class="secno">4.4.5 </span>The <dfn><code>aside</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i><dl class="element"><dt>Categories</dt>
+ nested <code><a href="#the-article-element">article</a></code> elements.<h4 id="the-aside-element"><span class="secno">4.4.5 </span>The <dfn><code>aside</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i><dl class="element"><dt>Categories</dt>
<dd><a href="#flow-content">Flow content</a>.</dd>
<dd><a href="#sectioning-content">Sectioning content</a>.</dd>
<dd><a href="#formatblock-candidate"><code title="">formatBlock</code> candidate</a>.</dd>
@@ -13467,10 +13469,12 @@
<dt>Content attributes:</dt>
<dd><a href="#global-attributes">Global attributes</a></dd>
<dd><code title="attr-time-datetime"><a href="#attr-time-datetime">datetime</a></code></dd>
+ <dd><code title="attr-time-pubdate"><a href="#attr-time-pubdate">pubdate</a></code></dd>
<dt>DOM interface:</dt>
<dd>
<pre class="idl">interface <dfn id="htmltimeelement">HTMLTimeElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
attribute DOMString <a href="#dom-time-datetime" title="dom-time-datetime">dateTime</a>;
+ attribute boolean <a href="#dom-time-pubdate" title="dom-time-pubDate">pubDate</a>;
readonly attribute <span>Date</span> <a href="#dom-time-date" title="dom-time-date">date</a>;
readonly attribute <span>Date</span> <a href="#dom-time-time" title="dom-time-time">time</a>;
readonly attribute <span>Date</span> <a href="#dom-time-timezone" title="dom-time-timezone">timezone</a>;
@@ -13500,17 +13504,36 @@
different times in different countries, ranging from partway
through the 16th century all the way to early in the 20th.</p>
- </div><p>The <dfn id="attr-time-datetime" title="attr-time-datetime"><code>datetime</code></dfn>
- attribute, if present, must contain a <a href="#valid-date-or-time-string">valid date or time
- string</a> that identifies the date or time being specified.<p>If the <code title="attr-time-datetime"><a href="#attr-time-datetime">datetime</a></code> attribute
- is not present, then the date or time must be specified in the
- content of the element, such that the element's
- <code>textContent</code> is a <a href="#valid-date-or-time-string-in-content">valid date or time string in
- content</a>, and the date, if any, must be expressed using the
- Gregorian calendar.<p>If the <code title="attr-time-datetime"><a href="#attr-time-datetime">datetime</a></code> attribute
- is present, then the element may be empty, in which case the user
- agent should convey the attribute's value to the user when rendering
- the element.<div class="example">
+ </div><p>The <dfn id="attr-time-pubdate" title="attr-time-pubdate"><code>pubdate</code></dfn>
+ attribute is a <a href="#boolean-attribute">boolean attribute</a>. If specified, it
+ indicates that the date and time given by the element is the
+ publication date and time of the nearest ancestor
+ <code><a href="#the-article-element">article</a></code> element. If the element has no ancestor
+ <code><a href="#the-article-element">article</a></code> element, the <code title="attr-time-pubdate"><a href="#attr-time-pubdate">pubdate</a></code> attribute must not be
+ specified. If the element has an ancestor <code><a href="#the-article-element">article</a></code>
+ element and the <code title="attr-time-pubdate"><a href="#attr-time-pubdate">pubdate</a></code>
+ attribute is specified, then the element <i>needs a date</i>. For
+ each <code><a href="#the-article-element">article</a></code> element, there must no more than one
+ <code><a href="#the-time-element">time</a></code> element with a <code title="attr-time-pubdate"><a href="#attr-time-pubdate">pubdate</a></code> attribute whose nearest
+ ancestor is that <code><a href="#the-article-element">article</a></code> element.<p>The <dfn id="attr-time-datetime" title="attr-time-datetime"><code>datetime</code></dfn>
+ attribute, if present, gives the date or time being
+ specified. Otherwise, the date or time is given by the element's
+ contents.<p>If the element <i>needs a date</i>, and the <code title="attr-time-datetime"><a href="#attr-time-datetime">datetime</a></code> attribute is present,
+ then the attribute's value must be a <a href="#valid-date-string-with-optional-time">valid date string with
+ optional time</a>.<p>If the element <i>needs a date</i>, but the <code title="attr-time-datetime"><a href="#attr-time-datetime">datetime</a></code> attribute is not present,
+ then the element's <code>textContent</code> must be a <a href="#valid-date-string-in-content-with-optional-time">valid
+ date string in content with optional time</a>.<p>If the element does not <i>need a date</i>, and the <code title="attr-time-datetime"><a href="#attr-time-datetime">datetime</a></code> attribute is present,
+ then the attribute's value must be a <a href="#valid-date-or-time-string">valid date or time
+ string</a>.<p>If the element does not <i>need a date</i>, but the <code title="attr-time-datetime"><a href="#attr-time-datetime">datetime</a></code> attribute is not present,
+ then the element's <code>textContent</code> must be a <a href="#valid-date-or-time-string-in-content">valid
+ date or time string in content</a>.<p>The date, if any, must be expressed using the Gregorian
+ calendar.<div class="impl">
+
+ <p>If the <code title="attr-time-datetime"><a href="#attr-time-datetime">datetime</a></code> attribute
+ is present, the user agent should convey the attribute's value to
+ the user when rendering the element.</p>
+
+ </div><div class="example">
<p>The <code><a href="#the-time-element">time</a></code> element can be used to encode dates, for
example in Microformats. The following shows a hypothetical way of
@@ -13550,6 +13573,9 @@
<p>The <dfn id="dom-time-datetime" title="dom-time-datetime"><code>dateTime</code></dfn> IDL
attribute must <a href="#reflect">reflect</a> the <code title="attr-time-datetime"><a href="#attr-time-datetime">datetime</a></code> content attribute.</p>
+ <p>The <dfn id="dom-time-pubdate" title="dom-time-pubDate"><code>pubDate</code></dfn> IDL
+ attribute must <a href="#reflect">reflect</a> the <code title="attr-time-pubdate"><a href="#attr-time-pubdate">pubdate</a></code> content attribute.</p>
+
<p>User agents, to obtain the <dfn id="concept-time-date" title="concept-time-date">date</dfn>, <dfn id="concept-time-time" title="concept-time-time">time</dfn>, and <dfn id="concept-time-timezone" title="concept-time-timezone">time-zone offset</dfn> represented by
a <code><a href="#the-time-element">time</a></code> element, must follow these steps:</p>
@@ -13663,6 +13689,35 @@
value 28,800,000ms, and the <code title="dom-time-timezone"><a href="#dom-time-timezone">timezone</a></code> attribute would return
null.</p>
+ </div><div class="example">
+
+ <p>In this example, an article's publication date is marked up
+ using <code><a href="#the-time-element">time</a></code>:</p>
+
+ <pre><article>
+ <h1>Small tasks</h1>
+ <footer>Published <time pubdate>2009-08-30</time>.</footer>
+ <p>I put a bike bell on his bike.</p>
+</article></pre>
+
+ <p>Here is another way that could be marked up:</p>
+
+ <pre><article>
+ <h1>Small tasks</h1>
+ <footer>Published <time pubdate datetime="2009-08-30">today</time>.</footer>
+ <p>I put a bike bell on his bike.</p>
+</article></pre>
+
+ <p>Here is the same thing but with the time included. Because the
+ element is empty, it will be replaced in the rendering with a
+ more readable version of the date and time given.</p>
+
+ <pre><article>
+ <h1>Small tasks</h1>
+ <footer>Published <time pubdate datetime="2009-08-30T07:13Z">lt;/time>.</footer>
+ <p>I put a bike bell on his bike.</p>
+</article></pre>
+
</div><h4 id="the-code-element"><span class="secno">4.6.10 </span>The <dfn><code>code</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Implemented and widely deployed</i><dl class="element"><dt>Categories</dt>
<dd><a href="#flow-content">Flow content</a>.</dd>
<dd><a href="#phrasing-content">Phrasing content</a>.</dd>
@@ -41486,12 +41541,26 @@
<li>
- <p>If <var title="">article</var> has a <code title="attr-article-pubdate"><a href="#attr-article-pubdate">pubdate</a></code> attribute, and <a href="#parse-a-global-date-and-time-string" title="parse a global date and time string">parsing that
- attribute's value as a global date and time string</a> does
- not result in an error, then let <var title="">publication
- date</var> be the value of that attribute.</p>
+ <p>If <var title="">article</var> has a <code><a href="#the-time-element">time</a></code>
+ element descendant that has a <code title="attr-time-pubdate"><a href="#attr-time-pubdate">pubdate</a></code> attribute and whose
+ nearest ancestor <code><a href="#the-article-element">article</a></code> element is <var title="">article</var>, and the first such element's <a href="#concept-time-date" title="concept-time-date">date</a> is not unknown, then run
+ the following substeps, with <var title="">e</var> being the
+ first such element:</p>
- <p>Otherwise, let <var title="">publication date</var> have no
+ <ol><li><p>Let <var title="">datetime</var> be a <a href="#concept-datetime" title="concept-datetime">global date and time</a> whose date
+ component is the <a href="#concept-time-date" title="concept-time-date">date</a> of
+ <var title="">e</var>.</li>
+
+ <li><p>If <var title="">e</var>'s <a href="#concept-time-time" title="concept-time-time">time</a> and <a href="#concept-time-timezone" title="concept-time-timezone">time-zone offset</a> are not
+ unknown, then let <var title="">datetime</var>'s time and
+ time-zone offset components be the <a href="#concept-time-time" title="concept-time-time">time</a> and <a href="#concept-time-timezone" title="concept-time-timezone">time-zone offset</a> of <var title="">e</var>. Otherwise, let them be midnight and no offset
+ respectively ("<code title="">00:00Z</code>").</li>
+
+ <li><p>Let <var title="">publication date</var> be the
+ <a href="#best-representation-of-the-global-date-and-time-string">best representation of the global date and time
+ string</a> <var title="">datetime</var>.</li>
+
+ </ol><p>Otherwise, let <var title="">publication date</var> have no
value.</p>
</li>
Received on Monday, 31 August 2009 07:46:42 UTC