You are here: FormatData > Products > RecipeML > Users' Forum Archive
 
RecipeML logo: chef's hat with angle bracket characters on it RecipeMLTM
 

Users' Forum Archive


I have been looking at the DTD and I am looking forward to some documentation. I've been doing XML for some time now and I've even taken a crack at writing my own Recipe vocabulary. I am wondering if you have taken into consideration some of the following:

--Often there will be alternate lists of ingredients. A good example would be a recipe my Mother has for cream soups where there ten or so vegetable/spice combinations that can be chosen. I understand that this is also common with cassarole recipes.

--One of the nice things about a recipe is that it doesn't have to describe food only. It would be worth while, IMHO, to abstract the idea of an ingredient somewhat. This would make it more intuitive to use the Markup Language for crafts.

--In some recipes, particularly complex ones, it is useful to break up the recipe into parts. For instance, if my pie recipe includes the pastry, I'm going to want to have a pastry section and a filling section. With a pie, though, it is probably best to have an ingredient that refers to another recipe since pastry recipes tend to get used in many places. However, with my mother's cream soup recipe, there are 3 distinct sections, the stock (which includes a sub section that is the vegetable/spice combinations) and the white sauce. Each has its own segement. Also having sections to a recipe (each of which could have its own head, description, ingredients and steps) could be extended to a menu. Some menus are fairly simple, but if its a menu for a party, there will be the cocktail section, the h'ors d'oevres section, the main course section, the desert section, ....

--You don't seem to include any thought regarding linking a recipe to one or more catalogues. The solution to this may be as simple as making a non-normative statement to the effect that tools and ingredients should include an ID to facilitate this. Given that you would not want to link a single recipe to a single catalogue or that I may recieve your recipe and want to add refrences to my own catalogue, it would probably be benificial to make a non-normative statement to the effect that an external XLink document should be used to make such a link. Appropriate examples should be provided in documentation since extended XLinks are a bit of a trick conseptually.

--Along similar lines, it would probably be a good idea to explicitly allow simple XLinks inline with brandnames for obvious reasons.

--It would also be nice to include tags for such things as images, perhaps for each step. Or links to video or audio assets. A good way to do this is to allow most of the major elements to include foriegnobject tags. The idea comes from SVG where, instead of including support for audio, video, xhtml, they include a foreignobject tag (cf SVG Spec - ForeignObject Element ) that specifies a region of a drawing for with the rendering of the content is passed over to the appropriate useragent. This allows data from a different namespace to be handled elegantly since they need to be positioned. A similar could be used here indicating a continuous section that needs to be treated differently.

You may also want to make explicit (normative) statements regarding the use of additional namespaces as the way to extend the spec in a proprietary way, since this is how the W3 allows for such things. In fact, I belive that adherence to the W3 standard allows me to refer to any namespace without necessarily creating a full document for that namespace (say all i want is to use the mtable from MathML).

Just some thoughts.

Adam van den Hoven
VP Developemnt, Juggling Octopus
mailto:adam@jugglingoctopus.com

Adam,

I have been looking at the DTD and I am looking forward to some documentation.

First of all, I want to appologize for the delay in finishing the documentation; it might have helped answer some of your questions! I'm working on the spec document as fast as I can. Hang in there.

--In some recipes, particularly complex ones, it is useful to break up the recipe into parts. For instance, if my pie recipe includes the pastry, I'm going to want to have a pastry section and a filling section.

This feature is already in there. You would use the <ing-div> and <dir-div> elements. Here's how:

<ingredients>
  <ing-div type="titled">
  <title>Pastry</title>
  . . .
  </ing-div>
  <ing-div type="titled">
  <title>Filling</title>
  . . .
  </ing-div>
</ingredients>

and for the procedure:

<directions>
  <dir-div type="titled">
  <title>Pastry</title>
  . . .
  </dir-div>
  <dir-div type="titled">
  <title>Filling</title>
  . . .
  </dir-div>
</directions>

Also having sections to a recipe (each of which could have its own head, description, ingredients and steps) could be extended to a menu. Some menus are fairly simple, but if its a menu for a party, there will be the cocktail section, the h'ors d'oevres section, the main course section, the desert section, ....

Interesting thought. Right now the <menu> element just allows you to list one recipe after another. I suppose a feature similar to the <ing-div> type of element, maybe <menu-div> could allow you to set up arbitrary groups of recipes in the menu. I have a feeling that the <menu> element won't see a lot of use anyway (I could be wrong) but adding this feature will make it more functional.

