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

  <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"/>

  <xsl:template match="chapter" mode="object.title.template"/>
  <xsl:template match="preface" mode="object.title.template"/>
  <xsl:template match="appendix" mode="object.title.template"/>
  <xsl:template match="bibliography" mode="object.title.template"/>
  <xsl:template match="refnamediv"/>

  <xsl:template name="generate.citerefentry.link">
    <xsl:value-of select="refentrytitle"/>
  </xsl:template>

  <xsl:template match="filename">
    <xsl:choose>
      <xsl:when test="@role='header'">
	<tt><xsl:text>&lt;</xsl:text></tt>
	<xsl:call-template name="inline.monoseq"/>
	<tt><xsl:text>&gt;</xsl:text></tt>
      </xsl:when>
      <xsl:otherwise>
	<xsl:call-template name="inline.monoseq"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>

  <xsl:template match="qandaset[@role='exercise']">
    <hr/><xsl:apply-templates/><hr/>
  </xsl:template>

  <xsl:template match="qandaset[@role='exercise']/qandaentry/question">
    <xsl:param name="deflabel" select="'number'"/>
    <p><b>Exercise <xsl:apply-templates select="."
    mode="label.markup"/></b></p><xsl:apply-templates/>
  </xsl:template>

  <xsl:template match="qandaset[@role='exercise']/qandaentry/answer">
    <p><b>Answer:</b></p><xsl:apply-templates/>
  </xsl:template>

  <xsl:param name="local.l10n.xml" select="document('')"/> 
  <l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"> 
    <l:l10n language="en"> 
      <l:context name="xref-number-and-title"> 
	<l:template name="figure" text="Figure&#160;%n"/> 
      </l:context>    
    </l:l10n>
  </l:i18n>

  <!-- Simple math will be rendered in italics -->
  <xsl:template match="phrase[@role='math']">
    <xsl:call-template name="inline.italicseq"/>
  </xsl:template>

</xsl:stylesheet>
