﻿<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xlink="http://www.w3c.org/1999/xlink" xmlns:lgg="http://www.linkagogo.com/">

<!-- xbel -->
<xsl:template match="xbel">
  <html>
   <head>
    <title>linkaGoGo Browser</title>
    <style>
     body {font: 8pt, "Verdana"; background: #E7EDF6}
     th.top {background: url("/images/gradient_title.png")}
     th.gradient_folder {background: url("/images/gradient.png")}
     th.gradient_bookmark {background: url("/images/gradient_bookmark.png")}
     th.gradient_title_table {background: url("/images/gradient_title_table.png")}
     td.folder {background: #E7EDF6}
     td.even {background: #EDF3FE}
     td.uneven {background: #FFFFFF}
     a {color: #000000; text-decoration: none}
     a:hover {background: url("/images/gradient_selected.png"); color:white; text-decoration:none;}
    </style>
   </head>
   <body>
    <table width="100%"  border="1" cellpadding="1" cellspacing="0">
    <tr><th align="center" class="top" colspan="2" height="75">
       <table border="0" cellpadding="0" cellspacing="0" height="75" width="100%">
          <tr><th align="center" height="20" colspan="3">linkaGoGo Browser</th></tr>
          <tr>
              <th align="center" valign="middle" width="30%"><a href="/api/rest/private">Home</a></th>
              <th align="center" width="40%" class="gradient_title_table" height="50"><a href="http://www.linkagogo.com/"><img align="absmiddle" border="0" src="/images/favicon.gif"/></a></th>
              <th align="center" valign="middle" width="30%"><form method="get" action="/api/rest/private/search"><input style="background: #E7EDF6" onchange ="submit();" name="search" type="text"/></form></th>
          </tr>
          <tr><th align="center" height="5" colspan="3"></th></tr>
       </table>
    </th></tr>
    <tr><th class="gradient_folder" valign="absmiddle" height="20" width="200">Folders</th><th class="gradient_bookmark" valign="center" height="20">Bookmarks</th></tr>
    <tr><td valign="top" width="200" class="folder">
    <table width="100%">
     <tr>
      <td class="folder">
        <a href="javascript: history.go(-1)"><img border="0" align="top" src="/images/ffc.gif"/>..</a>
      </td>
     </tr>
        <xsl:for-each select="folder">
     <tr>
      <td nowrap="1">
        <a>
         <xsl:attribute name="href">
          <xsl:value-of select="@contents" /> 
         </xsl:attribute>
         <img border="0" align="absmiddle" src="/images/ffc.gif"/>
         <xsl:apply-templates select="title" /> 
        </a>
      </td>
     </tr>
    </xsl:for-each>
    </table> 
    </td>
    <td class="folder" valign="top" width="*%">
     <table width="100%" height="100%" bgcolor="#FFFFFF" cellpadding="1" cellspacing="1">
      <xsl:for-each select="bookmark">
        <tr>
          <xsl:variable name="band">
            <xsl:choose>
              <xsl:when test="position() mod 2 = 0">
                <xsl:value-of select="'even'"/>
              </xsl:when>
              <xsl:otherwise>
                <xsl:value-of select="'uneven'"/>
              </xsl:otherwise>
            </xsl:choose>
          </xsl:variable>  
          <td width="16">
            <xsl:attribute name="class">
              <xsl:value-of select="$band"/>
            </xsl:attribute>
          </td>
          <td>
            <xsl:attribute name="class">
              <xsl:value-of select="$band"/>
            </xsl:attribute>
            <a>
             <xsl:attribute name="href">
              <xsl:value-of select="@redirect"/> 
             </xsl:attribute>
             <xsl:attribute name="title">
              <xsl:value-of select="@href" /> 
             </xsl:attribute>
             <xsl:apply-templates select="title" /> 
            </a>
          </td>
         </tr>
      </xsl:for-each>
      </table>
     </td></tr>
     </table>
    <a href="http://www.linkagogo.com/rest_api.html"><small>Powered by the <font color="red">link</font><font color="blue">a</font><font color="green"><i>GoGo</i></font> Web API</small></a>
   </body>
  </html>
</xsl:template>
</xsl:stylesheet>
