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

André Luís andr3.pt at gmail.com
Tue Jun 24 04:52:23 PDT 2008


Since the problems are arising from machine-data ending up on
human-readable attributes, why can't we "compromise" and accept to
have machine-data-values on non-human-readable attributes?

Also, extending the document with namespaces limits the usage to
xhtml, and according to POSH principles, we don't want that.

Like you guys mentioned, leaving the dtstart but adding an extra
value... would it be too much of a hassle for parsers?

<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{[^}]*}/ ?
4. if yes, use it as value.

What's so wrong with this approach?

Isn't it widely accepted that this is the achilles' heel of all design
patterns used by microformats? We must start accepting the fact that
without extending html we don't have much attributes to choose from...

--
André Luís



On Mon, Jun 23, 2008 at 10:58 PM, Dan Brickley <danbri at danbri.org> wrote:
> 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/
> _______________________________________________
> microformats-dev mailing list
> microformats-dev at microformats.org
> http://microformats.org/mailman/listinfo/microformats-dev
>



More information about the microformats-dev mailing list