[uf-discuss] How about adding aRecipe, an RDFa serialization of hRecipe?

Thomas Loertsch loertsch.thomas at guj.de
Mon Oct 13 08:01:01 PDT 2008


Hi Toby,

I like the reuse of existing vocabularies but I'm wondering if it could be
done in another, less involved way. The way you do it also scarces me a
little because I find it hard to judge how stable vocabularies like those of
donnafales.com or holygoat.co.uk are. And what if there where two slightly
different vocabularies for recipes that I both liked and that both had their
merits? Which one would I chose and what would happen to the other one?

How about the following approach:
* define a RDFa-vocabulary with exactly the same element-names as the
microformats vocabulary
* define mappings from this vocabulary to other, existing vocabularies
through OWL, eg 

    hRecipe:title owl:equivalentClass dc:title

* or, mapping from the microformat serialization of Recipe to the RDFa
serialization

    hRecipe:title owl:sameAs aRecipe:title


I think this would also reflect the higher importance of the vocabulary over
the serializations. The serializations can be easily mapped to each other,
once the technical basics are developed while the vocabularies are the hard
part to develop.  Imho it would make sense to reuse the vocabularies as much
to the letter as possible. That makes things more memorable, and easier to
identify e.g. when scanning source code.

Cheers,
Thomas 



On 10.10.08 10:33, "Toby A Inkster" <mail at tobyinkster.co.uk> wrote:

