[uf-new] collection-design-pattern proposal

Manu Sporny msporny at digitalbazaar.com
Tue Apr 24 14:29:21 PDT 2007


Chris Griego wrote:
> On 4/23/07, Manu Sporny <msporny at digitalbazaar.com> wrote:
>> Proposed below is a much simpler method for specifying collections. It
>> uses the "id" attribute in the div/span elements.
> 
> I would have to strongly discourage using the ID attribute. One of the
> principles of microformats is to be easy to implement in existing
> content. This works well with the class, rel, and rev attributes since
> these can handle multiple values. ID cannot, to implement this
> collection format, people may need to modify the IDs they are already
> using and, as far as HTML goes, update their CSS and JavaScript as
> well.

You make a valid point - if people are already using the ID attribute,
we don't want to stomp all over that.

Although, they wouldn't have to change any ID attributes? Would they?
Everything that we are talking about here would require them to wrap
their data in NEW div and span tags. The IDs that you are talking about
them changing don't exist yet.

If their old HTML looked like this:

Album Name
Song Name

Their new HTML would look like this:

<div id="albumname" class="haudio">
   <span class="work-title">Album Name</span>
   <div id="albumname.songname" class="haudio">
   <span class="work-title">Song Name</span>
   </div>
</div>

If the community doesn't like the use of the id attribute, we could
still do something like:

<div class="haudio grouping.albumname">
   <span class="work-title">Album Name</span>
   <div class="haudio grouping.songname">
   <span class="work-title">Song Name</span>
   </div>
</div>

This would require the parsers to be a bit smarter, but no smarter than
having to parse the id attribute, and would follow the "Microformats
way" a bit more strictly.

-- manu


More information about the microformats-new mailing list