[whatwg] Annotating structured data that HTML has no semantics for

Ian Hickson ian at hixie.ch
Tue Jul 7 02:04:10 PDT 2009

On Tue, 9 Jun 2009, Frank Hellenkamp wrote:
> >
> > I agree entirely. I actually tried to find a workable solution to 
> > address this but unfortunately the only general solutions I could come 
> > up with that would allow this were selector-based, and in practice 
> > authors are still having trouble understanding how to use Selectors 
> > even with CSS.
> At least simple selectors are well understood and a well established 
> technique on the web.

Sure, but with tables, you can't use simple selectors. Simple selectors 
(e.g. a class attribute on each cell) wouldn't be any better than 
repeating itemprop="" everywhere.

> There is widespread use for it in CSS (so it is very simple to test, if 
> your selector works for the correct set of elements).

It'd actually be quite hard to test a selector layer for microdata, 
relative at least to the testing that (say) CSS gets. The thing is, with 
CSS, if there's a mistake then the worst that will happen is that the rule 
will be ignored, or will apply in some way you didn't realise, but with 
the end result being what you want.

With microdata, if you get the rules wrong, you won't really know, until 
someone tries to apply the data in some way you didn't expect, and then 
it'll fail in ways you won't know about.

> And with a selector-based aproach it is far easier to add 
> metadata-information to existing content, than with the 
> metadata-proposal. So for authors it would be much easier, I think.
> It would work like a dezentralized microformats-approach (btw. it would 
> be easy to map the existing microformats to such a css-based 
> metadata-format), with the benefit that you can simply map your own 
> classes and ids to global ones like foaf, dc or hcard.
> And you could easily use such profiles from other pages, e.g.: Someone 
> could markup the songs on his page in a way last.fm does and then simply 
> use a copy of their meta-data profile (basically in the same way we use 
> microformats now).

A selectors-based approach would be similar to GRDDL in this respect.

I don't think this really needs support within HTML; I would encourage you 
to work on this as a stand-alone technology.

> > There's also the problem with separating the data from the rules that 
> > say how to interpret the data, which would likely lead to more 
> > problems than the typos one would get from repeating the itemprop=""s.
> The only real problem I see is the unfortunate fact, that it is harder 
> for browser-implementors to write a good copy & paste code which 
> preserves all metadata from one source to another.

That's one symptom of the above, yes.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

More information about the whatwg mailing list