> Hi Thomas,
> 
> There is already a reasonably good RDF recipe schema:
> http://donnafales.com/2002/07/28/recipe-schema#
> 
> If you want to map hRecipe to RDFa, then the best technique would be
> to use a combination of the schema above, plus Dublin Core (for
> authorship) and then create your own vocabulary only to fill in the
> gaps which the combination of the two more established vocabularies
> couldn't cover. That would be similar to what Manu has done for his
> RDFa mapping of hAudio.
> 
> For what it's worth, I've already performed a mapping of hRecipe to
> RDF. (This is basically the way my parser, Cognition, works. All
> microformats are converted into RDF, and then RDF is converted to,
> for example, vCard or JSON or whatever. Thus, when I added support
> for hRecipe, I had to map it to RDF as part of that process.) The
> mapping I've used is:
> 
> hrecipe =>
>    http://donnafales.com/2002/07/28/recipe-schema#Recipe
> 
> recipe-title =>
>    http://purl.org/dc/terms/title
> 
> recipe-summary =>
>    http://purl.org/dc/terms/abstract
> 
> author =>
>    http://purl.org/dc/terms/creator
> 
> published =>
>    http://purl.org/dc/terms/issued
> 
> photo =>
>    http://purl.org/media#depiction
> 
> ingredient =>
>    http://donnafales.com/2002/07/28/recipe-schema#ingredient
> 
> method =>
>    http://donnafales.com/2002/07/28/recipe-schema#directions
> 
> yield =>
>    http://donnafales.com/2002/07/28/recipe-schema#x-yield
>    (Namespace squatting a bit here.)
> 
> preparation-time =>
>    http://donnafales.com/2002/07/28/recipe-schema#x-preparation-time
>    (Ditto.)
> 
> category =>
>    http://www.holygoat.co.uk/owl/redwood/0.1/tags/taggedWithTag
> 
> Within ingredients, I also map:
> 
> quantity =>
>    http://buzzword.org.uk/rdf/measure#quantity
> 
> item =>
>    http://www.w3.org/1999/02/22-rdf-syntax-ns#value
> 
> note =>
>    http://purl.org/dc/terms/abstract
> 
> optional =>
>    http://purl.org/dc/terms/abstract
> 
> How might all this be used in RDFa? Well, here's an example:
> 
> <div xmlns:r="http://donnafales.com/2002/07/28/recipe-schema#"
>       xmlns:dc="http://purl.org/dc/terms/"
>       xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>       xmlns:m="http://buzzword.org.uk/measure#"
>       typeof="r:Recipe">
> 
>    <h1 property="dc:title">Mince and Dumplings</h1>
>    <div property="dc:creator">Toby Inkster</div>
> 
>    <h2>Ingredients</h2>
> 
>    <h3>For the mince</h3>
> 
>    <ul rel="r:ingredient">
>      <li typeof="r:Ingredient">
>        <span property="m:quantity">400 g</span>
>        <span property="rdf:value">minced beed</span>
>      </li>
>      <li typeof="r:Ingredient">
>        <span property="m:quantity">1</span>
>        <span property="rdf:value">carrot</span>,
>        <span property="dc:abstract">chopped</span>
>      </li>
>      <li typeof="r:Ingredient">
>        <span property="m:quantity">1</span>
>        <span property="rdf:value">onion</span>,
>        <span property="dc:abstract">chopped</span>
>      </li>
>      <li typeof="r:Ingredient">
>        <span property="m:quantity">60 g</span>
>        <span property="rdf:value">peas</span>,
>        <span property="dc:abstract">shelled (frozen are OK)</span>
>      </li>
>      <li typeof="r:Ingredient">
>        <span property="m:quantity">500 mL</span>
>        <span property="rdf:value">ale</span>
>      </li>
>      <li typeof="r:Ingredient">
>        <span property="m:quantity">2 tbsp</span>
>        <span property="rdf:value">tomato puree</span>
>      </li>
>      <li typeof="r:Ingredient">
>        <span property="rdf:value">worcestershire sauce</span>
>        <span property="dc:abstract">to taste</span>
>      </li>
>      <li typeof="r:Ingredient">
>        <span property="rdf:value">sage</span>
>      </li>
>      <li typeof="r:Ingredient">
>        <span property="rdf:value">butter</span>
>      </li>
>    </ul>
> 
>    <h3>For the dumplings</h3>
>    <ul rel="r:ingredient">
>      <li typeof="r:Ingredient">
>        <span property="m:quantity">75 g</span>
>        <span property="rdf:value">shredded suet</span>
>      </li>
>      <li typeof="r:Ingredient">
>        <span property="m:quantity">150 g</span>
>        <span property="rdf:value">self-raising flour</span>
>      </li>
>    </ul>
> 
>    <div property="r:directions">
>      <ol>
>        <li>Preheat the oven to 190šC.</li>
>        <li>In a casserole dish, fry the onion gently
>        with a little butter.</li>
>        <li>Brown the beef in the dish.</li>
>        <li>Mix in the other mince ingredients.</li>
>        <li>Bake for 45 minutes, covered.</li>
>        <li>While the mince is baking, prepare a
>        dough from the suet, flour and a little
>        water.</li>
>        <li>Divide the dough into eight balls.</li>
>        <li>After the mince has been baking for
>        45 minutes, add the dumplings to the dish.
>        They should float like icebergs, partly
>        poking out of the mince.</li>
>        <li>Return to the oven for another 35
>        minutes - covered for 20 minutes and
>        uncovered for the last 15.</li>
>      </ol>
>    </div>
> 
>    <p>
>      <span property="r:x-preparation-time"
>> Preparation: 10 minutes</span>;
>      <span property="r:x-preparation-time"
>> Cooking: 90 minutes</span>.
>    </p>
> 
> </div>







Thomas Lörtsch
Business Development
_________________________________________________________
 

Living at Home Multi Media GmbH
Redaktion Online

Stubbenhuk 5
20459 Hamburg
Postanschrift: 20444 Hamburg

Telefon +49 (0) 40 / 37 03 - 43 14
Telefax +49 (0) 40 / 37 03 - 42 12
E-Mail  loertsch.thomas at guj.de
http://www.livingathome.de
http://www.essen-und-trinken.de
http://www.dogs-magazin.de
http://www.wiewohnstdu.de
_________________________________________________________

  Living at Home Multi Media GmbH | Sitz: Hamburg, Amtsgericht Hamburg HRB
75612 |
Geschäftsführer: Thomas Lindner, Nadja Stavenhagen | Ein Unternehmen von
Gruner + Jahr





More information about the microformats-discuss mailing list