<stylesheet 
    xmlns="http://www.w3.org/1999/XSL/Transform" version="1.0" 
    xmlns:t="http://www.w3.org/1999/XSL/Transform" 
    xmlns:ql="http://infomesh.net/2001/05/simpsons/ql#" 
    xmlns:dc="http://purl.org/dc/elements/1.1/" 
    xmlns:h="http://www.w3.org/1999/xhtml" 
    xmlns:sbp="http://infomesh.net/2001/05/simpsons/sbp-top#" 
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" >

<!-- A neat little XSLT file for scraping RDF Semantics from XHTML files -->

<template match="/">
   <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
       <title>Simpsons: Homer Quotes</title>
       <link rel="stylesheet" type="text/css" href="http://infomesh.net/sbp/style.css" />
<!--
       <link rel="stylesheet" type="text/css" href="../../../sbp/style.css" />
-->
     </head>
     <body>
        <h1>Homer Quotes</h1>
        <t:apply-templates/>
        <p>Transformed by <a href="rdf2xhtml.xsl">my XSLT deeley</a>.</p>
        <address>
           <a href="http://purl.org/net/sbp/">Sean B. Palmer</a>
        </address>
     </body>
   </html>
</template>


<template match="/rdf:RDF/rdf:Description">
 <for-each select=".//dc:title">
   <div xmlns="http://www.w3.org/1999/xhtml">
     <h2>
      <t:value-of select="(.)" />
     </h2>
   </div>
 </for-each>

<div xmlns="http://www.w3.org/1999/xhtml">
 <ul>
   <t:for-each select=".//ql:id">
     <li><strong>Episode Number</strong>: 
      <t:value-of select="(.)" />
     </li>
   </t:for-each>
   <t:for-each select=".//ql:season">
     <li><strong>Season</strong>: 
      <t:value-of select="(.)" />
      <t:value-of select="(@rdf:resource)" /></li>
   </t:for-each>
   <t:for-each select=".//sbp:seanRating">
     <li><strong>SBP Rating</strong>: <t:value-of select="(.)" /></li>
   </t:for-each>
 </ul>
   <t:for-each select=".//ql:homerQuote">
    <div>Homer quote:</div>
     <blockquote>
      <pre style="font-family:arial;">
         <t:value-of select="(.)" />
      </pre>
      </blockquote>
   </t:for-each> 
</div>
</template>

<!-- Don't pass text through -->
<template match="text()|@*">
</template>
</stylesheet>