[uf-new] Recipe proposal

Charles Iliya Krempeaux supercanadian at gmail.com
Thu Jun 5 09:34:05 PDT 2008


Hello Thomas,

On Thu, Jun 5, 2008 at 6:17 AM, Thomas Yde <thomasyde at yahoo.dk> wrote:
>
> As we seem to have a pretty good idea about what's going to be included in the Recipe Microformat, I have posted a proposed schema on the wiki.
>
> http://microformats.org/wiki/recipe-brainstorming#Schema_proposal
>
> Please provide as much feedback as possible!

Assuming I'm reading the it right....

I don't think <ol> or <ul> should be required to use for either the
ingredients or the instructions.

For styling or formating reasons, people may not want to confine the
ingredients or the instructions to a single HTML list.

So, for example, the ingredient section on this page...

http://changelog.ca/topic/Crepes

... has the following markup...

    <p>
        3 eggs
        <br />
        &frac12; litre of <a href="Milk">Milk</a>
        <br />
        200 grams of white flour
        <br />
        A little bit of <a href="Salt">Salt</a>
        <br />
        1 to 2 tea spoons of (cooking) oil
    </p>

This then could be marked up with hRecipe (without using <ol> or <ul>) as...

    <p>
        <span class="ingredient"><span class="quantity">3</span> <span
class="item">eggs</span></span>
        <br />
        <span class="ingredient"><span class="quantity">&frac12;
litre</span> of <span class="item"><a
href="Milk">Milk</a></span></span>
        <br />
        <span class="ingredient"><span class="quantity">200 grams
</span>of <span class="item">white flour</span></span>
        <br />
        <span class="ingredient"><span class="quantity">A little
bit</span> of <span class="item"><a href="Salt">Salt</a></span></span>
        <br />
        <span class="ingredient"><span class="quantity">1 to 2 tea
spoons</span> of <span class="item">(cooking) oil</span></span>
    </p>


Some things to note....

- The use of the HTML entity &frac12; to mean "one half" -- to mean
1/2.  There's other HTML entities that are similar to this too.  Like
&frac14; and &frac34;
- The user of the imprecise quantity of "a little bit"

If one looks at the instructions though, one will notice that there
are some optional ingredients in there.  The last 2 paragraphs of the
ingredients has...

    <p>
        You can serve it with <a href="Whipped Cream">Whipped
Cream</a> and fruit,... <a href="Powdered Sugar">Powdered Sugar</a>
and fruit,... or even with cooked meat.
    </p>
    <p>
        (<a href="Strawberries">Strawberries</a> are a common fruit to use.)
    </p>

It would make sense to be able to have the be marked up as optional ingredients.

So (in addition to that other marking-up I did before) how would this
get marked up?.... Although I'm not if this is as per your schema
proposal, maybe one could do something like...

    <p>
        You can serve it with <span class="ingredient optional
item"><a href="Whipped Cream">Whipped Cream</a></span> and <span
class="ingredient optional item">fruit</span>,... <span
class="ingredient optional item"><a href="Powdered Sugar">Powdered
Sugar</a></span> and fruit,... or even with <span class="ingredient
optional item">cooked meat</span>.
    </p>
    <p>
        (<span class="ingredient optional item"><a
href="Strawberries">Strawberries</a></span> are a common fruit to
use.)
    </p>

I've used 3 classes on each of those optional ingredients...
class="ingredient optional item".  Does that work with your schema
proposal?


Also... what classes are suppose to be used to mark up things
instructions for the recipe?  (I'm not quite sure from the schema
proposal.)  Do I just wrap all 5 paragraphs of the instructions in a
class-method?  I.e., something like this?...

    <div class="method">
        <p>
            ...
        </p>
        ...
        <p>
            ...
        </p>
    </div>


And... I'd also suggest that for the photo, that the "photo" class not
necessarily have to be put on the <img> tag.  So that, although you
could do...

<img src="..." class="photo" />

I'd suggest you also allow for...

<span class="photo"><img src="..." /></span>

Some software may not allow authors to actually create the <img> tag
themselves, because they have an automated way of doing it, but may
allow you to put tags around it, like a <span> with class-photo.


I'd also suggest that instead of using "entry-title" and
"entry-summary" that "recipe-title" and "recipe-summary" be used
instead, so that the semantics of each is free to vary on their own.

(You could always do stuff like class="recipe-title entry-title" if
you want to throw hAtom markup in there too.)


One further things regarding ingredients.  On this page...

http://changelog.ca/topic/Nan-e%20Nokhodchi

... there is the ingredient...

        <br />
        4 tablespoons of unsalted, slivered <a
href="Pistachios">Pistachios</a> for garnish
    </p>

Is the item here just the "Pistachios"?  Or is it the "unsalted,
slivered <a href="Pistachios">Pistachios</a>"?

Also, another ingredient says...

        <br />
        4 &frac12; cups of fine, roasted <a href="Chick-Pea
Flour">Chick-Pea Flour</a>, sifted 3 times
        <br />

Does the "sifted 3 times" get any kind of special treatment?  (Is that
an example of where class-note should be used?)


Here's the examples, for your list (if you want them)...

http://changelog.ca/topic/Crepes
http://changelog.ca/topic/Nan-e%20Nokhodchi


See ya

--
Charles Iliya Krempeaux, B.Sc.
http://ChangeLog.ca/


More information about the microformats-new mailing list