<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="xml" omit-xml-declaration="yes" indent="yes" encoding="ISO-8859-1"/>

<xsl:variable name="persondb" select="document('../db/lfdb.persons.xml')"/>
<xsl:variable name="englishdb" select="document('../db/lfdb.en.xml')"/>
<xsl:variable name="localdb" select="/"/>

<xsl:variable name="version" select="0.2"/>

<xsl:template match="/">
<html>
  <head>
    <title>LinuxFocus - Nederlandse Mainindex</title>
  </head>
<body bgcolor="#ffffff" text="#000000" alink="#336633" link="#336699">

<!-- MAP voor bovenste navigatiebalk -->  
<MAP name="top">  
<AREA shape="rect" coords="367,9,418,30" alt="Home" href="index.html"/>  
<AREA shape="rect" coords="423,9,457,30" alt="Map" href="map.html"/>
<AREA shape="rect" coords="463,9,508,30" alt="Index" href="indice.html"/>  
<AREA shape="rect" coords="514,9,558,30" alt="Zoek" href="Search/index.html"/>
</MAP>  
  
<!-- MAP voor onderste navigatiebalk -->  
<MAP name="bottom">
<AREA shape="rect" coords="78,0,163,15"  alt="Nieuws" href="News/index.html"/>  
<AREA shape="rect" coords="189,0,284,15" alt="Archieven" href="Archives/index.html"/>
<AREA shape="rect" coords="319,0,395,15" alt="Links" href="Links/index.html"/>  
<AREA shape="rect" coords="436,0,523,15" alt="Over LinuxFocus" href="aboutus.html"/>
</MAP>

<!-- NAVIGATIEBALK -->
<CENTER>
<IMG src="../common/images/Topbar-nl.gif" width="600" height="40" border="0" 
     ismap="yes" usemap="#top" /><BR />
<IMG src="../common/images/Bottombar-nl.gif" width="600" height="21" border="0" 
     ismap="yes" usemap="#bottom" /><BR />
</CENTER>

<H1>LinuxFocus Overzicht</H1>
<P>Dit is een overzicht van alle LinuxFocus artikels. Artikels die al
vertaald zijn, hebben een witte achtergrond. Een grijze achtergrond
betekent 'nog niet vertaald' en artikels met een blauwe achtergrond
zijn reeds gereserveerd voor vertaling, maar nog niet afgewerkt.</P>

<P><B>U kan <FONT COLOR="#BB1100">LinuxFocus</FONT> helpen!</B>
Als je een artikel ziet dat nog niet vertaald is en
je graag zelf zou vertalen, reserveer het dan voor u door een e-mail te
sturen naar de Nederlandse mailing list op 
<A href="mailto:dutch@linuxfocus.org">dutch@linuxfocus.org</A>.
</P>

<H1>LinuxFocus translators page</H1>

<P>This is an index of all LinuxFocus articles. Already translated
articles are shown with white background. Articles that are grayed
are not translated yet and articles with blue background are reserved
for translation but not yet ready.</P>

<P><B>You can help <FONT COLOR="#BB1100">LinuxFocus</FONT>!</B> 
If you see an article that is not yet 
translated and you would like to translate it then reserve it for
you by sending an e-mail to the person mentioned as maintainer
at the end of this page.</P>

    <table bgcolor="grey">
    <th bgcolor="black">
      <td bgcolor="black"><font color="white">titel</font></td>
      <td bgcolor="black"><font color="white">vertaald?</font></td>
      <td bgcolor="black"><font color="white">gecontroleerd?</font></td>
    </th>
    <xsl:for-each select="database/issues/issue">
      <xsl:sort select="@code" data-type="number" 
                order="descending"/>
        <xsl:apply-templates select="."/>
    </xsl:for-each>
    </table>
<HR width="100%" size="4" NOSHADE="yes" />
<P>Deze pagina is gemaakt met <B><FONT COLOR="#008000">mainindex.xslt, version <xsl:value-of select="$version"/></FONT></B>.</P>
<P>Deze pagina wordt onderhouden door: <A href="mailto:dutch@linuxfocus.org?subject=lfmainindex">het Nederlandse LinuxFocus team</A></P>
<BR clear="all" />
<!-- start of footer -->
<hr WIDTH="85%" noshade="yes" size="1" />
<CENTER>
<table WIDTH="85%" >
 <TR bgcolor="#666666">
   <TD align="center">
   <FONT color="#FFFFFF">
    <B>&#34;copy; 2000 LinuxFocus</B><BR />
    </FONT>
    <A href="../common/lfteam.html"><FONT color="#FFFFFF">Ga naar de LinuxFocus Contact Personen Pagina</FONT></A>
   </TD>
 </TR>
