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

Dan Brickley danbri at danbri.org
Mon Jun 23 14:58:45 PDT 2008


Jake Archibald wrote:
> 2008/6/23 Michael Kaply <mkaply at us.ibm.com <mailto:mkaply at us.ibm.com>>:
> 
> 
> 
>     But how would you detect this in a parser? Currently we look for a
>     class of dtstart. how would you do a getElementsByClassName?
>      
> 
> 
>     I personally don't like the BBC suggestion at all. Hiding data in
>     the class tag just seems like a hack. Especially since I have to
>     look at every class attribute to decide if it is data for the
>     microformat.
> 
>     I'd almost rather use a non standard attribute.
> 
> 
> It is a hack, but so is using title. I find using class less hacky 
> because the data doesn't end up in a human readable space (as title 
> does). "For general purpose processing by user agents" is what the HTML 
> spec says of the class attribute.
> 
> But yes, the dtstart class should remain, followed by a separate data class.
> 
> In implementations and standards, the class attribute has always been 
> for machine data. This is not true of title.

That's my reading too; 'class' seems a home worth investigating for this 
data...

Dan

--
http://danbri.org/


More information about the microformats-dev mailing list