<?xml version="1.0"?>
<!DOCTYPE names [
<!ENTITY nbsp "&#160;">
<!ENTITY quote "&#34;">
<!ENTITY rArr "&#x21D2;">
]> 
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
  <html>
  <head>
  <link href="stylesheet-hce.css" rel="stylesheet" type="text/css" />
  <title><xsl:value-of select="chapter/info/title" /></title>
  </head>
  <body>
<h1><xsl:value-of select="chapter/info/title" /></h1>
    <p class="abstract"><xsl:value-of select="chapter/info/abstract" /></p>
          <p class="toc"><xsl:apply-templates select="chapter/section" mode="toc"/></p>
      <xsl:apply-templates />
  </body>
  </html>
</xsl:template>
<!-- Suppress all of these -->
<xsl:template match="chapter/info" />
<xsl:template match="section/title" />
<xsl:template match="simplesect/title" />
<xsl:template match="indexterm" />

<xsl:template match="section" mode="toc">
<a href="#{@xml:id}"><xsl:value-of select="title"/></a> &nbsp;&nbsp;&nbsp;
</xsl:template>

  
<xsl:template match="section">
    <div class="section">
  <h2><a name="{@xml:id}">
  <xsl:value-of select="title" />
  </a></h2>
  <xsl:apply-templates select="note" />
<xsl:apply-templates select="*[not(self::note)]"/>
  </div>
</xsl:template>

<xsl:template match="simplesect">
<div class="simplesect">
<h3><a name="{@xml:id}"><xsl:value-of select="title"/></a></h3>
<xsl:apply-templates select="note" />
<xsl:apply-templates select="*[not(self::note)]"/>
  </div>
</xsl:template>

<xsl:template match="note">
  <div class="note">
  <xsl:value-of select="." /></div>
</xsl:template>

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


<xsl:template match="procedure">
  <ol>
  <xsl:apply-templates select="step" /></ol>
</xsl:template>

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

<xsl:template match="itemizedlist">
  <ul>
  <xsl:apply-templates select="listitem" /></ul>
</xsl:template>

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

<!-- <xsl:template match="*[contains(name(), 'gui')]"> 
  <span class="gui">
  <xsl:value-of select="." /></span>
</xsl:template> -->

<xsl:template match="guibutton|keycap"> 
  <span class="guibutton"><xsl:value-of select="." /></span>
</xsl:template>

<xsl:template match="guimenu"> 
  <span class="guimenu">
  <xsl:value-of select="." />
  </span>
</xsl:template>
<xsl:template match="guimenuitem"> 
  &rArr; <span class="guimenu">
  <xsl:value-of select="." />
  </span>
</xsl:template>
<xsl:template match="guilabel"> 
  <span class="guilabel">
  <xsl:value-of select="." />
  </span>
</xsl:template>
<xsl:template match="emphasis">
	<b><xsl:value-of select="."/>
		</b>
</xsl:template>
<xsl:template match="link">
	<a><xsl:attribute name="href"><xsl:value-of select="."/></xsl:attribute><xsl:value-of select="."/></a>
</xsl:template>
<xsl:template match="xref">
	<a href="#{@linkend}"><xsl:value-of select="."/></a>
</xsl:template>
</xsl:stylesheet>