[uf-new] collection-design-pattern proposal

Manu Sporny msporny at digitalbazaar.com
Tue Apr 24 15:12:42 PDT 2007


Danny Ayers wrote:
> On 24/04/07, Manu Sporny <msporny at digitalbazaar.com> wrote:
>> collection: a non-localized, unstructured grouping of items.
>> list      : a localized, structured grouping of items.
> 
> Hmm, <ul> is semantically an unordered grouping...

Almost correct. <ul> is a /localized/ unordered grouping. We are
attempting to find a way to do both non-localized, localized, structured
and unstructured grouping of items.

<ul> + xoxo solves the problem of localized unordered groups.
<ol> + xoxo solves the problem of localized ordered groups.

Both the scenarios above don't solve the problem of grouping items like so:

<ul>
 <li>Related Item 1</li>
 <li>Related Item 2</li>
</ul>

... A text or HTML ...

<ol>
 <li>Related Item 3</li>
 <li>Related Item 4</li>
</ol>

How can we show that all four of those items are in the same group?

We need to provide support for the following:

???? + xoxo needs to solve the problem of unlocalized unordered groups.
???? + xoxo needs to solve the problem of unlocalized ordered groups.

> I take your point, though I would have thought it better to use
> something like:
> 
> <div class="this_is_a_microformat">
>   <ul class="class_of_the_items">

Perhaps, but remember - we're trying to see if we can solve the problem
in a general manner. If we re-invent the 'group' for every Microformat,
we'll end up with a great deal of grouping cruft that doesn't need to be
there if the problem can be solved in a general way.

>> The following is needed beyond the examples you gave:
>>
>>  - The ability to relate items that are not local to one another in an
>>    HTML page.
> 
> doesn't this do that:
> 
> <ul>
>   <li>here</li>
>   <li><a href="#elsewhere">an item</a></li>
> </ul>

It kinda does do that. There are two reasons I think that proposal is
not desirable:

1. You are creating a 1-1 relationship, not an N-N relationship. URLs
   can only point to a single location, thus they are incapable of
   providing grouping information by themselves.

2. You are constraining the site design by forcing the need to use a
   URI. It doesn't give the site designer an option - it's the
   Microformat way or the highway at that point.

>>  - The ability to relate items on an unstructured basis.
> 
> Sorry, I don't understand what you mean - isn't a collection a
> structure by definition?

A collection and a list are both structures by definition, yes. I should
have used different vocabulary to define the concept.

When I said structured - I was talking about a strict hierarchical
representation. The XML and HTML text formats have a strict hierarchical
representation. They are deterministic data structures. They are lists.

When I said unstructured - I was talking about a loosely coupled
association. An example of this is the concept of a Set in mathematics.
These are collections.

Did that help clarify what was meant by "unstructured"?

-- manu


More information about the microformats-new mailing list