[uf-discuss] [citation]: Brian's outstanding issues 3: nesting

Michael McCracken michael.mccracken at gmail.com
Mon Sep 25 15:24:01 PDT 2006


Nesting microformats - there are two questions here.

First, about the statement that other uf's don't handle nesting
explicitly. Is this a design decision or just a result of it not being
necessary yet?

Second - the two options listed don't seem like enough.

option 1: requires class names for every reference type. I don't like
this option either.

option 2: uses type class, but makes it confusing IMO - what if you
want to include more data about the containing reference than just one
element? Does the type continue to influence sibling elements until
another type element cancels it out?

I have another option that might work:

option 3: nest ufs. I've used this a few times in examples without
anyone commenting on it. Is this OK? What are the pros/cons? I have
parsed HTML using a DOM traversal before, and this seems like it'd be
reasonably easy to parse. It's also a little easier to write and more
obvious than #2, IMO, since it's clear that the elements under the
container span are all referring to the item that's of type book...

<span class="citation"><span class="type">chapter</span>:
    <span class="title">stuff</span>
    <span class="citation container"><span class="type">book</span>
        <span class="title">A collection of stuff</span>
...

Any other options out there? Comments?

Cheers,
-mike

-- 
Michael McCracken
UCSD CSE PhD Candidate
research: http://www.cse.ucsd.edu/~mmccrack/
misc: http://michael-mccracken.net/wp/


More information about the microformats-discuss mailing list