[uf-discuss] permalinks for microformat chunks of pages: use the 'id' attribute on root microformat elements

Tantek Ç elik tantek at cs.stanford.edu
Fri Jun 23 07:55:41 PDT 2006


I tend to agree with Brian's assessment.  Categories/tags are the best way
to do named groups of things, and that works across microformats as well (in
case you wanted to group Brighton people and Brighton events and reviews of
Brighton related things).

I would recommend using Tags to be even more specific than just the plain
string, as Brian suggests as an alternative.

<div class="vcard">
  <span class="fn">Jeremy Keith</span>  in
  <a class="category" rel="tag"
     href="http://en.wikipedia.org/wiki/Brighton">Brighton</a>
</div>

Not that it is ambiguous at all in this case, but in general using rel-tag
tags/categories provides a much better specificity, and provides a nice UI
hook for what did the author *mean* by Brighton? (Imagine distinguishing
Paris, France vs. Paris, Texas for example).  And in this case, it wouldn't
hurt to mark it up as the locality as well.

<div class="vcard">
  <span class="fn">Jeremy Keith</span>  in
  <span class="adr">
   <a class="category locality" rel="tag"
      href="http://en.wikipedia.org/wiki/Brighton">Brighton</a>
  </span>
</div>


This definitely sounds like a good candidate for hcard-authoring in a "how
to collect hCards into groups or sets" section.

Tantek


On 6/23/06 7:41 AM, "brian suda" <brian.suda at gmail.com> wrote:

> At first look i really like this idea, but then i though about it for a
> minute....
> 
> You are adding 'brighton' into the class attribute, which violates the
> human readable aspect of Microformats. This would be better...
> 
> <div class="vcard">
>   <span class="fn">Jeremy Keith</span>  in
>   <span class="group">Brighton</span>
> </div>
> 
> in hCard there already is a property for grouping, class="category" so
> you could use
> 
> <div class="vcard">
>   <span class="fn">Jeremy Keith</span>  in
>   <span class="category">Brighton</span>
> </div>
> 
> or even
>   <a class="category" rel="tag"
> href="http://en.wikipedia.org/wiki/Brighton">Brighton</a>
> 
> Then you could begin to make a distributed web-sized group.
> 
> It is slightly more difficult for a parser to find a class="category",
> then look up the tree and see if it is a child of class="vcard" rather
> than putting them both on the root-element.
> 
> The other downside to adding semantics outside of the scope of hCard, is
> that it is impossible to determine if it is a CSS style or a semantic
> attribute.
> 
> <div class="vcard brighton call-out-box">...</div>
> 
> is "call-out-box" also a group or a style?
> 
> I would recommend looking into using the category property for groups.
> 
> -brian
> 
> Drew McLellan wrote:
>> I'm slightly wary of any pattern that prescribes doing anything
>> outside the root element of a given µF. context.
>> 
>> One proposal would be to introduce a very simple pattern for groups of
>> hCards - just like groups in address book programs (friends, family,
>> collegues etc). In XHTML we already have a mechanism of grouping
>> elements - the class attribute. So how about treating hCards that
>> share a common class name other than 'vcard' as a loose group?
>> 
>> <div class="vcard brighton">
>>     <div class="fn">Jeremy Keith</div>
>> </div>
>> 
>> <div class="vcard brighton">
>>     <div class="fn">Andy Budd</div>
>> </div>
>> 
>> <div class="vcard">
>>     <div class="fn">Drew McLellan</div>
>> </div>
>> 
>> Granted, there's danger of the concept duplicating problems already
>> solved by either XFN, or by intrinsic groupings already created by the
>> values within the hCards themselves. Most groupings I imagine are
>> based on location, companies, or XFN properties like friends,
>> collegues, family. I think we'd also need to see more real-world
>> examples to demonstrate a need for something like this.
>> 
>> I guess two examples would be your d.Construct Locations page, where
>> groups are travel, accomadation, freewifi, etc, and the LPG site I did
>> the other week where all my hCards were gas stations, and would be
>> sensible to group as such. It gets more complex with the d.Construct
>> case, though, where you'd actually want to group everything overall
>> into one 'dconstruct' group too. e.g.
>> 
>> <div class="vcard travel dconstruct">
>>     <div class="fn org">Brighton Train Station</div>
>> </div>
>> 
>> The above would belong to the travel group and the dconstruct group.
>> I'm not sure how a parser would know how those should be nested,
>> however. (Does each of travel, accomodation, freewifi contain a
>> dconstruct group, or does the dconstruct group contain the others?).
>> So you'd need rules about group name exclusivity .. and all in all I
>> think I've talked myself out of the idea ;)
>> 
>> 
>> drew.
>> 
>> _______________________________________________
>> microformats-discuss mailing list
>> microformats-discuss at microformats.org
>> http://microformats.org/mailman/listinfo/microformats-discuss
>> 
> 
> _______________________________________________
> microformats-discuss mailing list
> microformats-discuss at microformats.org
> http://microformats.org/mailman/listinfo/microformats-discuss



More information about the microformats-discuss mailing list