<?xml version='1.0' encoding='utf-8'?>
<xsl:stylesheet version='1.0'
  xmlns='http://www.w3.org/1999/xhtml'
  xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
  xmlns:exslt='http://exslt.org/common'
  exclude-result-prefixes='exslt'
  >
  <!-- @see params.xsl  -->

  <xsl:template match="id ('navigation')">
	  <xsl:variable name='navigation-rtf'>
		  <div id="navigation">
			  <xsl:copy-of select="document ('navigation.xml')/*/*"/>
		  </div>
  	</xsl:variable>
    	<xsl:apply-templates select="exslt:node-set ($navigation-rtf)"/>
  </xsl:template>

  <xsl:template match="id ('feeds-content')">
    <xsl:variable name='feeds-rtf'>
      <xsl:copy-of select="document ($feed.file)"/>
    </xsl:variable>
    <div id="feeds-content">
    	<xsl:apply-templates select="exslt:node-set ($feeds-rtf)" mode="opml"/>
		</div>
  </xsl:template>

  <xsl:template match="id ('main')">
    <xsl:variable name='main-rtf'><!--	main- result. tree. fragment.	-->
      <div id="main">
        <xsl:choose>
          <xsl:when test="$main='index'">
            <div id="index"><xsl:copy-of select="document ('index.xml')/*/*"/></div>
            <div id="translation"><xsl:copy-of select="document ('translation.xml')/*/*"/></div>
            <div id="doc"><xsl:copy-of select="document ('doc.xml')/*/*"/></div>
          </xsl:when>
          <xsl:when test="$main='meta'">
            <div id="meta"><xsl:copy-of select="document ('meta.xml')/*/*"/></div>
          </xsl:when>
          <xsl:when test="$main='about'">
            <div id="about"><xsl:copy-of select="document ('about.xml')/*/*"/></div>
          </xsl:when>
          <xsl:otherwise>
            <div id="missing">The content of this page is missing.</div>
          </xsl:otherwise>
        </xsl:choose>
			</div>
    </xsl:variable>
    <xsl:apply-templates select="exslt:node-set ($main-rtf)"/>
  </xsl:template>

</xsl:stylesheet>
<!-- vim: ai si sm ts=2 sw=2 expandtab:
-->

