Re: Using the CLASS attribute - Request for Feedback

Dan Connolly wrote:
> Microformats uses the class attribute in several ways; the idiom
> you describe is only one of them.

That's a nice way to put it.

Another way to put it is that microformats abuse the CLASS attribute to
declare both types and relationships between types, very much confusing
the two.

In one microformat, class="foo" might mean a type foo, while in another
microformat it might mean a foo relationship between two things. So you
need to know which microformat you're dealing with to know how to parse
it. That's the kind of inconsistency and unpredictability we're trying
to move away from with RDFa.

>
> [...]
>
> If I understand this proposal, I would (also?) get triples a la...
> 
>  _:span1 rdf:type :summary.
>  _:anchor2 rdf:type :url .
> 
> which is very much unexpected.

Do you expect the CSS to apply different styling rules depending on
which interpretation of CLASS this particular microformat chose? I
suspect not.

In other words, you expect CSS to blindly say "anything with CLASS=x I'm
going to style as an instance of the CLASS x."

And that's exactly what our RDFa interpretation is. The exact semantics
you're expecting from the HTML, expressed as RDF. I think that's quite a
bit more consistent than the microformat approach, where you have to
look up the microformat definition to figure out what that CLASS
attribute really means.

-Ben

Received on Thursday, 12 October 2006 21:21:34 UTC