Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Example 4: Recipes - Page 6

December 19, 2002

This example (recipes01.xml) defines a document that will contain one or more recipes. This sample document shows one recipe:

<?xml version="1.0" ?>
<content type="nonfiction" subtype="recipes">
  <title>Guide to Spicy Cooking - Online Edition</title>

  <authors>
    <author>
      <fname>mookie</fname>
      <mname/>
      <lname>mouse</lname>
    </author>
</authors>

<page/>

<body>
  <recipes>
    <recipe title="Savoury Curry Minced Lamb" categ="">

      <ingredients>
        <item num="1">
          <ingred>Olive oil</ingred>
          <quantity units="tbsp">2</quantity>
          <notes></notes>
        </item>

        <item num="2">
          <ingred>Curry powder</ingred>
          <quantity units="tbsp">2-3</quantity>
          <notes></notes>
        </item>

        <item num="3">
          <ingred>Haldi (turmeric)</ingred>
          <quantity units="tbsp">2</quantity>
          <notes></notes>
        </item>

        <item num="4">
          <ingred>Ginger powder</ingred>
          <quantity units="tbsp">1</quantity>
          <notes></notes>
        </item>

        <item num="5">
          <ingred>Ground lamb, thawed</ingred>
          <quantity units="oz">16</quantity>
          <notes>(or subst. beef, chicken or turkey)</notes>
        </item>

        <item num="6">
          <ingred>Mushrooms, sliced</ingred>
          <quantity units="">3 med</quantity>
          <notes></notes>
        </item>
        <item num="7">
          <ingred>Large calamata olives, quartered</ingred>
          <quantity units="">4-6</quantity>
          <notes>optional</notes>
        </item>
        
        <item num="8">
          <ingred>Scallions (green onion)</ingred>
          <quantity units="">5-6</quantity>
          <notes>sliced - white portion only</notes>
        </item>
        
        <item num="9">
          <ingred>Tomato sauce</ingred>
          <quantity units="cups">1/2</quantity>
          <notes>Dilute with 1/2 cup water or substitute with
            1 cup of tomato or vegetable juice.</notes>
        </item>
        
        <item num="10">
          <ingred>Cooked rice</ingred>
          <quantity units="cups">4</quantity>
          <notes>or one cup per person</notes>
        </item>
        
        </ingredients>
        
        <instructions>
          <step num="1">Heat olive oil in skillet at med-high (8)
            heat.</step>
          <step num="2">Add dry spices (curry powder, turmeric, ginger
            powder) and roast for less than 30 seconds. Keep
            an eye out, as these spices will burn fairly
            quickly.</step>
          <step num="3">Add thawed or fresh ground meat and break up with
            spatula or chopsticks.</step>
          <step num="4">When meat has nearly browned, add sliced
            mushrooms. Toss with a spatula.</step>
          <step num="5">If desired, add quartered olives now.</step>
          <step num="6">Add tomato sauce and water, or tomato juice or
            vegetable juice. Simmer for 10 minutes.</step>
          <step num="7">Remove from stove; add sliced scallions.</step>
        </instructions>
        
        <serving>
          <suggestion>
            Serve on steamed rice, with slices of mango or watermelon.
          </suggestion>
          <serves>Serves 4-6 as a main dish, 8-10 as an appetizer.
          </serves>
        </serving>
      
      </recipe>
    </recipes>
  </body>
</content>

More recipes can be added later using something like the following:

<?selectdoc type="nonfiction" subtype="recipes" 
  title="Guide to Spicy Cooking - Online Edition" ?>
<recipe title="Peace and Harmony">
...
</recipe>

The application component that handles recipes would have some scheme for adding <recipe>...</recipe> blocks to the current document, for example, alphabetically by title or by category of the dish, if such information is included in each recipe. However, at this point, we could order the output in any way we want.

Example 2: Online Manual - Page 5
Professional PHP4 Web Development Solutions
Example 5: Fiction – Short Story Fragment - Page 7


Up to => Home / Authoring / Languages / PHP / WebDevSolutions




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers