<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output method="xml" encoding="utf-8" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" indent="yes"/>
  <xsl:template match="xbel">
    <html xmlns="http://www.w3.org/1999/xhtml">
      <head profile="http://a9.com/-/spec/opensearch/1.1/">
        <script type="text/javascript" src="bookmarks.js"/>
        <style type="text/css">
					div.bookmarks div {
						margin-left: 1.25em;
					}
					span, a:link, a:visited {
						cursor: pointer;
					}
				</style>
        <title>Andre's Bookmarks - MasellaSphere</title>
        <link rel="stylesheet" type="text/css" href="/main.css"/>
        <link rel="openid.server" href="http://www.masella.name/id/"/>
        <link rel="openid.delegate" href="http://www.masella.name/id/"/>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <link rel="alternate" type="application/atom+xml" title="Blog (Andre's Insanity)" href="/blog/index.atom"/>
        <link rel="search" type="application/opensearchdescription+xml" href="http://www.masella.name/search.xml" title="MasellaSphere Search"/>
        <link rel="alternate" type="application/atom+xml" title="Site Updates" href="/index.atom"/>
        <link rel="icon" type="image/png" href="icon-mini.png"/>
        <link rel="Shortcut Icon" type="image/png" href="icon-mini.png"/>
        <link rel="image_src" type="image/png" href="http://www.masella.name/avatar.png"/>
        <script type="text/javascript" src="/main.js"/>
        <script type="text/javascript">
					setComment(false);
				</script>
      </head>
      <body>
        <div class="menu">
          <span class="menu">Me Things</span>
          <a href="/ego/" class="menu" title="Ahh...the ego and vanity."><img alt="" src="/ego/icon.png"/>About Me</a>
          <a href="/blog/" class="menu" title="A blog about my insane projects."><img alt="" src="/blog/icon.png"/>Andre's Insanity (Blog)</a>
          <a href="/contact/" class="menu" title="E-Mail addresses, IM addresses and PGP keys."><img alt="" src="/contact/icon.png"/>Contact</a>
          <a href="/resume/" class="menu" title="My résumé in PDF and text format with the LaTeX package I wrote to create it."><img alt="" src="/resume/icon.png"/>Résumé</a>
          <hr/>
          <span class="menu">Things Here</span>
          <a href="/canonical.html" class="menu" title="Pages that I have decided to flag for some reason."><img alt="" src="/canonical.png"/>Note-worthy Pages</a>
          <a href="/ramblings/" class="menu" title="My insanity."><img alt="" src="/ramblings/icon.png"/>Ramblings</a>
          <a href="/technical/" class="menu" title="My insanity involving something electrical or mechanical."><img alt="" src="/technical/icon.png"/>Projects and Ideas</a>
          <a href="/quotes/" class="menu" title="Stuff from other people."><img alt="" src="/quotes/icon.png"/>Quotations</a>
          <a href="/applications/" class="menu" title="Applications running from this server."><img alt="" src="/applications/icon.png"/>Applications</a>
          <hr/>
          <span class="menu">Things Elsewhere</span>
          <a href="http://www.google.com/profiles/andre.p.masella" class="menu" title="Because Google knows everything."><img alt="" src="/google.png"/>Google Profile</a>
          <a href="http://twitter.com/apmasell" class="menu" title="I don't get µ-blogging, but I have it."><img alt="" src="/ublog.png"/>µ-blog</a>
          <a href="http://picasaweb.google.com/andre.p.masella/" class="menu" title="Unless you know me, this will undoubtedly be boring. If you know me, it may still be boring."><img alt="" src="/pics.png"/>Photos</a>
          <hr/>
          <div class="search">
            <form action="/applications/search">
              <p>
                <input type="text" name="P" onfocus="searchfocus(this);" value="Search"/>
              </p>
            </form>
          </div>
        </div>
        <div>
          <h1>
            <span class="titleblock"><img src="icon-big.png" alt=""/>Andre's Bookmarks</span>
          </h1>
          <div class="bookmarks">
            <xsl:apply-templates/>
          </div>
        </div>
        <table class="utilbar">
          <tr>
            <td>Mon, 8 Dec 2008 22:26:15 -0500</td>
          </tr>
        </table>
      </body>
    </html>
  </xsl:template>
  <xsl:template match="folder">
    <xsl:choose>
      <xsl:when test="@folded='no'">
        <p xmlns="http://www.w3.org/1999/xhtml">
          <span onclick="ShowHide('{generate-id(.)}'); return false;">
            <img src="folder_open.png" alt="-" id="{concat('icn',generate-id(.))}"/>
            <xsl:value-of select="title"/>
          </span>
        </p>
        <div xmlns="http://www.w3.org/1999/xhtml" id="{concat('fld',generate-id(.))}">
          <xsl:apply-templates/>
        </div>
      </xsl:when>
      <xsl:otherwise>
        <p xmlns="http://www.w3.org/1999/xhtml">
          <span onclick="ShowHide('{generate-id(.)}');">
            <img src="folder_closed.png" alt="+" id="{concat('icn', generate-id(.))}"/>
            <xsl:value-of select="title"/>
          </span>
        </p>
        <div xmlns="http://www.w3.org/1999/xhtml" id="{concat('fld',generate-id(.))}" style="display: none;">
          <xsl:apply-templates/>
        </div>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
  <xsl:template match="bookmark">
    <p xmlns="http://www.w3.org/1999/xhtml">
      <a href="{@href}">
        <img src="bookmark.png" alt=""/>
        <xsl:value-of select="title"/>
      </a>
    </p>
  </xsl:template>
  <xsl:template match="separator">
    <hr xmlns="http://www.w3.org/1999/xhtml"/>
  </xsl:template>
  <xsl:template match="alias">
    <p xmlns="http://www.w3.org/1999/xhtml">I don't know how to parse an alias.</p>
  </xsl:template>
  <xsl:template match="info">
	</xsl:template>
  <xsl:template match="title">
	</xsl:template>
</xsl:stylesheet>

