[uf-discuss] Re: [hcite] nesting container elements

Michael McCracken michael.mccracken at gmail.com
Fri Mar 30 09:42:13 PST 2007


I've added an example for a journal article to the wiki:

http://microformats.org/wiki/citation-brainstorming#Citing_a_journal_article

-mike

2007/3/29, Michael McCracken <michael.mccracken at gmail.com>:
> (note - I originally sent this to uf-dev accidentally. My impression
> is that more hcite people are on uf-discuss. Correct me if I'm wrong
> and we can move this to uf-dev. Thanks!)
>
> We need to deal with bibliographic details for things like chapters in
> a book, articles in a journal or magazine, and issues in a series.
>
> For designing a format, the main problem is that there are duplicate
> items that need to be scoped - for instance, both the article and the
> journal have a title.
>
> The point has been made in a few places that many existing
> bibliographic formats handle this by just adding fields at the top
> level - for example in the common usage of bibtex, a chapter of a book
> is a record of type "inbook", and the "title" field represents the
> book title, while the chapter title is recorded in the "chapter"
> field. For example:
>
> @inbook{TAOCP4b,
> title = {The Art of Computer Programming: Graph and Network Algorithms},
> chapter = {Expander Graphs},
> ...
> }
>
> While it's certainly possible to continue this scheme of adding field
> names whenever a publication type can be contained by another type
> with clashing fields, other formats have adopted an approach that
> avoids this field name multiplication, at the cost of a little extra
> complexity in nesting. For example, an article in a journal,
> represented in MODS XML (from
> http://www.scripps.edu/~cdputnam/software/bibutils/mods_intro.html ):
>
> <mods ID="C003">
>     <titleInfo>
>         <title>Different base/base mismatches are corrected with
>         different efficiencies by the methyl-directed DNA mismatch-repair
>         system of E. coli</title>
>     </titleInfo>
> ...
>    <relatedItem type="host">
>         <titleInfo>
>             <title>Cell</title>
>         </titleInfo>
>           ...
>     </relatedItem>
> </mods>
>
> In this way, when a journal has a title, you just use the 'title'
> field, and you don't need to remember the difference between
> 'booktitle', 'chapter', 'journal', etc... There's also the advantage
> that you can support more types of references without changing the
> format to add new field names.
>
> I am proposing that we treat these cases in hCite in a way similar to
> MODS instead of the way BibTeX does it. Here's what I propose for
> hCite:
>
> 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?
>
> FWIW, I have code in BibDesk that interprets this nesting scheme to
> translate into BibTeX, and it works pretty well.
>
> *note - Yes, it is also useful to know the type of the container so we
> can tell if we're looking at a book or a journal, but that's a
> separate discussion we'll have to have soon enough. For now lets focus
> on the nesting issue.
>
> Thanks,
> -mike
>
> --
> Michael McCracken
> UCSD CSE PhD Candidate
> research: http://www.cse.ucsd.edu/~mmccrack/
> misc: http://michael-mccracken.net/wp/
>


-- 
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