RDF and recipes

Hello everyone,

My name is Aaron and a while back I wrote myself an XML application for
describing recipes, meal courses and menus:

 http://www.eatrinkfeelgood.org

The DTD is not, as far as I know, RDF-friendly though I have been
considering making it so.

To be frank, I have doubts about the actual viability of RDF outside of a
limited set of applications. But I can imagine my recipe DTD might be one
of them so I'd like to spend a little more time investigating what changes
are necessary to make my thingy play nicely with all the other RDF
thingies.

I have two basic questions. One is straightforward, the other not so much.

1) I read once that the RDF/XML spec would not allow for the use of
XInclude data. Is this true? Has it been corrected?

2) This question essentially boils down to: where does the data stop and
the meta-data begin?

I have included (below) snippets from a conversation I had with Karl
Dubost on the subject which goes on to ask some basic technical questions
about one actually uses RDF.

Any input would be very much appreciated. Thanks,

---

Anyway, humour me and tell me which part of the following is data and
which part is meta-data:

 <ing>
  <amount>
   <quantity><n type = "int" value = "1" /></quantity>
   <measure>
    <unit content = "teaspoon" />
   </measure>
  </amount>
  <item>vanilla extract</item>
 </ing>

On Wed, 9 Apr 2003, Karl Dubost wrote:

> If you look at it for the cooking aspect and only in this abstract.
>
>       + type of ingredient is an interesting data
>       in this case the type of ingredient has for value "Vanilla"
>
> Because for example I want a meal tonight with the flavour of Vanilla.

But the flavour of vanilla isn't vanilla extract, nor is vanilla extract
vanilla. And it's unclear why I should include that kind of meta-data in a
recipe.

This presumably is where we start getting into the high weirdness
surrounding RDF classes?

I can imagine how to express this using an OOP (perl) model but I have no
idea how you're supposed to do it in RDF and what you're actually supposed
to include in the data-file itself...

package Vanilla;

sub taste { "smooth"; }
sub form  { "solid" }

package Vanilla::Extract;
use base qw (Vanilla);

sub form { "liquid" }

---------- Forwarded message ----------
Date: Wed, 9 Apr 2003 13:17:41 -0400 (EDT)
From: Aaron Straup Cope <asc@vineyard.net>
To: Karl Dubost
Subject: Re: FYI: RDF and resto

On Wed, 9 Apr 2003, Aaron Straup Cope wrote:

> I can imagine how to express this using an OOP (perl) model but I have no
> idea how you're supposed to do it in RDF and what you're actually supposed
> to include in the data-file itself...

I gather it would be something like this...

   <rdfs:Class rdf:ID="Food">
     <rdfs:comment>Generic Food Class</rdfs:comment>
     <rdfs:subClassOf rdf:resource=
           "http://www.w3.org/1999/02/22-rdf-syntax-ns#Resource"/>
   </rdfs:Class>

   <rdfs:Class rdf:ID="Vanilla">
     <rdfs:comment>Vanilla Class</rdfs:comment>
     <rdfs:subClassOf rdf:resource="#Food"/>
   </rdfs:Class>

   <rdfs:Class rdf:ID="Vanilla_extract">
     <rdfs:comment>Vanilla extract Class</rdfs:comment>
     <rdfs:subClassOf rdf:resource="#Vanilla"/>
   </rdfs:Class>

   <rdf:Property rdf:ID="form">
      <rdfs:comment>The physical characteristics of a food item</rdfs:comment>
      <rdfs:domain rdf:resource="#Food"/>
      <rdfs:range rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Literal"/>
   </rdf:Property>

   <rdf:Description ID="solid">
    <rdf:type resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"/>
    <rdfs:subPropertyOf rdf:resource="#form"/>
   </rdf:Description>

   <rdf:Description ID="liquid">
    <rdf:type resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"/>
    <rdfs:subPropertyOf rdf:resource="#form"/>
   </rdf:Description>

...but it's unclear how I would write (in rdf-friendly XML) :

  <item>vanilla extract</item>

or even :

  the <form> of <vanilla extract> is <liquid>

or whether 'solid' and 'liquid' should be classes or descriptions and
whether one has any impact on multiple inheritance (multiple instances of
'subClassOf')

Never mind how much other verbiage I would need to define this particular
liquid as being "wet"; it is arguable that mercury isn't exactly wet
despite it's liquidity. [ed: not to mention financial liquidity]

Received on Monday, 28 April 2003 08:22:45 UTC