Thomas Yde wrote:

Why do you think 'value' is a poor class name? Can you elaborate a
bit on the "special behaviour"?

http://microformats.org/wiki/hcard-parsing#Value_excerpting

So assuming that value excerpting (a shared design pattern used by most other compound microformats) is allowed in hrecipe, then my previous example:

        <li class="ingredient hmeasure">
                <span class="quantity">
                        <span class="value">2</span>
                        <span class="unit">tbsp</span>
                </span>
                <span class="item">parsley</span>
                <span class="preparation-note">(chopped)</span>
        </li>

It would be parsed by an hRecipe-aware agent (but without any special knowledge of hMeasure) as:

        Ingredient:
                Quantity: 2
                Item: Parsley
                Preparation Note: (chopped)

Note that the unit ("tbsp") is absent, because value-excerpting is applied to the quantity. That's why I feel that "value" is the wrong class name to use for the numeric part of the measurement in hmeasure. Perhaps "mag" (short for "magnitude") encompasses the meaning just as well, without having to worry about value excerpting?

That said it is the intention of my hmeasure schema that explicitly marking up the value and unit is not required in the vast majority of cases. So the following ought to avoid the value issue and parse properly using both the hmeasure and hrecipe microformats:

        <li class="ingredient">
                <span class="hmeasure">
                        <span class="quantity">2 tbsp</span>
                        <span class="item">parsley</span>
                </span>
                <span class="preparation-note">(chopped)</span>
        </li>

Becase according to hmeasure minimisation in the draft spec, the measurement doesn't have a value or unit, so minimisation is employed: the node contents (except the explicitly marked up "item") are taken to be the value and unit.

--
Toby A Inkster
<mailto:[EMAIL PROTECTED]>
<http://tobyinkster.co.uk>



_______________________________________________
microformats-new mailing list
[email protected]
http://microformats.org/mailman/listinfo/microformats-new

Reply via email to