[uf-dev] Using class for non-human data

Eivind Uggedal eivindu at ifi.uio.no
Tue Jun 24 05:13:57 PDT 2008


> <abbr class="dtstart data{2008-06-23}" title=June 23rd, 2008">Today</abbr>
>
> 1. grab elementByClassName( dtstart )
> 2. get classnames as array
> 3. grab classname after dtstart(ie, i+1, i being the index of
> dtstart), does it match /data{[^}]*}/ ?

It would be potentially dangerous to have assumptions of the ordering
of class names. Another level of unneeded complexity. This snippet
should also be parseable:

<abbr class="fancy data{2008-06-23} dstart" title=June 23rd, 2008">Today</abbr>

-- 
Cheers,
Eivind Uggedal
Engineer,
Faculty of Social Science,
MSc Computer Science,
University of Oslo


More information about the microformats-dev mailing list