W3C home > Mailing lists > Public > public-html@w3.org > August 2009

Re: The cite and pubdate attributes

From: Jeremy Keith <jeremy@adactio.com>
Date: Sat, 15 Aug 2009 13:50:10 +0100
Cc: Lachlan Hunt <lachlan.hunt@lachy.id.au>, Toby A Inkster <tai@g5n.co.uk>, Joe D Williams <joedwil@earthlink.net>, Bruce Lawson <brucel@opera.com>, public-html <public-html@w3.org>
Message-Id: <F7FD7B44-B6B4-4F8B-BC2B-0F1881410096@adactio.com>
To: Ian Hickson <ian@hixie.ch>
Hixie wrote:
> pubdate="" on <article> is solving the problem that there's no other  
> way
> to associate a publication date with a blog entry in HTML, in  
> particular
> to allow for conversion to Atom.

There is one other way. The hAtom microformat uses class="published"  
to indicate the date(time) that an article was published  
(specifically, the containing element with class="hentry").

hAtom in HTML4 looks like this:

<div class="hentry">
<h2 class="entry-title"><a href="blah" rel="bookmark">Accessibility of  
HTML5 video</a></h2>
<abbr class="published" title="2009-07-30">Thursday 30 July 2009</abbr>
<p class="entry-summary">Brilliantly witty, incisive prose, in a  
gloriously elegiac style reminiscent of <cite>Cider With Rosie</ 
cite>.</p>
</div>

hAtom in HTML5 would look like this:

<article class="hentry">
<header>
<h2 class="entry-title"><a href="blah" rel="bookmark">Accessibility of  
HTML5 video</a></h2>
<time class="published" datetime="2009-07-30">Thursday 30 July 2009</ 
time>
</header>
<p class="entry-summary">Brilliantly witty, incisive prose, in a  
gloriously elegiac style reminiscent of <cite>Cider With Rosie</ 
cite>.</p>
</article>

So the addition of class="published" within a containing element that  
has class="hentry" effectively scopes that date(time), solving the  
problem that Hixie raised:

> That <time> element isn't semantically linked to the article. It could
> just as easily be the author's birthdate.

However...

I'm not in favour of "blessing" certain uses of the class attribute in  
the spec (I think the ad-hoc approach of microformats works just  
fine). But I do concur with Hixie:

> I would like to drop pubdate="" also, if we can do so in some manner  
> that
> still solves the aforementioned problem.

Would it be too fragile to attempt the same kind of scoping that hAtom  
achieves (by using "published" nested in "hentry") using <header> and/ 
or <footer>?

e.g.

If a <time> element is found within a <header> or <footer> element  
within an <article>, assume that the date(time) is the date of  
publication:

<article>
<header>
<h2><a href="blah" rel="bookmark">Accessibility of HTML5 video</a></h2>
<time datetime="2009-07-30">Thursday 30 July 2009</time>
</header>
<p>Brilliantly witty, incisive prose, in a gloriously elegiac style  
reminiscent of <cite>Cider With Rosie</cite>, which I read on <time  
datetime="1989-07-01">July 1st, 1989</time>.</p>
</article>

or:

<article>
<header>
<h2><a href="blah" rel="bookmark">Accessibility of HTML5 video</a></h2>
</header>
<p>Brilliantly witty, incisive prose, in a gloriously elegiac style  
reminiscent of <cite>Cider With Rosie</cite>, which I read on <time  
datetime="1989-07-01">July 1st, 1989</time>.</p>
<footer>
<time datetime="2009-07-30">Thursday 30 July 2009</time>
</footer>
</article>

Both those examples include two instances of the <time> element, but  
in each case it should be possible to distinguish the publication date  
(2009-07-30) from the other date mentioned (1989-07-01) because only  
the publication date was contained by a <header> or <footer>.

What do you think? Too fragile or just enough robustness to satisfy  
Chaals's concern (without using hidden metadata)?

Jeremy

-- 
Jeremy Keith

a d a c t i o

http://adactio.com/
Received on Sunday, 16 August 2009 10:32:07 UTC

This archive was generated by hypermail 2.3.1 : Friday, 10 October 2014 16:24:50 UTC