<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
<xsl:output
  doctype-public="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"
/>
<xsl:template match="/">
<html>
  <head>
    <title>Bookmarks</title>
    <style type="text/css">
img.fold_icon
{
  width:7px; height:7px;
  border:1px dashed black;
  margin-right:2px;padding:1px;
}
#Bookmarks
{
  list-style:none;
  margin:0px; padding:5px;
}
#Bookmarks ul
{
  list-style:none;
  display:none;
}
#Bookmarks span.folder_title
{
  font-weight:bold;
}
    </style>
  </head>
  <body>
<div id="BodyDiv">
    <h1>Bookmarks</h1>
    <script type="text/javascript">
<![CDATA[
function fold(id)
{
  with(document.getElementById(id).style)
  {
    if(display != 'block')
    {
      display = 'block';
      document.getElementById('img_'+ id).src = '/image/icons/minus.png';
    }
    else
    {
      display = 'none';
      document.getElementById('img_'+ id).src = '/image/icons/plus.png';
    }
  }
}
]]>
    </script>
<ul id="Bookmarks">
<xsl:for-each select="*">
  <xsl:apply-templates/>
</xsl:for-each>
</ul>
    </div> <!-- end id="BodyDiv" -->
  </body>
</html>
</xsl:template>

<xsl:template match="folder">
<!-- begin folder '<xsl:value-of select="title"/> -->
  <li>
    <span onclick="fold('{generate-id(current())}');" class="folder_title">
      <img
        id="img_{generate-id(current())}"
        src="/image/icons/plus.png"
        class="fold_icon"
        alt="folder"
        title="click to fold/unfold"
      />
      <xsl:value-of select="title"/>
    </span>
    <ul id="{generate-id(current())}">
      <xsl:apply-templates/>
    </ul>
  </li>
<!-- end folder '<xsl:value-of select="title"/> -->
</xsl:template>

<xsl:template match="bookmark">
  <li><a>
    <xsl:attribute name="href">
      <xsl:value-of select="href"/>
    </xsl:attribute>
    <xsl:value-of select="title"/>
  </a></li>
</xsl:template>

<xsl:template match="separator">
  <li><hr/></li>
</xsl:template>

<xsl:template match="title"/>

<xsl:template match="desc"/>

</xsl:stylesheet>
