<xsl:stylesheet version="1.0"
  xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
  xmlns:html="http://www.w3.org/1999/xhtml"
  xmlns:teix="http://www.tei-c.org/ns/Examples"
  xmlns:rng="http://relaxng.org/ns/structure/1.0"
  xmlns:estr="http://exslt.org/strings"
  xmlns:pantor="http://www.pantor.com/ns/local"
  xmlns:exsl="http://exslt.org/common"
  xmlns:tei="http://www.tei-c.org/ns/1.0"
  xmlns:edate="http://exslt.org/dates-and-times"
  extension-element-prefixes="exsl estr edate"
  exclude-result-prefixes="exsl rng edate estr tei a pantor teix html" 
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<!--
$Date: 2006/02/28 13:08:33 $ $Author: octavian_nadolu $
odd2html.xsl

 XSLT script for converting TEI Odds (XML) to HTML

 Sebastian Rahtz, 26th April 2000, from SGMLSpm Perl version by LDB
                  15th May 2001, revised to deal with full TEI
		  October 2003, for P5

     Copyright 2001 Sebastian Rahtz/Oxford University/TEI Consortium  
      <sebastian.rahtz@oucs.ox.ac.uk>

 Permission is hereby granted, free of charge, to any person obtaining
 a copy of this software and any associated documentation files (the
 ``Software''), to deal in the Software without restriction, including
 without limitation the rights to use, copy, modify, merge, publish,
 distribute, sublicense, and/or sell copies of the Software, and to
 permit persons to whom the Software is furnished to do so, subject to
 the following conditions:
 
 The above copyright notice and this permission notice shall be included
 in all copies or substantial portions of the Software.
-->


<xsl:import href="../html/tei.xsl"/>
<xsl:import href="../html/tagdocs.xsl"/>
<xsl:import href="../odds/teiodds.xsl"/>

<xsl:output 
  method="html"  
  doctype-public="-//W3C//DTD HTML 4.0 Transitional//EN" 
  doctype-system="http://www.w3.org/TR/html4/loose.dtd"
  indent="yes"/>

<xsl:key name="PUBLICIDS" match="tei:publicID" use="@file"/>

<!-- parameterization -->

<xsl:template name="metaHook">
  <xsl:param name="title"/>
 <meta name="DC.Title" content="{$title}"/>
 <meta name="DC.Language" content="(SCHEME=iso639) en"/> 
 <meta name="DC.Creator" content="TEI,Oxford University Computing Services, 13 Banbury Road, Oxford OX2 6NN, United Kingdom"/>
 <meta name="DC.Creator.Address" content="tei@oucs.ox.ac.uk"/>
</xsl:template>

<xsl:template name="bodyHook">
  <xsl:attribute name="background">/Pictures/background.gif</xsl:attribute>
</xsl:template>


<xsl:param name="indent-width" select="3"/>
<xsl:param name="line-width" select="80"/>

<xsl:key name="NameToID" match="tei:*" use="@ident"/>
<xsl:param name="cssFile">/release/xml/tei/stylesheet/teic/teic.css</xsl:param>
<xsl:param name="institution">Text Encoding Initiative</xsl:param>
<xsl:param name="STDOUT">true</xsl:param>
<xsl:param name="BITS">Bits</xsl:param>
<xsl:param name="oddmode">html</xsl:param>
<xsl:param name="leftLinks">true</xsl:param>
<xsl:param name="footnoteFile">true</xsl:param>
<xsl:param name="linksWidth">15%</xsl:param>
<xsl:param name="splitBackmatter">yes</xsl:param>
<xsl:param name="splitFrontmatter">yes</xsl:param>
<xsl:param name="splitLevel">-1</xsl:param>
<xsl:param name="verbose"></xsl:param>
<xsl:param name="autoToc">false</xsl:param>
<xsl:param name="topNavigationPanel">true</xsl:param>
<xsl:param name="numberHeadings">1.1.</xsl:param>
<xsl:param name="numberFrontHeadings"></xsl:param>
<xsl:param name="numberBackHeadings">A.1</xsl:param>
<xsl:param name="searchURL"/>
<xsl:param name="searchWords"/>
<xsl:param name="homeLabel">TEI P5 Home</xsl:param>
<xsl:variable name="linkColor"/>
<xsl:param name="parentWords">TEI Home</xsl:param>
<xsl:param name="homeWords">TEI Guidelines</xsl:param>
<xsl:variable name="top" select="/"/>
<xsl:param name="homeURL">http://www.tei-c.org/P5/</xsl:param>
<xsl:param name="parentURL">http://www.tei-c.org/</xsl:param>
<xsl:param name="TEISERVER">/Query/</xsl:param>
<xsl:param name="schemaBaseURL">http://www.tei-c.org.uk/schema/relaxng/p5/</xsl:param>

<!-- the level of division for each mini TOCs are built -->
<xsl:param name="subTocDepth">-1</xsl:param>

<xsl:param name="tocDepth">3</xsl:param>

<xsl:template name="refdoc">
      <xsl:apply-templates select="." mode="weavebody"/>
</xsl:template>



<xsl:template name="footer">
<p>WARNING! Generated from a pre-release draft of TEI P5.
This is NOT the final P5.</p>
</xsl:template>

<xsl:template name="logoPicture">
  <img src="/Pictures/jaco001d.gif" alt="" width="180" />
</xsl:template>

<xsl:template name="stdheader">
  <h2 class="institution"><xsl:value-of select="$institution"/>: Guidelines</h2>
  <h1>Specification for <xsl:value-of
  select="/tei:TEI/tei:text/tei:body/tei:p[2]/tei:*/@ident"/></h1>
 <hr/>
</xsl:template>

<xsl:template match="html:*">
     <xsl:element name="{local-name()}">
       <xsl:copy-of select="@*"/>
       <xsl:apply-templates/>
     </xsl:element>
</xsl:template>


<xsl:template match="tei:classSpec|tei:elementSpec|tei:macroSpec">
   <p><tt>&lt;<xsl:value-of select="name(.)"/>&gt;</tt></p>
  <table class="wovenodd" border='1'>
     <xsl:apply-templates select="." mode="weavebody"/>
  </table>
 </xsl:template>

<xsl:template match="element">
  <table class="wovenodd" border='1'>
    <xsl:for-each select="equiv">
      <tr>
	<td><xsl:value-of select="@xml:lang"/></td>
	<td><xsl:value-of select="@value"/></td>
	<td><xsl:apply-templates select="following-sibling::desc[@xml:lang=current()/@xml:lang]"/></td>
      </tr>
    </xsl:for-each>
  </table>
</xsl:template>
 
</xsl:stylesheet>

