[uf-new] Microformats for hidden data

Fiann O'Hagan fianno at jshub.org
Thu Nov 26 07:23:18 PST 2009


Thanks for the quick response Dan.

> You already highlight the existence of <meta>, and I
> guess I'd just draw a stronger contrast between that and proprietary /
> random Javascript variables. There's a lot to be said for not having
> to run a Javascript interpreter to figure out the basic data
> structures encoded in a Web page. So maybe <meta> is worth some more
> investigation, rather than just listing it as part of the problem...?

I agree we shouldn't dismiss the meta tag.

The problem as I see it is that the meta tag only allows a simple
association of name=value pairs. It doesn't allow any kind of
structured data. So you can have a meta tag that gives the author, as
recommended in the HTML spec
http://www.w3.org/TR/html401/struct/global.html#h-7.4.4

For example, to specify the author of a document, one may use the META
element as follows:
<META name="Author" content="Dave Raggett">

But if you want to use hCard to give contact details for the author,
you can't, because it's an opaque string.

There's additional complexity with the content of the tag being in an
XML attribute rather than a text node too, which complicates the
escaping required for the string and means that you cannot include any
HTML in the text.

As I understand it, these limitations are what led the W3C to create
RDF, which is cross-linked from the meta element in the HTML spec. And
the complexity of RDF, is of course what led to the rise of
microformats.

One final serious limitation of the meta element is that it is only
valid in the head of a document, and not in the body. With more
complex pages, for example tabbed layouts, and content served in via
AJAX, there's a good case to associate "page" metadata with a fragment
of the page rather than the entire HTML document. That's not possible
unless you can define a wrapper element around the content you are
concerned with.

Does that make sense, or should I be looking at it again?

Fiann


More information about the microformats-new mailing list