<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  
  <xsl:output 
    method="xml" 
    indent="yes" 
    doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
    doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
    encoding="ISO-8859-1" />

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

  <xsl:template match="dlink">
    <a href="{@href}"><xsl:value-of select="substring-after(@href,'http://savannah.nongnu.org/download/robovasion/dist/')"/></a>
  </xsl:template> 

  <xsl:template match="dlink-full">
    <a href="{@href}"><xsl:value-of select="@href"/></a>
  </xsl:template> 

  <xsl:template match="page">
    <html>
      <head>
        <title>Wargus - <xsl:value-of select="@title" /></title>
        <link rel="stylesheet" type="text/css" href="default.css" />
      </head>

      <body>
        <center>
          <table width="60%" cellspacing="0" cellpadding="0">
            <tr>
              <td>
                <img src="images/wargus.png" />
              </td>
              <td align="center">
                <center>
                  <table width="100%">
                    <tr>
                      <td><a class="submenuitem" href="index.html">..:: Introduction ::..</a></td>
                    </tr>
                    <tr>
                      <td><a class="submenuitem" href="screenshots.html">..:: Screenshots ::..</a></td>
                    </tr>
                    <tr>
                      <td><a class="submenuitem" href="download.html">..:: Download ::..</a></td>
                    </tr>
                    <tr>
                      <td><a class="submenuitem" href="contact.html">..:: Contact ::..</a></td>
                    </tr>
                  </table>
                </center>
              </td>
            </tr>
          </table>
          
        </center>

        <div style="background-color: #d3bb83;   border-style: solid; margin-top: .5em; padding: 0em 2em 1em 2em;">
          <xsl:apply-templates />
        </div>

        <div style="background-color:  #b2892a;   border-style: solid; margin-top: .5em; padding: .5em 2em .5em 2em;">
          <table width="100%" cellspacing="0" cellpadding="0">
            <tr>
              <td align="left">Wargus</td>
              <td align="right">Copyright &#169; 2002-2003 <a href="mailto:aleona-devel@nongnu.org">The Wargus Team</a></td>
            </tr>
          </table>
        </div>

      </body>
    </html>
  </xsl:template>

  
  <xsl:template match="section">
    <h2 id="{@title}"><xsl:value-of select="@title" /></h2>
    <xsl:apply-templates />
  </xsl:template>

  <xsl:template match="subsection">
    <h3><xsl:value-of select="@title" /></h3>
    <xsl:apply-templates />
  </xsl:template>

  <xsl:template match="faq-list">
    <ul>
      <xsl:for-each select="faq/question">
        <li><a href="#faq{generate-id(.)}">
            <xsl:apply-templates/></a></li>
      </xsl:for-each>
    </ul>
    <hr/>
    <xsl:apply-templates/>
  </xsl:template>

  <xsl:template match="faq">
    <p></p>
    <table width="100%"  class="question">
      <colgroup width="60%" />
      <tr><td valign="top">
          <div id="faq{generate-id(question)}">
            <xsl:apply-templates select="question/node()"/>
          </div>
        </td>
        
        
        <td align="right" valign="top">
          <small>Last update:<xsl:value-of select="@date"/></small>
          [<small><a href="#faqtoc">Up</a></small>]
        </td>
      </tr>
    </table>

    <p class="answer"><xsl:apply-templates select="answer/node()"/> </p>
  </xsl:template>
</xsl:stylesheet>

