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

<!--
vim: tw=78 ts=8 sw=2 sts=2 ai si
-->

<!--
  $Id: article.xsl,v 1.6 2002/08/31 18:57:05 ss Exp $
  by SATOH Satoru - ss at gnome.gr.jp
  
  This stylesheet, is for DocBook XML DTD/article subset, will be
  included in the parent stylesheeta and requires the stylesheets
  defines some template rules for each document.
-->



<!-- top level -->
<xsl:template match="article">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{@lang}" lang="{@lang}">
  <head>
    <xsl:call-template name="_header">
      <xsl:with-param name="_header_title"><xsl:value-of select='artheader/title/text()' /></xsl:with-param>
    </xsl:call-template>
  </head>
  <body>
    <xsl:apply-templates />
    <xsl:call-template name="_footer" />
  </body>
</html>
</xsl:template>


<!-- sect* -->
<xsl:template match="sect1">
<div class="section">
  <xsl:choose>
    <xsl:when test="@label">
  <a id="{@label}" name="{@label}"><xsl:value-of select="text()" /></a>
    </xsl:when>
    <xsl:otherwise>
    </xsl:otherwise>
  </xsl:choose>
  <xsl:apply-templates />
</div>
</xsl:template>


<xsl:template match="sect2">
<div class="subsection">
  <xsl:choose>
    <xsl:when test="@label">
  <a id="{@label}" name="{@label}"><xsl:value-of select="text()" /></a>
    </xsl:when>
    <xsl:otherwise>
    </xsl:otherwise>
  </xsl:choose>
  <xsl:apply-templates />
</div>
</xsl:template>


<!-- title -->
<xsl:template match="title">
<h2><xsl:value-of select='.' /></h2>
</xsl:template>


<!-- table -->
<xsl:template match="table">
<table class="stable">
  <caption><xsl:value-of select='title/text()' /></caption>
  <tbody><xsl:apply-templates /></tbody>
</table>
</xsl:template>

<xsl:template match="row">
<tr><xsl:apply-templates /></tr>
</xsl:template>

<xsl:template match="entry">
<td><xsl:apply-templates /></td>
</xsl:template>


<!-- list -->
<xsl:template match="itemizedlist">
<ul><xsl:apply-templates /></ul>
</xsl:template>

<xsl:template match="listitem">
<li><xsl:apply-templates /></li>
</xsl:template>


<!-- misc -->
<xsl:template match="para">
<p><xsl:apply-templates /></p>
</xsl:template>

<xsl:template match="literallayout|programlisting|screen">
<pre><xsl:apply-templates /></pre>
</xsl:template>

<xsl:template match="emphasis">
<em><xsl:apply-templates /></em>
</xsl:template>

<xsl:template match="ulink">
<a href="{@url}"><xsl:apply-templates /></a>
</xsl:template>


</xsl:stylesheet>