With a pie, though, it is probably best to have an ingredient that refers to another recipe since pastry recipes tend to get used in many places.

--You don't seem to include any thought regarding linking a recipe to one or more catalogues. ... make a non-normative statement to the effect that an external XLink document should be used to make such a link.

--Along similar lines, it would probably be a good idea to explicitly allow simple XLinks inline with brandnames for obvious reasons.

--It would also be nice to include tags for such things as images, perhaps for each step. Or links to video or audio assets.

All of these would (or may) require implementing XLink in RecipeML, which was next on my agenda after publishing version 0.5. Now that XLink has settled into a W3C Reccomendation, we can start to add these features. Any suggested syntax for new or updated elements and attribues will be welcome. Let's start working on it.

You may also want to make explicit (normative) statements regarding the use of additional namespaces as the way to extend the spec in a proprietary way, since this is how the W3 allows for such things. In fact, I belive that adherence to the W3 standard allows me to refer to any namespace without necessarily creating a full document for that namespace (say all i want is to use the mtable from MathML).

Right. In fact, I thought about using MathML for the <frac> element, but it seemed to be overkill, so I just added it to RecipeML. (Speaking of fractions, see the reply to your next post.) Likewise, I expect to see RecipeML recipes embedded in other documents, such as in a cookbook written in DocBook, or pasting a recipe into an OpenOffice XML word processing document. I'll add some language to the spec about the use of namespaces. We'll just have to figure out the pollicy; in other words, will all compliant RecipeML processing systems be required to handle namespaces, or can they be ignored?

--One of the nice things about a recipe is that it doesn't have to describe food only. It would be worth while, IMHO, to abstract the idea of an ingredient somewhat. This would make it more intuitive to use the Markup Language for crafts.

Yes, I've noticed that, for instance, certain sewing patterns are set up in a ingredients-directions style. Have you thought of any particular changes that would need to be made to the <ing> element to support this?

-Jim

 

I've had some more thoughts.

