Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

10. Semantics > Microformats

Microformats

Microformats are a collection of community-driven specifications for conveying machine-processable information.[148] The goal of this grassroots effort is to design small document formats that can be reused by humans first and machines second. Take, for example, the chocolate cookie recipe referenced by one of the RDFa statements in Example 10-18. Using microformats, we could represent this recipe as an XHTML document containing both human- and machine-processable information, as shown in Example 10-20.

Example 10-20. A recipe in an XHTML document as a microformat
<div class="hrecipe">
  <h1 class="fn">Restbucks Chocolate Cookies</h1>
  <p class="summary">This is how you can make Restbucks chocolate cookies</p>
  <h2>Ingredients</h2>
  <ul>
     <li class="ingredient">
       <span class="value">2.25</span> <span class="type">cups</span> flour.
     </li>
     <li class="ingredient">
       <span class="value">1</span> <span class="type">teaspoon</span> baking soda.
     </li>
     <li class="ingredient">
       <span class="value">1</span> <span class="type">teaspoon</span> salt.
     </li>
     <!-- More ingredients -->
   </ul>
   <h2>Preparation instructions</h2>
   <ul class="instructions">
    <li>Preheat oven to 375° F.</li>
    <li>Combine flour, baking soda, and salt in small bowl... </li>
....

  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint