[uf-new] Revisiting grouping problem solution proposal: hset

Chris Griego cgriego at gmail.com
Sat May 19 12:50:04 PDT 2007


Thanks Manu.

I think the purpose of hSet can be achieved with a much simpler
approach, nearly simplifying the entire schema of the format to just
the 'hset' class name by leveraging conventions. I think my suggestion
lies somewhere between the existing Option #3 and #4. Since I haven't
kept up all that well with the hAudio progress, forgive me while I use
hCalendar as an example. Say you have a chronological list of events
that you want to relate with one of two calendars, making the
individual calendars a sparse grouping.

Before microformats:

<h1>Internal and With-Client Events</h1>
<ol>
 <li>FOO Sales Pitch [...]</li>
 <li>Company Picnic [...]</li>
 <li>BAR Photo Shoot [...]</li>
</ol>

With microformats (today this would be parsed as a 3 calendars, 2
without any events):

<h1><span class="vcalendar">Internal</span> and <span
class="vcalendar">With-Client</span> Events</h1>
<ol>
 <li class="vevent"><span class="summary">FOO Sales Pitch</span> [...]</li>
 <li class="vevent"><span class="summary">Company Picnic</span> [...]</li>
 <li class="vevent"><span class="summary">BAR Photo Shoot</span> [...]</li>
</ol>

With my proposal for hSet:

<h1><span id="internal-event" class="hset vcalendar">Internal</span>
and <span id="with-client-event" class="hset
vcalendar">With-Client</span> Events</h1>
<ol>
 <li class="with-client-event vevent"><span class="summary">FOO Sales
Pitch</span> [...]</li>
 <li class="internal-event vevent"><span class="summary">Company
Picnic</span> [...]</li>
 <li class="with-client-event vevent"><span class="summary">BAR Photo
Shoot</span> [...]</li>
</ol>

Using the hset class names attaches special meaning to the element's
ID value, marking it as the machine-readable group name, and then any
other element in the document with a class name that matches the ID
should be considered a set member. The class attribute is a natural
grouping mechanism, by simply marking contacts across the internet
with 'vcard' we've grouped them in the category of contact
information.

I know that earlier in this discussion I've warned against using the
ID attribute since microformats should be low-impact for
implementation into existing content; but I feel this usage still
holds true to that principle since it can work well with existing IDs.
IDs are currently used as a part of the include-pattern, and I see
hSet's role as an alternative (not replacement) to the include-pattern
that reverses the declaration where the children declare their parent
instead of the parent declaring its children.

-- 
Chris Griego


On 5/19/07, Manu Sporny <msporny at digitalbazaar.com> wrote:
> Chris Griego wrote:
> > Before you start on a full-blown proposal, can you create a sample
> > page?
>
> Martin McEvoy already has one set up based on a real-world example:
>
> http://weborganics.co.uk/haudio
>
> There is also the brainstorming page, look at Option #3:
>
> http://microformats.org/wiki/grouping-brainstorming#Option_3:_Explicit_class-based_grouping
>
> The only difference is the change from "grouping" to "hset".
>
> > I think I have some ideas on how this could work more simply as a
> > convention, but without seeing what you're trying to achieve I don't
> > know if it answers the problem or not.
>
> You should also look through the grouping-examples page to get an idea
> of the problem that we are attempting to solve:
>
> http://microformats.org/wiki/grouping-examples
>
> If you've got some other problem solution proposals, we'd love to hear them.
>
> -- manu
>
>
> _______________________________________________
> microformats-new mailing list
> microformats-new at microformats.org
> http://microformats.org/mailman/listinfo/microformats-new
>


More information about the microformats-new mailing list