[uf-new] Recipe proposal

Thomas Yde thomasyde at yahoo.dk
Sun Jun 8 11:42:44 PDT 2008


On Jun 5, Charles Iliya Krempeaux wrote:

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

No, <ol> or <ul> should not be required for ingredients or method and  
I don't think there's anything in the current schema proposal that  
suggests this.

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

That's what I'd imagined too.

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

See Scott Reynen's answer. I think your example is a great workaround  
until we find out something better.

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

That's correct. Method steps has been suggested but there never  
really was a discussion of it. Personally, I think it is superfluous.  
If people want to mark up the method as steps it can be done with  
Plain Old Semantic HTML. What do others think of this?

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

Hadn't thought of that. If there are no objections to this, I will  
change the proposal to say something like "must include an element  
with src="[url]"."

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

I would say that's ...

<span class="ingredient"><span class="quantity">4 tablespoons</span>  
of <span class="note">unsalted</span>, <span class="note">slivered</ 
span> <span class="item"><a href="Pistachios">Pistachios</a></span></ 
span>

Thinking about it, maybe the "note" property is superfluous too. I  
mean, it could just be marked up as:

<span class="ingredient"><span class="quantity">4 tablespoons</span>  
of unsalted, slivered <span class="item"><a  
href="Pistachios">Pistachios</a></span></span>

But maybe the "note" property could be useful when searching a  
database, i.e. you could search for "[item:] pistachios" and then  
narrow it down to "[note:] unsalted [item:] pistachios". Opinions?

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

Yes, I would say it is.

>
> 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/
> _______________________________________________
> microformats-new mailing list
> microformats-new at microformats.org
> http://microformats.org/mailman/listinfo/microformats-new

Thanks for your reply.


-- Thomas



More information about the microformats-new mailing list