December 30, 2004

Recipe Markup Language

At a recent extended family dinner, we discussed creating a family cookbook. We have, for my lifetime and likely before, eaten traditional Swedish food (read: 19th century immigrant food) for Christmas Eve dinner, and there was some desire to make sure we had the recipes for this meal safe and secure. So, we're planning on gethering these reciepes and other favorites into a little family cookbook.

Naturally, being the info geek that I am, I'm thinking I'll store the recipe data in XML, and transform to HTML for web and PDF (or maybe RDF) for printing purposes.

And, being the info geek that I am, my first move was to see what others have done in the area of marking up recipes. Why duplicate the work of designing a schema, or even the supporting tools? And, if there are standards, I'd want to make sure I could interoperate with other services (although, I doubt many would want my uncle's pickled herring recipe).

So, off to Google I went...

It turns out that there are quite a number of competing (?) XML recipe formats out there. This is in part because this is not a very hard problem to solve. In fact, the problem is often used as an example in books or classes that teach XML.

Here's a rundown of the formats I found:

  • RecipeML looks like the most official of the bunch. But, it is at version .5, and hasn't been updated in a few years. This doesn't mean it isn't worth using, but it is a bit odd. The language seems fairly straightforward and fairly complete. Clearly a front-runner.
  • The awkwardly-named eatdrinkfeelgood looks to be an offshoot of RecipeML (according to this post). At first glance of one of the examples, it seems more verbose than RecipeML. EDFG has a number of good examples, plus a DTD, a number of XSLT files, and a mess of perl tools. I didn't see anything on licensing. Another well-done example.
  • While EDFG and RecipeML have a bunch of supporting material, our next contender is pretty simple: RCP: Recipe Classification Protocol. This entry comes to us from CSS/HTML guru Dan Cederholm. It's main virtue is that it is quite simple. Dan says that he is "half kidding, but conversely, half serious" about formalizing it. I think he ended up writing a book instead. Regardless, I rather like it.
  • The final entry was found on Joel's Virtual Desktop. It's another straightforward one. Not much to say, I guess.

So, which one will I use? I don't know yet...I probably won't figure it out until I actually start working on this project. A part of me just wants to slap together my own format, thus allowing me to do pretty much whatever I want. Another part says that it makes sense to build on someone else's work, especially if there are pre-existing tools. Of course, I could always extend an existing format (with namespaces!) or build an application profile. We'll see...