[uf-discuss] mixing vocabularies

Thomas Loertsch loertsch.thomas at guj.de
Tue Jun 30 03:43:22 PDT 2009

Ah, my first megathread... sorry for the late response but I  was away over
the weekend. Peter, thanks for finding the bad in the hRecipe example on the
wiki! Ben, thanks for your very accurate analysis! Tantek, thanks for
updating the wiki!

On 28.06.09 23:44, "Peter Mika" <pmika at yahoo-inc.com> wrote:

> I agree with your analysis. Indeed over-emphasizing this reuse from
> hcard gives the impression that somehow the ingredient has to be an
> hcard. I would also add that it would make it easier for people to use
> the hrecipe format if the references to hcard and hatom would be removed
> or at least deemphasized,

You're right. I removed the references from the schema overview. That should
help quite a lot already.

> because it gives the reader the impression
> that one has to read or understand the hcard/hatom spec before starting
> with hrecipe, i.e. that it's not a standalone spec. Based on what you
> say, it should be, i.e. it should make sense without reference to
> hcard/hatom.

There's a lot of "this element must follow the conventions outlined in that
microformat" talk. When editing hRecipe I copied a lot from other formats
and this to me seemed the way they all do it - which indeed fostered my
misinterpretation that I'm actually reusing elements at run-time.

I'll try to copy (more of) the referenced conventions inline and make the
page more self-contained. But that isn't always as easy as it sounds: e.g.
"author" is reused from hAtom which itself states that "an Entry Author
element MUST be encoded in an hCard", which - if I got it right - leads to
the following construct:

    <div class="hrecipe">
        <p class="author vcard fn">Hans Wurst</p>

That's not exactly self-containing and standalone. But searchmonkey would
know how to parse it, right?

> Ben Ward wrote:
>> On 26 Jun 2009, at 21:33, Peter Mika wrote:
>> Noting that Tantek has edited the hCard class out on the wiki. I think
>> we should assume that this was an error in the draft (note that
>> hRecipe is draft).

Yes, it was indeed - my bad! I'll try to update a few more details of the
example. I welcome very much any scrutiny of the draft especially with
respect to it's conformance to the technical details of microformats!

>> **I think** I understand what has happened here. Thomas, if this
>> assumption isn't correct I apologise.

You are correct! Thanks again for the very helpful clarification! Although,
as I examplified above with the "author" element, things seem to be a little
more complicated in practice. Still working on it...


>> However, I hope this explanation
>> is valuable anyway in the context of this Œcombining vocabularies¹
>> discussion, so please consider the following neutrally:
>> This discussion started from a mistaken understanding about combining
>> vocabularies in microformats ‹ e.g. combining hcard with hreview to
>> reuse terms like `fn`.
>> "combining" is a concept applied from a formal vocabulary context,
>> where you would import two vocabulary namespaces into different
>> prefixes to reuse terms. (e.g. importing dublin core and atom
>> namespaces and using them in combination as part of some larger
>> document mark-up). In XML, reusing vocabulary terms requires a formal
>> reference, because when you use `dc:title` you're using _the same_
>> `dc:title` as in every other use of Dublin Core.
>> In XML, this combining of vocabularies is a publishing-time operation.
>> In microformats, that concept doesn't exist. The sharing of terms
>> between vocabularies is a simpler **design-time** decision. Where
>> terms a new format has fields that share the same use with a term
>> defined from a previous microformat, the term is re-used in the new
>> vocabulary.
>> So, in hRecipe, `fn`, `type`, `value` and `photo` are not Œimported¹
>> from hcard, they are simply properties with the same name, because
>> they are used the same way.
>> The hRecipe spec currently emphasises where terms have been reused
>> from hCard (this is good, it clearly documents the design decisions of
>> the draft). And, in the case of ingredient, it documents that `type`
>> and `value` are reused from hcard (that's correct).
>> I think the example was using class="ingredient hcard" with the intent
>> of explicitly referencing the hCard vocabulary for `type` and `value`.
>> However, that isn't necessary. `type` and `value`, are first-class
>> members the hRecipe draft vocabulary, and the context of their use is
>> indicated by the root class name `hrecipe`.
>> This is why I explain microformats as objects:
>>   `class="hrecipe"` means "this is a recipe object" not "import the
>> recipe vocabulary".
>> I suspect this is the muddle that happened with the example, but even
>> if not, I hope this explanation makes things a little clearer for
>> those who switch between the different vocabulary models on the web.

Thomas Lörtsch
Business Development
G+J Exclusive&Living digital GmbH
Redaktion Online
Stubbenhuk 5
20459 Hamburg
eMail: loertsch.thomas at guj.de

More information about the microformats-discuss mailing list