</table>
</CENTER>
  </body>
</html>
</xsl:template>

<xsl:template match="issue">
  <xsl:param name="issueid"><xsl:value-of select="@id"/></xsl:param>
  <tr bgcolor="black">
    <td colspan="4"><font color="white"><xsl:value-of select="title"/></font></td>
  </tr>
  <xsl:for-each select="$englishdb/database/articles/article">
    <xsl:sort select="@id" data-type="number" order="descending"/>
    <xsl:variable name="id" select="@id"/>
    <xsl:if test="issue/@href=$issueid">
      <xsl:apply-templates select="$localdb/database/articles/article[@id=$id]"/>
    </xsl:if>
  </xsl:for-each>
</xsl:template>

<xsl:template match="article">
  <xsl:param name="issueid"/>
  <xsl:variable name="artid"><xsl:value-of select="@id"/></xsl:variable>
  <xsl:variable name="article" select="$englishdb/database/articles/article[@id=$artid]"/>
  <xsl:variable name="artlang"><xsl:value-of select="$article/@xml:lang"/></xsl:variable>
  <xsl:element name="tr">
    <xsl:choose>
      <xsl:when test="translation/finished">
        <xsl:attribute name="bgcolor">white</xsl:attribute>
      </xsl:when>
      <xsl:when test="@xml:lang='nl'">
        <xsl:attribute name="bgcolor">white</xsl:attribute>
      </xsl:when>
      <xsl:when test="translation/reserved">
        <xsl:attribute name="bgcolor">#AAAAFF</xsl:attribute>
      </xsl:when>
      <xsl:otherwise>
        <xsl:attribute name="bgcolor">#C2C2C2</xsl:attribute>
      </xsl:otherwise>
    </xsl:choose>
    <td>
      <xsl:value-of select="$artid"/> (<xsl:value-of select="$artlang"/>)
    </td>
    <td>
      <xsl:choose>
        <!-- use this priority list:

             1. Title pages -> direct to subdir directly 
             2. Translation -> a. check <no[html|meta]>
                               b. try <file> first
                               c. use default
             3. 'Original'  -> a. try english original/translation first:
                                  I.   check <no[html|meta]>
                                  II.  try <file>
                               b. try 'real' original (if applicable)
                                  I.   check <no[html|meta]>
                                  II.  try <file>
                                  III. use default
        
          -->
        
        <xsl:when test="substring(@id,1,3)='cov'">
          <a href="../Nederlands/{$issueid}/"><xsl:value-of select="title"/></a>
        </xsl:when>
        <xsl:when test="translation/finished or $artlang='nl'">
          <xsl:choose>
            <xsl:when test="not(nohtml)">
              <xsl:element name="a">
                <xsl:attribute name="href">
                  <xsl:text>../</xsl:text>
                  <xsl:choose>
                    <xsl:when test="file[@xml:lang='nl' and not(@type='meta')]">
                      <xsl:value-of select="file[@xml:lang='nl' and not(@type='meta')]"/>
                    </xsl:when>
                    <xsl:otherwise>
                      <xsl:text>Nederlands/</xsl:text>
                      <xsl:value-of select="$issueid"/>
                      <xsl:text>/article</xsl:text>
                      <xsl:value-of select="$artid"/>
                      <xsl:text>.shtml</xsl:text>
                    </xsl:otherwise>
                  </xsl:choose>
                </xsl:attribute>
                <xsl:value-of select="title"/>
              </xsl:element>
            </xsl:when>
            <xsl:otherwise><xsl:value-of select="title"/></xsl:otherwise>
          </xsl:choose>
          <xsl:choose>
            <xsl:when test="not(nometa)">
              (<xsl:element name="a">
                <xsl:attribute name="href">
                  <xsl:text>../</xsl:text>
                  <xsl:choose>
                    <xsl:when test="file[@xml:lang='nl' and @type='meta']">
                      <xsl:value-of select="file[@xml:lang='nl' and @type='meta']"/>
                    </xsl:when>
                    <xsl:otherwise>
                      <xsl:text>Nederlands/</xsl:text>
                      <xsl:value-of select="$issueid"/>
                      <xsl:text>/article</xsl:text>
                      <xsl:value-of select="$artid"/>
                      <xsl:text>.meta.shtml</xsl:text>
                    </xsl:otherwise>
                  </xsl:choose>
                </xsl:attribute>
                <xsl:text>meta</xsl:text>
              </xsl:element>)
            </xsl:when>
            <xsl:otherwise>(no meta)</xsl:otherwise>
          </xsl:choose>
        </xsl:when>
        <xsl:otherwise>
          <xsl:choose>
            <xsl:when test="not($article/nohtml)">
              <xsl:element name="a">
                <xsl:attribute name="href">
                  <xsl:text>../</xsl:text>
                  <xsl:choose>
                    <xsl:when test="$article/file[@xml:lang='en' and not(@type='meta')]">
                      <xsl:value-of select="$article/file[@xml:lang='en' and not(@type='meta')]"/>
                    </xsl:when>
                    <xsl:when test="$article/file[@xml:lang=$artlang and not(@type='meta')]">
                      <xsl:value-of select="$article/file[@xml:lang=$artlang and not(@type='meta')]"/>
                    </xsl:when>
                    <xsl:otherwise>
                      <xsl:text>English/</xsl:text>
                      <xsl:value-of select="$issueid"/>
                      <xsl:text>/article</xsl:text>
                      <xsl:value-of select="$artid"/>
                      <xsl:text>.shtml</xsl:text>
                    </xsl:otherwise>
                  </xsl:choose>
                </xsl:attribute>
                <xsl:value-of select="title"/>
              </xsl:element>
            </xsl:when>
            <xsl:otherwise><xsl:value-of select="title"/></xsl:otherwise>
          </xsl:choose>
          <xsl:choose>
            <xsl:when test="not($article/nometa)">
              (<xsl:element name="a">
                <xsl:attribute name="href">
                  <xsl:text>../</xsl:text>
                  <xsl:choose>
                    <xsl:when test="$article/file[@xml:lang='en' and @type='meta']">
                      <xsl:value-of select="$article/file[@xml:lang='en' and @type='meta']"/>
                    </xsl:when>
                    <xsl:when test="$article/file[@xml:lang=$artlang and @type='meta']">
                      <xsl:value-of select="$article/file[@xml:lang=$artlang and @type='meta']"/>
                    </xsl:when>
                    <xsl:otherwise>
                      <xsl:text>English/</xsl:text>
                      <xsl:value-of select="$issueid"/>
                      <xsl:text>/article</xsl:text>
                       <xsl:value-of select="$artid"/>
                      <xsl:text>.meta.shtml</xsl:text>
                    </xsl:otherwise>
                  </xsl:choose>
                </xsl:attribute>
                <xsl:text>meta</xsl:text>
              </xsl:element>)
            </xsl:when>
            <xsl:otherwise>(no meta)</xsl:otherwise>
          </xsl:choose>
        </xsl:otherwise>        
      </xsl:choose>
    </td>
    <td>
    <xsl:choose>
      <xsl:when test="translation/finished">
        <font color="black">
          <xsl:apply-templates select="translation/person"/>
        </font>
      </xsl:when>
      <xsl:when test="translation/reserved">
        <font color="black">
          <xsl:apply-templates select="translation/person"/>
        </font>
      </xsl:when>
      <xsl:otherwise>
      </xsl:otherwise>
    </xsl:choose>  
    </td>
    <td>
    <xsl:choose>
      <xsl:when test="translation/proofread/finished">
        <font color="black">
          <xsl:apply-templates select="translation/proofread/person"/>
        </font>
      </xsl:when>
      <xsl:when test="translation/proofread/reserved">
        <font color="black">
          <xsl:apply-templates select="translation/proofread/person"/>
        </font>
      </xsl:when>
      <xsl:otherwise>
        <font color="black">
          <xsl:apply-templates select="translation/proofread/person"/>
        </font>
      </xsl:otherwise>
    </xsl:choose>  
    </td>
  </xsl:element>
</xsl:template>

<xsl:template match="person">
  <xsl:variable name="code"><xsl:value-of select="@href"/></xsl:variable>
  <xsl:value-of select="$persondb/database/persons/person[@id=$code]/name"/>
</xsl:template>

</xsl:stylesheet>
