[uf-discuss] [hcite] nesting container elements

Michael McCracken michael.mccracken at gmail.com
Fri Mar 30 11:33:17 PST 2007


2007/3/30, Scott Reynen <scott at randomchaos.com>:
> On Mar 29, 2007, at 2:41 PM, Michael McCracken wrote:
>
> > I propose a 'container' class name that would be attached to a nested
> > hCite instance to note when the nested hCite represents the containing
> > item for the root hCite. The journal example above would then look
> > something like this:
> >
> > <span class="hcite">
> >    <span class="title">Different base/base mismatches are corrected
> > with
> >        different efficiencies by the methyl-directed DNA mismatch-
> > repair
> >        system of E. coli
> >    </span>
> > ...
> >   <span class="hcite container">
> >        <span class="title">Cell</span>
> >    ...
> >    </span>
> > </span>
> >
> > Comments?
>
> Maybe this has already been covered and I missed it,

Not that I know of.

> but why wouldn't
> we use HTML nesting to indicate citation nesting?  That is, rather
> than specify which node is a container with a class name, do it by
> actually having it contain the relevant nodes, e.g. (and I'm
not
> proposing this as actual markup, just how nesting could work):
>
> <div class="hcite journal">
>         <div class="hcite article">
>                 <h3 class="title">Different base/base mismatches are corrected
> with different efficiencies by the methyl-directed DNA mismatch-
> repair system of E. coli</h3>
>         </div>
>         ...
>         <h2 class="title">Cell</h2>
> </div>

one concern about nesting like this is that common citation formatting
actually nests information about the container inside info about the
contained item. For example, see the journal name in this citation:

Klapper PE, Cleator GM, Dennett C, Lewis AG (1990) Diagnosis of herpes
encephalitis via Southern blotting of CSF DNA amplified by polymerase
chain reaction. J Med Virol 32:261-264

So, in this case we have container info ("J Med Virol") completely
surrounded by contained-item info (authors, year, title before, then
pages after).

I'm not sure this is always the case, but it does point out a problem
in using the nested-hcite element approach, whichever way the nesting
is interpreted.

> That would require parsers to know all potential sub-types of each
> media type so an article title wouldn't get misinterpreted as a
> journal title,

Can you expand on this point a bit? I'm not really seeing why that'd
be necessary.
Wouldn't it be enough just to say that children of an hCite that are
also children of a child hCite don't apply to the parent hCite?

>but that looks to me like a relatively small burden
> for parsers in exchange for simpler publishing.

-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