W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2011

[whatwg] microformats, microdata, and custom data attributes

From: Ashley Sheridan <ash@ashleysheridan.co.uk>
Date: Sat, 16 Apr 2011 07:00:15 +0100
Message-ID: <1302933615.3322.1.camel@localhost.localdomain>
On Fri, 2011-04-15 at 22:12 -0700, Tab Atkins Jr. wrote:

> On Fri, Apr 15, 2011 at 6:29 PM, Justin Karneges <justin at affinix.com> wrote:
> > Hi folks,
> >
> > I'm desiring a way to markup "mentions of a person" semantically within HTML,
> > for use in an open standard.  Think of a more rich form of the @person
> > convention used on Twitter and elsewhere:
> >
> > <p>@justin I totally agree</p>
> >
> > My first thought was to use a data-* attribute.  For example:
> >
> > <p><a href="http://example.org/justin/" data-mention-
> > id="acct:justin at example.org" data-mention-context="reply">justin</a> I totally
> > agree.</p>
> >
> > However, the HTML specification says custom data attributes are only to be used
> > privately.  So, I am not sure if it is appropriate to create a public standard
> > whereby independent developers are encouraged to utilize a common data-*
> > attribute.
> >
> > Another way is to use Microdata, though I seem to have to hack it a bit to
> > have hidden values:
> >
> > <p><a href="http://example.org/justin/" itemscope
> > itemtype="http://example.org/itemtypes/mention"
> > itemid="acct:justin at example.org"><span itemprop="context:reply"/><span
> > itemprop="name">justin</span></a> I totally agree.</p>
> 
> If necessary, representing hidden data can be done via <meta itemprop
> content> in Microdata.
> 
> It might be useful to understand a little more about your goal in
> marking this up, though, so the most appropriate way to do so can be
> determined.  Is this meant to be processed by machines?  If so, what
> use will it be put to?
> 
> ~TJ


Couldn't the cite attribute be made use of the q, blockquote and cite
tags? It only really allows the source to be specified for a
quote/citation, so maybe some other semantic attribute that lends itself
well to other information, like your context example?

-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk
Received on Friday, 15 April 2011 23:00:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:03 GMT