<?xml version='1.0' encoding='utf-8'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
		xmlns:xxv="http://staticfree.info/ns/site#" 
		xmlns:xhtml="http://www.w3.org/1999/xhtml" 
		xmlns="http://www.w3.org/1999/xhtml" 
		version="1.0"
		exclude-result-prefixes="xxv xhtml">

<xsl:output indent="yes" method="xml" 
	      media-type="application/xhtml+xml"
              omit-xml-declaration="no" encoding="utf-8"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
doctype-system="/xhtml1-strict.dtd" />


<!-- <xsl:namespace-alias stylesheet-prefix="xhtml" result-prefix="#default"/> -->


  <xsl:template match="xhtml:html">
    <html lang="en">
      <xsl:apply-templates select="*"/>
    </html>
  </xsl:template>


  <xsl:template match="xhtml:head">
	<head>	
    <link href="/xxv_32x32.png" type="image/png" rel="icon" />

    <!-- special links -->
    <link rel="meta" type="application/rdf+xml" title="FOAF" 
	  href="/steve/foaf.rdf" />

<!--    <link rel="meta" title="generic"/> -->
    <!-- stylesheets -->
    <link rel="stylesheet" type="text/css" media="screen" 
	  href="/css/basicstyle.css" />

    <link rel="stylesheet" type="text/css" media="screen"
	  href="/css/notebook/main.css" title="notebook" />

    <!-- special purpose stylesheets -->
    <link rel="stylesheet" type="text/css" media="print"
	  href="/css/print.css" />
    <link rel="stylesheet" type="text/css" media="handheld"
	  href="/css/handheld.css" />

    <!-- alternate stylesheets -->
    <link rel="alternate stylesheet" type="text/css" media="screen" 
	  href="/css/sprig/main.css" title="sprig" />

    <link rel="alternate stylesheet" type="text/css" media="screen"
	  href="/css/flat/main.css" title="Flat" />
    <link rel="alternate stylesheet" type="text/css" media="screen"
	  href="/css/midnight/main.css" title="Midnight" />
<!--     <link rel="alternate stylesheet" type="text/css" media="screen" -->
<!-- 	  href="/css/blue.css" title="Blue" /> -->

    <xsl:apply-templates select="*"/>
	</head>
  </xsl:template>

<xsl:template match="xhtml:h1">
    <div class="nav" id="navvy">
      <ul>
	<li class="nav-back"><a title="back a directory" href="../">../</a></li><xsl:text> </xsl:text>
<li class="nav-projects"><a title="Projects I've designed or implemented" href="/projects/">Projects</a></li><xsl:text> </xsl:text>
	<li class="nav-software"><a title="Software and such that I've written" href="/software/">Software</a></li><xsl:text> </xsl:text>
	<li class="nav-about"><a title="About the author" href="/steve/">About Me</a></li><xsl:text> </xsl:text>
	<li class="nav-blog"><a title="my 'blog" href="/blog/">Blog</a></li><xsl:text> </xsl:text>
	<li class="nav-photos"><a title="Photos of people and things" href="http://photos.staticfree.info/">Photos</a></li><xsl:text> </xsl:text>
	<li class="nav-people"><a title="Links to my friends' pages" href="/people/">People</a></li><xsl:text> </xsl:text>
	<li class="nav-graphics"><a title="Miscellaneous graphics that I've found or made" href="/graphics/">Graphics</a></li><xsl:text> </xsl:text>

      </ul>
      <div class='alt-formats'>
      <div class='alt-format'><a rel='nofollow' href="?format=txt"><img src="/icon/stock_task.png" alt="plain text rendering" title="plain text rendering" /></a></div>
      <div class='alt-format'><a rel='nofollow' href="?format=xml"><img src="/icon/stock_autopilot.png" alt="view document source" title="view document source" /></a></div>
      <div class='alt-format'><a rel='nofollow' href="?format=jqs5#s0"><img src="/icon/stock-slide-show.png" alt="javascript slideshow of this page" title="Javascript slideshow of this page" /></a></div>
  </div>
    </div>
  <xsl:copy-of select="."/>
</xsl:template>

<xsl:template match="xhtml:body">
  <xsl:copy>
    <xsl:apply-templates select="@*"/>
    <div id="body-outer">
      <div id="body-inner">
	<xsl:apply-templates select="node()"/>
      </div>
    </div>
  </xsl:copy>
</xsl:template>


<xsl:template match="xxv:status">
 <xsl:apply-templates select="document('http://staticfree.info/physstat')"/>
</xsl:template>

<xsl:template match="xxv:todo">
<!-- #include virtual="/perl/todo?cat=Pile%20o'%20Books;plain=1;max_priority=1;list=1;crop=t3" -->
<!--<xsl:variable name="callurl" >http://staticfree.info/perl/todo?<xsl:if 
test="@category">cat=<xsl:value-of select="@category"/>;</xsl:if>plain=1;list=1;<xsl:if test="@min_priority">min_priority=<xsl:value-of select="@min_priority"/>;</xsl:if><xsl:if test="@max_priority">max_priority=<xsl:value-of select="@max_priority"/>;</xsl:if><xsl:if test="@crop">crop=<xsl:value-of select="@crop"/>;</xsl:if></xsl:variable>
-->
<!--  <xsl:apply-templates select="document($callurl)"/>-->

</xsl:template>

<xsl:template match="@*|node()">
  <xsl:copy>
    <xsl:apply-templates select="@*|node()"/>
  </xsl:copy>
</xsl:template>

</xsl:stylesheet>