One of the more trying things to do with a recipe is converting from one system to the next. It seems to me that it would be useful to require the units used to be one of an enumerated list (or as an IDREF to a list of units, or a link to an external source... this sort of thing is done with NewsML . In addition by having a value attribute that must be a float (this is a schema thing). We can separate the value of measurement from the representation (many people are going to want to use 1/3 or some localized equivilant) allowing us to make well defined conversions from one system of measurement to another.

Another thing to add might be an estimated weight of a counted ingredient. For instance, the recipe calls for 2 small potatoes. Well, that is about 1/4 lb. My online grocer will only sell me potatoes by the lb since (that is how he is billed) by allowing for an estimated measurement, I can easily make that transition from the 2 potatoes I need in the recipe to the 1/4 lb that gets sent to me.

Adam

More thoughts...

One of the more trying things to do with a recipe is converting from one system to the next. It seems to me that it would be useful to require the units used to be one of an enumerated list (or as an IDREF to a list of units, or a link to an external source... this sort of thing is done with NewsML .

This is another feature on the list of additions. We'll have to come up with a standard, *comprehensive* set of measurements and then a standard way to represent them; i.e., should we spell out the names in English ("Tablespoon") or pick an abbreviation ("tbsp")? This is something that I'd feel a lot more comfortable about if a representative industry group worked on this before it gets added to the spec. Does anybody know of a system like this already set up, for instance in another e-commerce system?

In addition by having a value attribute that must be a float (this is a schema thing). We can separate the value of measurement from the representation (many people are going to want to use 1/3 or some localized equivilant) allowing us to make well defined conversions from one system of measurement to another.

So, values might be represented like this:

<qty value="1.5">1<frac><n>1</n><d>2</d></frac></qty>
<qty value="0.333333"><frac><n>1</n><d>3</d></frac></qty>

There will have to be a fixed precision (number of digits) for repeating decimals. And you're right, we can't specifiy this in the DTD, but would be able to in W3C XML Schema. (Once we get the DTD to version 1.0, we will convert it to other schema languages.)

Another thing to add might be an estimated weight of a counted ingredient. For instance, the recipe calls for 2 small potatoes. Well, that is about 1/4 lb. My online grocer will only sell me potatoes by the lb since (that is how he is billed) by allowing for an estimated measurement, I can easily make that transition from the 2 potatoes I need in the recipe to the 1/4 lb that gets sent to me.

Ok. If we have:

<ing><amt><qty>2</qty><size>small</size></amt><item>potatoes</item></ing>

we could have (adding new attributes):

... <amt estValue="0.25" estUnit="lb"> ...

(the estUnit value would be from the standardized set, so "weight" would be implied.)
Or, using the "variation" attribute already on the <amt> element:

<ing>
  <amt><qty>2</qty><size>small</size></amt>
  <amt variation="weight">
    <qty><frac><n>1</n><d>4</d></frac></qty><unit unit="lb">lbs</unit>
  </amt>
  <item>potatoes</item>
</ing>

which, depending on style sheet, might appear like this:

  • 2 small (1/4 lbs) potatoes

or with a more clever style sheet:

  • 2 small potatoes (about 1/4 lbs)

I'm not sure what values should go in the variation attribute yet (I left it open in the DTD), but it should act as a clue to the system that sends the data to your online grocer.

-Jim

 

Hiya,

I'm starting to mark up some recipes in RecipeML & I've a bunch of questions about it (that I'll try to get into a coherent form before I ask).

So, I'd like to know: is there a mailing list for RecipeML users?

If not, would there be any support for starting one? I can provide the resources if necessary - I much prefer e-mail to these web boards; it doesn't rely heavily on cookies, doesn't have annoying pop-up ads, doesn't screw up the formatting of my messages, and doesn't constantly trash them so I end up typing the same thing three times - plus it doesn't force me to type into a tiny little box!

It's *really* slow too

cheers,

Rob
mailto:rml@boymonkey.com

Rob,

Sorry about the conditions of the forum. We're operating on a *limited* budget, (we're not a non-profit, but more of a *no* profit) so this subsidised forum is what we've had to work with.

As for a mailing list; you're not the first to request it, and in fact, most of the input I receive does come via e-mail. If you could give me some details under which you could provide the mailing list, we may be able to take you up on it. It would be greatly appreciated.

Thanks,
Jim

P.S. Everybody: I'm still working on that spec document. Don't give up hope yet! Thanks for all the encouragement.

 

The answer to question "How can I propose changes to the DTD?" contains a link to this forum where the URL still contains "dessert" instead of "recipeml". That might confuse some users.

Best regards

Roland
( mango314 )

 

recipeml.dtd states:

Shouldn't that be "recipe+" to allow more than one recipe per file? I (http://mango.sourceforge.net/, to be more precise ) would very much like to store cookbooks (= collections of recipes) into one file.

Other than that I like the RecipeML DTD very much.

( mango314 )

 

Has anyone created a class diagram to represent the dtd? This would be a good quick reference and help clarify the dtd until the documentation is ready.

Also, are there any converters to/from RecipeML? I'm mostly familiar and interested in MealMaster files.

( ColoScott )

Well, converting *from* RecipeML to MealMaster shouldn't be that much of a problem. All you need is an XML parser. The other way around is a bit more complicated as even though MealMaster is widely used, it is not really a well defined format...

( mango314 )

 

I would deem it useful to add a "title" or "name" attribute to the recipeml node.

That would allow to store a collection of similar recipes in one recipeml file with a useful name ("cakes", "fish dishes", et cetera) associated with them.

( mango314 )

 

I'm a newbie at XML so my questions may seem a bit obvious.

- I have been working with a client to define a possible online recipe section for his site. I found RecipeML after doing some preliminary research and have been very pleased to see that pretty much everything we could think of has been addressed (or will be).

Once area my client wanted to make sure he had data on was the geography and possibly history of the recipe. Would one use 'catagories' for this?

- It strikes me that RecipeML could also act as a 'FoodML' for manufacturers, etc. Obviously the preparation would not necessarily be used but the 'ingredients' and the nutritional information would be useful. I think RecipeML could extend beyond managing cooking recipes.

- I don't see why RecipeML couldn't be used for drink recipes too? Bartending software and such could use this scheme, no?

- Is there a unique ID for a recipe? I'm not sure how this would work, though. One of the client's requirements is that he be able to reference other recipes (i.e. many pie recipes may reference the same crust recipe). Is this something the software itself would have to manage?

- I am just starting to ramp-up on XML and have a long way to go. Is there some way to see an example of this scheme used in it's entirety? The cookie example on the site is a good start but there is so much more to RecipeML that maybe a more detailed recipe could be posted?

Anyway, thanks for leading this. I hope I can have some solid contributions in the future.

Cheers

( JimmyLats )
mailto:jim_latimer@hotmail.com

© 2001 FormatData

Last updated: 30 June 2001