<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 xmlns:uddi="urn:uddi-org:api_v2"

xmlns:xlink="http://www.w3.org/1999/xlink"> 
  <xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes" omit-xml-declaration="yes"
      doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
      doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
     />
  <xsl:strip-space elements="books"/>

  <xsl:include href="amazon.xsl"/>
  <xsl:include href="google.xsl"/>
  <xsl:include href="uddi.xsl"/>
  <xsl:include href="wiki.xsl"/>
  <xsl:include href="foaf.xsl"/>

  <!-- Create a table of authors and titles based on the title -->
<!-- Display width (pixels) -->
<xsl:variable name="display-width" select="'700'"/>

<!-- Background color (#rgb) -->
<xsl:variable name="background-color" select="'#D0F0D0'"/>

<!-- Use table separator (yes/no) -->
<xsl:variable name="use-table-separator" select="'yes'"/>

<!-- Use record separator (yes/no) -->
<xsl:variable name="use-record-separator" select="'no'"/>

<!-- ************************************************************************************** -->
<!-- Name/Sex Table                                                                         -->
<!-- ************************************************************************************** -->

<!-- Name background color (#rgb) -->
<xsl:variable name="name-bg-color" select="'#A0D0A0'"/>

<!-- Name text style (style) -->
<xsl:variable name="name-text-style" select="'font: 10pt Verdana,Arial; font-style: bold'"/>

<!-- Table padding (value) -->
<xsl:variable name="name-padding" select="2"/>

<!-- Table spacing (value) -->
<xsl:variable name="name-spacing" select="0"/>

<!-- Table border (value) -->
<xsl:variable name="name-border" select="0"/>

<!-- Show sex (yes/no) -->
<xsl:variable name="show-sex" select="'yes'"/>

<!-- Show name suffix/title (yes/no) -->
<xsl:variable name="show-suffix" select="'yes'"/>

<!-- ************************************************************************************** -->
<!-- Events/Facts Table                                                                     -->
<!-- ************************************************************************************** -->

<!-- Event/Fact table color (#rgb) -->
<xsl:variable name="fact-table-color" select="'#D0F0D0'"/>

<!-- Text style (style) -->
<xsl:variable name="fact-text-style" select="'font: 9pt Verdana,Arial'"/>

<!-- Table padding (value) -->
<xsl:variable name="fact-padding" select="1"/>

<!-- Table spacing (value) -->
<xsl:variable name="fact-spacing" select="0"/>

<!-- Table border (value) -->
<xsl:variable name="fact-border" select="4"/>


<!-- ************************************************************************************** -->
<!-- Parent(s) Table                                                                        -->
<!-- ************************************************************************************** -->

<!-- Parents table background color (#rgb) -->
<xsl:variable name="parent-table-color" select="'#D0F0D0'"/>

<!-- Text style (style) -->
<xsl:variable name="parent-text-style" select="'font: 9pt Verdana,Arial'"/>

<!-- Table padding (value) -->
<xsl:variable name="parent-padding" select="1"/>

<!-- Table spacing (value) -->
<xsl:variable name="parent-spacing" select="0"/>

<!-- Table border (value) -->
<xsl:variable name="parent-border" select="0"/>

<!-- ************************************************************************************** -->
<!-- Family Table                                                                           -->
<!-- ************************************************************************************** -->

<!-- Family table background color (#rgb) -->
<xsl:variable name="family-table-color" select="'#D0F0D0'"/>

<!-- Text style (style) -->
<xsl:variable name="family-text-style" select="'font: 9pt Verdana,Arial'"/>

<!-- Table padding (value) -->
<xsl:variable name="family-padding" select="1"/>

<!-- Table spacing (value) -->
<xsl:variable name="family-spacing" select="0"/>

<!-- Table border (value) -->
<xsl:variable name="family-border" select="3"/>

  <xsl:template match="/">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
      <head>
   
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 2007 08:21:57 GMT"/>

        <style>
          .title { float:left; text-align:center; border:1px solid black; margin: 1em; padding: 1em; width: 12em; background-color:#eee } 
          .title p { text-align:center }
        </style>

 <xsl:call-template name="get-wiki-head"><xsl:with-param name="title" select="."/></xsl:call-template>
 <base href="http://twiki.org/cgi-bin/view/Main/JohnCoe" />
      </head>
      <body>
         <a name="PageTop"></a>
         <xsl:call-template name="get-wiki"><xsl:with-param name="title" select="."/>
      </xsl:call-template>
        <xsl:apply-templates/>
 <!-- Get the svg of the title 
<embed src="planet.svg" width="350" height="176" type="image/svg+xml" name="emap">

   <svg xmlns="http://www.w3.org/2000/svg"
     xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/2.0/" 
     xmlns:xsl="http://www.w3.org/TR/WD-xsl"
     ondomsubtreemodified="feedback()" onLoad="initdrag(evt)"
     viewBox = "-500 -500 1000 1000">
 xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
  a:ascriptImplementation="Adobe" onzoom="zoom()" onscroll="zoom()">
<title>foafnaut</title>
<desc>
 foafnaut is a tool for visualising foaf RDF data, </desc>
<style type="text/css">
#aboutbox tspan { font-family:'TrebuchetMS';font-size:10; }
text { font-family:'TrebuchetMS';font-size:10; }
</style>

<script type="text/ecmascript" a:ascriptImplementation="Adobe" xlink:href="http://blub.org/foafnaut.org/foafnaut.templates.js"/><script xlink:href="http://blub.org/foafnaut.org/sha1.js"/>

</svg>
  
</embed>    
-->
        <a name="PageBottom"></a>
      </body>
    </html>
  </xsl:template>

  <!-- Matches a <title> element in the input document -->
<xsl:template match="title">
   <xsl:element name="table">
         <xsl:attribute name="border">2</xsl:attribute>
        <xsl:attribute name="width"><xsl:value-of select="$display-width"/></xsl:attribute>
        <xsl:attribute name="cellpadding"><xsl:value-of select="$family-padding"/></xsl:attribute>
        <xsl:attribute name="cellspacing"><xsl:value-of select="$family-spacing"/></xsl:attribute>
        <xsl:attribute name="border"><xsl:value-of select="$family-border"/></xsl:attribute>
        <xsl:attribute name="bgcolor"><xsl:value-of select="$family-table-color"/></xsl:attribute>

 <xsl:call-template name="get-uddi"><xsl:with-param name="title" select="."/>
      </xsl:call-template>
   
   
<TR><TD>  
      <a href="http://validator.w3.org/check/referer">
         <img  src="http://www.w3.org/Icons/valid-xhtml10"
          alt="Valid XHTML 1.0!" height="31" width="88" /></a>
   
    <!-- Get the author of the title -->
    <xsl:variable name="author">
      <xsl:call-template name="get-author">
        <xsl:with-param name="title" select="."/>
      </xsl:call-template>
    </xsl:variable>
   
     <!-- Get the rdf appended search string-->
    <xsl:variable name="rdf">
        <xsl:value-of select="."/> rdf:RDF
      
    </xsl:variable>
    <!-- Get an image of the book -->    
    <xsl:variable name="image">
      <xsl:call-template name="get-image">
        <xsl:with-param name="title" select="."/>
      </xsl:call-template>
    </xsl:variable>
   </TD><TD>
    <!-- Get a url based on the title -->
    <xsl:variable name="url">
      <xsl:call-template name="feeling-lucky">
        <xsl:with-param name="search-term" select="."/>
      </xsl:call-template>
    </xsl:variable>
    </TD><TD>
    <!-- Get a url based on the author's name$author -->
    <xsl:variable name="urlA">
      <xsl:call-template name="feeling-lucky">
        <xsl:with-param name="search-term" select="$author "/>
      </xsl:call-template>
    </xsl:variable>

    <!-- Display the author name and link -->
    
      <p>
        <img>
          <xsl:attribute name="src">
            <xsl:value-of select="$image"/>
          </xsl:attribute>
        </img>
      </p>
     </TD><TD>
      <p>
        <td> <a> <xsl:attribute name="title">
                        <xsl:value-of select="$urlA"/></xsl:attribute>
          <xsl:attribute name="href">
            <xsl:value-of select="$url"/>
          </xsl:attribute>
          <xsl:value-of select="."/>

        </a></td>
      </p>
      </TD><TD>
      <p>
        <a><xsl:attribute name="title">
                        <xsl:value-of select="$url"/></xsl:attribute>
          <xsl:attribute name="href">
            <xsl:value-of select="$url"/>
          </xsl:attribute>
          <xsl:value-of select="$author"/>
        </a>
      </p><table><tr><td>
     <xsl:call-template name="six-pack">
        <xsl:with-param name="search-term" select="."/>
      </xsl:call-template>
       </td>
       <td>
     <xsl:call-template name="six-pack-plus">
        <xsl:with-param name="search-term" select="$rdf"/>
      </xsl:call-template>
       </td>
       </tr>
      </table>
 
</TD></TR>
    </xsl:element>
  </xsl:template>



</xsl:stylesheet>

