<!--

   Converts the XHTML page listing the W3C's public
   mailing lists and generates a simple HTML page,
   suitable for use as a Mozilla sidebar.

   by Leigh Dodds

   This stylesheet is in the Public Domain.

  -->

<xsl:stylesheet
  version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:html="http://www.w3.org/1999/xhtml">

<xsl:output method="xml" indent="yes"/>

<xsl:template match="/">
   <html>
      <head>
         <title>W3C List Toolbar</title>
         <link rel="stylesheet" href="xmldev.css" type="text/css" />         
         <script src="w3c.js" language="javascript" type="text/javascript"></script>
      </head>

      <body>   

         <table cols="1" width="100%" cellpadding="0" border="0">
            <tr>
               <td><h1>W3C List Toolbar</h1></td>
            </tr>

            <tr>
               <td><b>Browse</b><hr size="4" noshade="noshade"/></td>
            </tr>            

            <tr>
               <td>
                  <form name="browse" action="foo" method="get" target="_content">            
                     <select name="lists">
                        <option value="ignore" selected="selected">
                        Select a List
                        </option>
                        <xsl:apply-templates select="//html:dt"/>
                     </select>   

                     <br />

                     <input type="button" value="latest" onClick="return latest();" />
                     <input type="button" value="archives" onClick="return archives();" />
                     <br />       

                  </form>
                  

                  <tr>
                     <td><b>Search</b><hr size="4" noshade="noshade"/></td>
                  </tr>    
            
                  <form name="query" action="http://www.w3.org/Search/Mail/Public/search"  method="get" target="_content">
                     <tr>
                        <td><input name="keywords" type="text" size="30" maxlength="100" value="" /></td>
                     </tr>
                     <tr>
                        <td>
                           AND/OR <select name="hdr-1-name">
                              <option value="subject" selected="selected">subject</option>
                              <option value="from">from</option>
                              <option value="message-id">message-id</option>
                           </select> 
                        </td>
                     </tr>
                     <tr>
                        <td><input name="hdr-1-query" type="text" size="30" maxlength="100" value="" /></td>
                     </tr>
                     <input name="index" type="hidden" value="ALL"/>
                     <tr>
                        <td><input value="Search!" type="button" onClick="return doSearch();"/></td>
                     </tr>
                  </form>
                  
               </td>
            </tr>       
            <tr>
               <td>
               <a href="http://lists.w3.org" target="_content">W3C Lists home</a>
               <br />
               <a href="http://www.w3.org" target="_content">W3C home</a>
               <br />               
               <i>Toolbar created by <a href="mailto:leigh@xmlhack.com">Leigh Dodds</a></i></td>
            </tr>            
         </table>
         
      </body>
   </html>      
</xsl:template>

<xsl:template match="html:dt">
   <option value="{@id}">
      <xsl:value-of select="@id"/>
   </option>   
</xsl:template>

</xsl:stylesheet>

