W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2007

[whatwg] <cite> versus |cite|

From: Matthew Raymond <mattraymond@earthlink.net>
Date: Sun, 14 Jan 2007 15:12:37 -0500
Message-ID: <45AA8EB5.40401@earthlink.net>
Anne van Kesteren wrote:
> On Fri, 12 Jan 2007 12:51:05 +0100, Matthew Raymond wrote:
>> | <p>
>> |   <q cite="#Hixie">How times have changed</q>, said
>> |   <cite id="Hixie">
>> |     <a href="http://ln.hixie.ch/?start=1163122250&count=1">
>> |       Ian
>> |     </a>
>> |   </cite>.
>> | </p>
> 
> How about:
> 
>    <p><q source=foo>Blah</q>, said <a href=... id=foo>Baz</a></p>

   Well, first of all, it doesn't cover cases without hyperlinks:

| <p><q>Blah</q>, said Baz</p>

   Above, you have no parent to associate with. "Ah, but you could just
use a <span>!", you might say. But if you're going to use a parent
element, <cite> is obviously better from a semantic standpoint:

| <p><q source="foo">Blah</q>, said <cite id="foo">Baz</cite></p>

   And if you're going to do that, you might as well always use <cite>
like I have in the original example. It doesn't make sense to use <cite>
in one case and not use it in another.

   As for |source| versus |cite|, I see two problems. First is that the
attributes are so similar that they could get easily confused. Second is
that "source" is essentially the long form of "src", which may cause
even more confusion:

| <img source="confused.png" alt="Avoid attributes with similar names.">

   Is it really too confusing to allow authors to cite a <cite>
attribute? It does strike me as a mild hack, but no more than <datalist>.
Received on Sunday, 14 January 2007 12:12:37 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:31 UTC