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

<xsl:key name="bibkey" match="//biblio/bib" use="@abbrev"/>

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

<xsl:template match="biblio">
  <!-- suppressed -->
</xsl:template>

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

<xsl:template match="bibref">
  <xsl:variable name="bib" select="key('bibkey',string(.))"/>
  <xsl:choose>
    <xsl:when test="$bib">
      <i><xsl:apply-templates select="$bib"/></i>
    </xsl:when>
    <xsl:otherwise>
      <b>NO BIB FOR <xsl:apply-templates/></b>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>

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

</xsl:stylesheet>


