XML structure for a recipe
recipe
name: string
citation
title: string
publisher: string
year: restricted integer (e.g., 1900-2010)
isbn: pattern with alternating digit groups and dashes
introduction: string
ingredients
ingredient+
quantity: best to use a pattern since the example shows
at least three variations, an integer, a fraction (1/4) or
a range of numbers (3-5).
measure: string (e.g., T, t, 28-oz can--you might try for an
enumerated type but it is probably difficult to enumerate all
the possibilities, such as 28-oz can)
name: string
processing?: string (e.g., drained, undrained, stemmed, etc)-might
be omitted
directions
direction+: string
comments?
comment+: string
Discussion: It is nice to have an overarching category
for ingredients, directions, and comments that group all the
elements of that group together. It makes each group seem like
a block of related data, which is what they are. It also
might make it a little
easier for a program
to retrieve those elements when using an XML parser.
I felt as though comments might be optional, but you may well have
concluded, based on the example, that comments are required.
Many of you broke citation down into either a web reference or a
published reference. That was an excellent distinction.