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

 <xsl:template match="seg[@type='bibliography']" mode="refdb">
    <xsl:apply-templates mode="refdb"/>
  </xsl:template>

<!-- this file is generated by libgen.pl. Do not edit this file directly, edit the script instead -->

<!-- seg elements in the bibliography -->
<xsl:template match="seg" mode="refdb">
  <xsl:variable name="reftype" select="ancestor::bibl/@rend"/>
  <xsl:choose>
    <xsl:when test="@type='endtermtarget'">
      <!-- no direct output required -->
    </xsl:when>
    <xsl:when test="@type='userdef1'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTUSERDEF1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSUSERDEF1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTUSERDEF1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLUSERDEF1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKUSERDEF1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASEUSERDEF1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPUSERDEF1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPUSERDEF1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFUSERDEF1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGUSERDEF1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATAUSERDEF1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECUSERDEF1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENUSERDEF1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARUSERDEF1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMUSERDEF1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRUSERDEF1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLUSERDEF1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURUSERDEF1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPUSERDEF1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNUSERDEF1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTUSERDEF1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICUSERDEF1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSUSERDEF1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPUSERDEF1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATUSERDEF1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMUSERDEF1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTUSERDEF1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERUSERDEF1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDEUSERDEF1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDUSERDEF1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATUSERDEF1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESUSERDEF1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLUSERDEF1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBUSERDEF1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOUSERDEF1STYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='userdef2'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTUSERDEF2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSUSERDEF2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTUSERDEF2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLUSERDEF2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKUSERDEF2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASEUSERDEF2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPUSERDEF2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPUSERDEF2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFUSERDEF2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGUSERDEF2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATAUSERDEF2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECUSERDEF2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENUSERDEF2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARUSERDEF2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMUSERDEF2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRUSERDEF2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLUSERDEF2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURUSERDEF2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPUSERDEF2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNUSERDEF2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTUSERDEF2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICUSERDEF2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSUSERDEF2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPUSERDEF2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATUSERDEF2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMUSERDEF2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTUSERDEF2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERUSERDEF2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDEUSERDEF2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDUSERDEF2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATUSERDEF2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESUSERDEF2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLUSERDEF2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBUSERDEF2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOUSERDEF2STYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='userdef3'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTUSERDEF3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSUSERDEF3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTUSERDEF3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLUSERDEF3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKUSERDEF3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASEUSERDEF3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPUSERDEF3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPUSERDEF3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFUSERDEF3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGUSERDEF3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATAUSERDEF3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECUSERDEF3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENUSERDEF3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARUSERDEF3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMUSERDEF3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRUSERDEF3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLUSERDEF3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURUSERDEF3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPUSERDEF3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNUSERDEF3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTUSERDEF3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICUSERDEF3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSUSERDEF3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPUSERDEF3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATUSERDEF3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMUSERDEF3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTUSERDEF3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERUSERDEF3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDEUSERDEF3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDUSERDEF3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATUSERDEF3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESUSERDEF3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLUSERDEF3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBUSERDEF3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOUSERDEF3STYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='userdef4'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTUSERDEF4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSUSERDEF4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTUSERDEF4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLUSERDEF4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKUSERDEF4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASEUSERDEF4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPUSERDEF4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPUSERDEF4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFUSERDEF4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGUSERDEF4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATAUSERDEF4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECUSERDEF4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENUSERDEF4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARUSERDEF4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMUSERDEF4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRUSERDEF4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLUSERDEF4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURUSERDEF4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPUSERDEF4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNUSERDEF4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTUSERDEF4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICUSERDEF4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSUSERDEF4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPUSERDEF4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATUSERDEF4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMUSERDEF4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTUSERDEF4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERUSERDEF4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDEUSERDEF4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDUSERDEF4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATUSERDEF4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESUSERDEF4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLUSERDEF4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBUSERDEF4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOUSERDEF4STYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='userdef5'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTUSERDEF5STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSUSERDEF5STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTUSERDEF5STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLUSERDEF5STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKUSERDEF5STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASEUSERDEF5STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPUSERDEF5STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPUSERDEF5STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFUSERDEF5STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGUSERDEF5STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATAUSERDEF5STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECUSERDEF5STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENUSERDEF5STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARUSERDEF5STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMUSERDEF5STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRUSERDEF5STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLUSERDEF5STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURUSERDEF5STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPUSERDEF5STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNUSERDEF5STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTUSERDEF5STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICUSERDEF5STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSUSERDEF5STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPUSERDEF5STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATUSERDEF5STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMUSERDEF5STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTUSERDEF5STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERUSERDEF5STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDEUSERDEF5STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDUSERDEF5STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATUSERDEF5STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESUSERDEF5STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLUSERDEF5STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBUSERDEF5STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOUSERDEF5STYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='typeofwork'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTTYPEOFWORKSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSTYPEOFWORKSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTTYPEOFWORKSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLTYPEOFWORKSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKTYPEOFWORKSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASETYPEOFWORKSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPTYPEOFWORKSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPTYPEOFWORKSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFTYPEOFWORKSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGTYPEOFWORKSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATATYPEOFWORKSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECTYPEOFWORKSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENTYPEOFWORKSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARTYPEOFWORKSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMTYPEOFWORKSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRTYPEOFWORKSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLTYPEOFWORKSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURTYPEOFWORKSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPTYPEOFWORKSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNTYPEOFWORKSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTTYPEOFWORKSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICTYPEOFWORKSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSTYPEOFWORKSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPTYPEOFWORKSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATTYPEOFWORKSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMTYPEOFWORKSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTTYPEOFWORKSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERTYPEOFWORKSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDETYPEOFWORKSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDTYPEOFWORKSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATTYPEOFWORKSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESTYPEOFWORKSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLTYPEOFWORKSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBTYPEOFWORKSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOTYPEOFWORKSTYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='area'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTAREASTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSAREASTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTAREASTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLAREASTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKAREASTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASEAREASTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPAREASTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPAREASTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFAREASTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGAREASTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATAAREASTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECAREASTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENAREASTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARAREASTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMAREASTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRAREASTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLAREASTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURAREASTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPAREASTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNAREASTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTAREASTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICAREASTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSAREASTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPAREASTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATAREASTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMAREASTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTAREASTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERAREASTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDEAREASTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDAREASTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATAREASTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESAREASTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLAREASTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBAREASTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOAREASTYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='ostype'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTOSTYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSOSTYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTOSTYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLOSTYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKOSTYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASEOSTYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPOSTYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPOSTYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFOSTYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGOSTYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATAOSTYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECOSTYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENOSTYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEAROSTYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMOSTYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPROSTYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLOSTYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOUROSTYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPOSTYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNOSTYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTOSTYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICOSTYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSOSTYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPOSTYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATOSTYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMOSTYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTOSTYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SEROSTYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDEOSTYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDOSTYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATOSTYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESOSTYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLOSTYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBOSTYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOOSTYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='degree'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTDEGREESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSDEGREESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTDEGREESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLDEGREESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKDEGREESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASEDEGREESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPDEGREESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPDEGREESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFDEGREESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGDEGREESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATADEGREESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECDEGREESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENDEGREESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARDEGREESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMDEGREESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRDEGREESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLDEGREESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURDEGREESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPDEGREESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNDEGREESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTDEGREESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICDEGREESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSDEGREESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPDEGREESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATDEGREESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMDEGREESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTDEGREESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERDEGREESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDEDEGREESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDDEGREESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATDEGREESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESDEGREESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLDEGREESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBDEGREESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEODEGREESTYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='runningtime'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTRUNNINGTIMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSRUNNINGTIMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTRUNNINGTIMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLRUNNINGTIMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKRUNNINGTIMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASERUNNINGTIMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPRUNNINGTIMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPRUNNINGTIMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFRUNNINGTIMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGRUNNINGTIMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATARUNNINGTIMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECRUNNINGTIMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENRUNNINGTIMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARRUNNINGTIMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMRUNNINGTIMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRRUNNINGTIMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLRUNNINGTIMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURRUNNINGTIMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPRUNNINGTIMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNRUNNINGTIMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTRUNNINGTIMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICRUNNINGTIMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSRUNNINGTIMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPRUNNINGTIMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATRUNNINGTIMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMRUNNINGTIMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTRUNNINGTIMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERRUNNINGTIMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDERUNNINGTIMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDRUNNINGTIMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATRUNNINGTIMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESRUNNINGTIMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLRUNNINGTIMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBRUNNINGTIMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEORUNNINGTIMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='classcodeintl'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTCLASSCODEINTLSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSCLASSCODEINTLSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTCLASSCODEINTLSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLCLASSCODEINTLSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKCLASSCODEINTLSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASECLASSCODEINTLSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPCLASSCODEINTLSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPCLASSCODEINTLSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFCLASSCODEINTLSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGCLASSCODEINTLSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATACLASSCODEINTLSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECCLASSCODEINTLSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENCLASSCODEINTLSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARCLASSCODEINTLSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMCLASSCODEINTLSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRCLASSCODEINTLSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLCLASSCODEINTLSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURCLASSCODEINTLSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPCLASSCODEINTLSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNCLASSCODEINTLSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTCLASSCODEINTLSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICCLASSCODEINTLSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSCLASSCODEINTLSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPCLASSCODEINTLSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATCLASSCODEINTLSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMCLASSCODEINTLSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTCLASSCODEINTLSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERCLASSCODEINTLSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDECLASSCODEINTLSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDCLASSCODEINTLSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATCLASSCODEINTLSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESCLASSCODEINTLSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLCLASSCODEINTLSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBCLASSCODEINTLSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOCLASSCODEINTLSTYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='classcodeus'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTCLASSCODEUSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSCLASSCODEUSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTCLASSCODEUSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLCLASSCODEUSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKCLASSCODEUSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASECLASSCODEUSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPCLASSCODEUSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPCLASSCODEUSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFCLASSCODEUSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGCLASSCODEUSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATACLASSCODEUSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECCLASSCODEUSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENCLASSCODEUSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARCLASSCODEUSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMCLASSCODEUSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRCLASSCODEUSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLCLASSCODEUSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURCLASSCODEUSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPCLASSCODEUSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNCLASSCODEUSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTCLASSCODEUSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICCLASSCODEUSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSCLASSCODEUSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPCLASSCODEUSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATCLASSCODEUSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMCLASSCODEUSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTCLASSCODEUSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERCLASSCODEUSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDECLASSCODEUSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDCLASSCODEUSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATCLASSCODEUSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESCLASSCODEUSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLCLASSCODEUSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBCLASSCODEUSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOCLASSCODEUSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='senderemail'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTSENDEREMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSSENDEREMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTSENDEREMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLSENDEREMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKSENDEREMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASESENDEREMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPSENDEREMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPSENDEREMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFSENDEREMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGSENDEREMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATASENDEREMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECSENDEREMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENSENDEREMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARSENDEREMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMSENDEREMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRSENDEREMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLSENDEREMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURSENDEREMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPSENDEREMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNSENDEREMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTSENDEREMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICSENDEREMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSSENDEREMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPSENDEREMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATSENDEREMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMSENDEREMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTSENDEREMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERSENDEREMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDESENDEREMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDSENDEREMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATSENDEREMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESSENDEREMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLSENDEREMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBSENDEREMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOSENDEREMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='recipientemail'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTRECIPIENTEMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSRECIPIENTEMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTRECIPIENTEMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLRECIPIENTEMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKRECIPIENTEMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASERECIPIENTEMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPRECIPIENTEMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPRECIPIENTEMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFRECIPIENTEMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGRECIPIENTEMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATARECIPIENTEMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECRECIPIENTEMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENRECIPIENTEMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARRECIPIENTEMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMRECIPIENTEMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRRECIPIENTEMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLRECIPIENTEMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURRECIPIENTEMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPRECIPIENTEMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNRECIPIENTEMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTRECIPIENTEMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICRECIPIENTEMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSRECIPIENTEMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPRECIPIENTEMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATRECIPIENTEMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMRECIPIENTEMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTRECIPIENTEMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERRECIPIENTEMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDERECIPIENTEMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDRECIPIENTEMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATRECIPIENTEMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESRECIPIENTEMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLRECIPIENTEMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBRECIPIENTEMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEORECIPIENTEMAILSTYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='mediatype'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTMEDIATYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSMEDIATYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTMEDIATYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLMEDIATYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKMEDIATYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASEMEDIATYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPMEDIATYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPMEDIATYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFMEDIATYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGMEDIATYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATAMEDIATYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECMEDIATYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENMEDIATYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARMEDIATYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMMEDIATYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRMEDIATYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLMEDIATYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURMEDIATYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPMEDIATYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNMEDIATYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTMEDIATYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICMEDIATYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSMEDIATYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPMEDIATYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATMEDIATYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMMEDIATYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTMEDIATYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERMEDIATYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDEMEDIATYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDMEDIATYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATMEDIATYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESMEDIATYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLMEDIATYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBMEDIATYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOMEDIATYPESTYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='numvolumes'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTNUMVOLUMESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSNUMVOLUMESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTNUMVOLUMESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLNUMVOLUMESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKNUMVOLUMESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASENUMVOLUMESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPNUMVOLUMESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPNUMVOLUMESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFNUMVOLUMESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGNUMVOLUMESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATANUMVOLUMESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECNUMVOLUMESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENNUMVOLUMESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARNUMVOLUMESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMNUMVOLUMESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRNUMVOLUMESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLNUMVOLUMESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURNUMVOLUMESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPNUMVOLUMESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNNUMVOLUMESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTNUMVOLUMESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICNUMVOLUMESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSNUMVOLUMESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPNUMVOLUMESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATNUMVOLUMESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMNUMVOLUMESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTNUMVOLUMESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERNUMVOLUMESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDENUMVOLUMESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDNUMVOLUMESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATNUMVOLUMESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESNUMVOLUMESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLNUMVOLUMESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBNUMVOLUMESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEONUMVOLUMESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='edition'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTEDITIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSEDITIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTEDITIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLEDITIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKEDITIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASEEDITIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPEDITIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPEDITIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFEDITIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGEDITIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATAEDITIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECEDITIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENEDITIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEAREDITIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMEDITIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPREDITIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLEDITIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOUREDITIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPEDITIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNEDITIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTEDITIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICEDITIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSEDITIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPEDITIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATEDITIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMEDITIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTEDITIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SEREDITIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDEEDITIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDEDITIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATEDITIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESEDITIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLEDITIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBEDITIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOEDITIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='computer'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTCOMPUTERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSCOMPUTERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTCOMPUTERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLCOMPUTERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKCOMPUTERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASECOMPUTERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPCOMPUTERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPCOMPUTERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFCOMPUTERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGCOMPUTERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATACOMPUTERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECCOMPUTERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENCOMPUTERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARCOMPUTERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMCOMPUTERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRCOMPUTERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLCOMPUTERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURCOMPUTERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPCOMPUTERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNCOMPUTERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTCOMPUTERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICCOMPUTERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSCOMPUTERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPCOMPUTERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATCOMPUTERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMCOMPUTERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTCOMPUTERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERCOMPUTERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDECOMPUTERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDCOMPUTERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATCOMPUTERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESCOMPUTERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLCOMPUTERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBCOMPUTERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOCOMPUTERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='conferencelocation'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTCONFERENCELOCATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSCONFERENCELOCATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTCONFERENCELOCATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLCONFERENCELOCATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKCONFERENCELOCATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASECONFERENCELOCATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPCONFERENCELOCATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPCONFERENCELOCATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFCONFERENCELOCATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGCONFERENCELOCATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATACONFERENCELOCATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECCONFERENCELOCATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENCONFERENCELOCATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARCONFERENCELOCATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMCONFERENCELOCATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRCONFERENCELOCATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLCONFERENCELOCATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURCONFERENCELOCATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPCONFERENCELOCATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNCONFERENCELOCATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTCONFERENCELOCATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICCONFERENCELOCATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSCONFERENCELOCATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPCONFERENCELOCATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATCONFERENCELOCATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMCONFERENCELOCATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTCONFERENCELOCATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERCONFERENCELOCATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDECONFERENCELOCATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDCONFERENCELOCATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATCONFERENCELOCATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESCONFERENCELOCATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLCONFERENCELOCATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBCONFERENCELOCATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOCONFERENCELOCATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='registrynum'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTREGISTRYNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSREGISTRYNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTREGISTRYNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLREGISTRYNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKREGISTRYNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASEREGISTRYNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPREGISTRYNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPREGISTRYNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFREGISTRYNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGREGISTRYNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATAREGISTRYNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECREGISTRYNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENREGISTRYNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARREGISTRYNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMREGISTRYNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRREGISTRYNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLREGISTRYNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURREGISTRYNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPREGISTRYNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNREGISTRYNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTREGISTRYNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICREGISTRYNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSREGISTRYNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPREGISTRYNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATREGISTRYNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMREGISTRYNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTREGISTRYNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERREGISTRYNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDEREGISTRYNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDREGISTRYNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATREGISTRYNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESREGISTRYNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLREGISTRYNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBREGISTRYNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOREGISTRYNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='classification'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTCLASSIFICATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSCLASSIFICATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTCLASSIFICATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLCLASSIFICATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKCLASSIFICATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASECLASSIFICATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPCLASSIFICATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPCLASSIFICATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFCLASSIFICATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGCLASSIFICATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATACLASSIFICATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECCLASSIFICATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENCLASSIFICATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARCLASSIFICATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMCLASSIFICATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRCLASSIFICATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLCLASSIFICATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURCLASSIFICATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPCLASSIFICATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNCLASSIFICATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTCLASSIFICATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICCLASSIFICATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSCLASSIFICATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPCLASSIFICATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATCLASSIFICATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMCLASSIFICATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTCLASSIFICATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERCLASSIFICATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDECLASSIFICATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDCLASSIFICATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATCLASSIFICATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESCLASSIFICATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLCLASSIFICATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBCLASSIFICATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOCLASSIFICATIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='section'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTSECTIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSSECTIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTSECTIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLSECTIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKSECTIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASESECTIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPSECTIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPSECTIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFSECTIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGSECTIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATASECTIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECSECTIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENSECTIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARSECTIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMSECTIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRSECTIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLSECTIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURSECTIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPSECTIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNSECTIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTSECTIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICSECTIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSSECTIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPSECTIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATSECTIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMSECTIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTSECTIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERSECTIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDESECTIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDSECTIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATSECTIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESSECTIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLSECTIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBSECTIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOSECTIONSTYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='pamphletnum'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTPAMPHLETNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSPAMPHLETNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTPAMPHLETNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLPAMPHLETNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKPAMPHLETNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASEPAMPHLETNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPPAMPHLETNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPPAMPHLETNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFPAMPHLETNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGPAMPHLETNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATAPAMPHLETNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECPAMPHLETNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENPAMPHLETNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARPAMPHLETNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMPAMPHLETNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRPAMPHLETNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLPAMPHLETNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURPAMPHLETNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPPAMPHLETNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNPAMPHLETNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTPAMPHLETNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICPAMPHLETNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSPAMPHLETNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPPAMPHLETNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATPAMPHLETNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMPAMPHLETNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTPAMPHLETNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERPAMPHLETNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDEPAMPHLETNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDPAMPHLETNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATPAMPHLETNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESPAMPHLETNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLPAMPHLETNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBPAMPHLETNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOPAMPHLETNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='chapternum'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTCHAPTERNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSCHAPTERNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTCHAPTERNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLCHAPTERNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKCHAPTERNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASECHAPTERNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPCHAPTERNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPCHAPTERNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFCHAPTERNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGCHAPTERNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATACHAPTERNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECCHAPTERNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENCHAPTERNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARCHAPTERNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMCHAPTERNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRCHAPTERNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLCHAPTERNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURCHAPTERNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPCHAPTERNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNCHAPTERNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTCHAPTERNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICCHAPTERNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSCHAPTERNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPCHAPTERNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATCHAPTERNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMCHAPTERNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTCHAPTERNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERCHAPTERNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDECHAPTERNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDCHAPTERNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATCHAPTERNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESCHAPTERNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLCHAPTERNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBCHAPTERNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOCHAPTERNUMSTYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='pages'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTPAGESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSPAGESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTPAGESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLPAGESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKPAGESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASEPAGESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPPAGESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPPAGESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFPAGESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGPAGESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATAPAGESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECPAGESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENPAGESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARPAGESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMPAGESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRPAGESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLPAGESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURPAGESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPPAGESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNPAGESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTPAGESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICPAGESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSPAGESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPPAGESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATPAGESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMPAGESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTPAGESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERPAGESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDEPAGESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDPAGESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATPAGESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESPAGESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLPAGESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBPAGESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOPAGESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='volume'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTVOLUMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSVOLUMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTVOLUMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLVOLUMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKVOLUMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASEVOLUMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPVOLUMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPVOLUMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFVOLUMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGVOLUMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATAVOLUMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECVOLUMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENVOLUMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARVOLUMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMVOLUMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRVOLUMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLVOLUMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURVOLUMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPVOLUMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNVOLUMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTVOLUMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICVOLUMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSVOLUMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPVOLUMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATVOLUMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMVOLUMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTVOLUMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERVOLUMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDEVOLUMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDVOLUMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATVOLUMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESVOLUMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLVOLUMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBVOLUMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOVOLUMESTYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='issue'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTISSUESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSISSUESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTISSUESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLISSUESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKISSUESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASEISSUESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPISSUESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPISSUESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFISSUESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGISSUESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATAISSUESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECISSUESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENISSUESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARISSUESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMISSUESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRISSUESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLISSUESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURISSUESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPISSUESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNISSUESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTISSUESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICISSUESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSISSUESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPISSUESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATISSUESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMISSUESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTISSUESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERISSUESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDEISSUESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDISSUESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATISSUESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESISSUESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLISSUESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBISSUESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOISSUESTYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='issn'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASESERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATASERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDESERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='isbn'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASESERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATASERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDESERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOSERIALSTYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='link0'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTLINK0STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSLINK0STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTLINK0STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLLINK0STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKLINK0STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASELINK0STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPLINK0STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPLINK0STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFLINK0STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGLINK0STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATALINK0STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECLINK0STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENLINK0STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARLINK0STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMLINK0STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRLINK0STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLLINK0STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURLINK0STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPLINK0STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNLINK0STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTLINK0STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICLINK0STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSLINK0STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPLINK0STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATLINK0STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMLINK0STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTLINK0STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERLINK0STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDELINK0STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDLINK0STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATLINK0STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESLINK0STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLLINK0STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBLINK0STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOLINK0STYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='link1'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTLINK1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSLINK1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTLINK1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLLINK1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKLINK1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASELINK1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPLINK1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPLINK1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFLINK1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGLINK1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATALINK1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECLINK1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENLINK1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARLINK1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMLINK1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRLINK1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLLINK1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURLINK1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPLINK1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNLINK1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTLINK1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICLINK1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSLINK1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPLINK1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATLINK1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMLINK1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTLINK1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERLINK1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDELINK1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDLINK1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATLINK1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESLINK1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLLINK1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBLINK1STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOLINK1STYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='link2'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTLINK2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSLINK2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTLINK2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLLINK2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKLINK2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASELINK2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPLINK2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPLINK2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFLINK2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGLINK2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATALINK2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECLINK2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENLINK2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARLINK2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMLINK2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRLINK2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLLINK2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURLINK2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPLINK2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNLINK2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTLINK2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICLINK2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSLINK2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPLINK2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATLINK2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMLINK2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTLINK2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERLINK2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDELINK2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDLINK2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATLINK2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESLINK2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLLINK2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBLINK2STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOLINK2STYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='link3'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTLINK3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSLINK3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTLINK3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLLINK3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKLINK3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASELINK3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPLINK3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPLINK3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFLINK3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGLINK3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATALINK3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECLINK3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENLINK3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARLINK3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMLINK3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRLINK3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLLINK3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURLINK3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPLINK3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNLINK3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTLINK3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICLINK3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSLINK3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPLINK3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATLINK3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMLINK3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTLINK3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERLINK3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDELINK3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDLINK3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATLINK3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESLINK3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLLINK3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBLINK3STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOLINK3STYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='link4'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTLINK4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSLINK4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTLINK4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLLINK4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKLINK4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASELINK4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPLINK4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPLINK4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFLINK4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGLINK4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATALINK4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECLINK4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENLINK4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARLINK4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMLINK4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRLINK4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLLINK4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURLINK4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPLINK4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNLINK4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTLINK4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICLINK4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSLINK4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPLINK4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATLINK4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMLINK4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTLINK4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERLINK4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDELINK4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDLINK4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATLINK4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESLINK4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLLINK4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBLINK4STYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOLINK4STYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='notes'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTNOTESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSNOTESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTNOTESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLNOTESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKNOTESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASENOTESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPNOTESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPNOTESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFNOTESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGNOTESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATANOTESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECNOTESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENNOTESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARNOTESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMNOTESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRNOTESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLNOTESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURNOTESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPNOTESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNNOTESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTNOTESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICNOTESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSNOTESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPNOTESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATNOTESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMNOTESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTNOTESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERNOTESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDENOTESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDNOTESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATNOTESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESNOTESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLNOTESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBNOTESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEONOTESSTYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:otherwise>
      <xsl:apply-templates mode="refdb"/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>

<!-- seg elements in intext citation -->

<xsl:template match="seg" mode="INTEXT">
  <xsl:choose>
    <xsl:when test="@type='userdef1'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTUSERDEF1STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='userdef2'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTUSERDEF2STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='userdef3'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTUSERDEF3STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='userdef4'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTUSERDEF4STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='userdef5'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTUSERDEF5STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='typeofwork'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTTYPEOFWORKSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='area'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTAREASTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='ostype'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTOSTYPESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='degree'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTDEGREESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='runningtime'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTRUNNINGTIMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='classcodeintl'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTCLASSCODEINTLSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='classcodeus'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTCLASSCODEUSSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='senderemail'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSENDEREMAILSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='recipientemail'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTRECIPIENTEMAILSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='mediatype'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTMEDIATYPESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='numvolumes'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTNUMVOLUMESSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='edition'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTEDITIONSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='computer'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTCOMPUTERSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='conferencelocation'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTCONFERENCELOCATIONSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='registrynum'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTREGISTRYNUMSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='classification'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTCLASSIFICATIONSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='section'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSECTIONSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='pamphletnum'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTPAMPHLETNUMSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='chapternum'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTCHAPTERNUMSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='pages'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTPAGESSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='volume'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTVOLUMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='issue'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTISSUESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='issn'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSERIALSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='isbn'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSERIALSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='link0'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTLINK0STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='link1'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTLINK1STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='link2'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTLINK2STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='link3'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTLINK3STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='link4'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTLINK4STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='notes'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTNOTESSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
      <xsl:apply-templates mode="refdb"/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>

<xsl:template match="seg" mode="INTEXTSQ">
  <xsl:choose>
    <xsl:when test="@type='userdef1'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQUSERDEF1STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='userdef2'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQUSERDEF2STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='userdef3'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQUSERDEF3STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='userdef4'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQUSERDEF4STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='userdef5'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQUSERDEF5STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='typeofwork'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQTYPEOFWORKSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='area'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQAREASTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='ostype'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQOSTYPESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='degree'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQDEGREESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='runningtime'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQRUNNINGTIMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='classcodeintl'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQCLASSCODEINTLSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='classcodeus'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQCLASSCODEUSSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='senderemail'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQSENDEREMAILSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='recipientemail'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQRECIPIENTEMAILSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='mediatype'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQMEDIATYPESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='numvolumes'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQNUMVOLUMESSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='edition'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQEDITIONSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='computer'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQCOMPUTERSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='conferencelocation'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQCONFERENCELOCATIONSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='registrynum'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQREGISTRYNUMSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='classification'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQCLASSIFICATIONSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='section'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQSECTIONSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='pamphletnum'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQPAMPHLETNUMSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='chapternum'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQCHAPTERNUMSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='pages'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQPAGESSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='volume'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQVOLUMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='issue'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQISSUESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='issn'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQSERIALSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='isbn'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQSERIALSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='link0'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQLINK0STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='link1'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQLINK1STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='link2'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQLINK2STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='link3'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQLINK3STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='link4'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQLINK4STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='notes'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQNOTESSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
      <xsl:apply-templates mode="refdb"/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>

<xsl:template match="seg" mode="AUTHORONLY">
  <xsl:choose>
    <xsl:when test="@type='userdef1'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYUSERDEF1STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='userdef2'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYUSERDEF2STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='userdef3'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYUSERDEF3STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='userdef4'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYUSERDEF4STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='userdef5'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYUSERDEF5STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='typeofwork'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYTYPEOFWORKSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='area'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYAREASTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='ostype'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYOSTYPESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='degree'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYDEGREESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='runningtime'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYRUNNINGTIMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='classcodeintl'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYCLASSCODEINTLSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='classcodeus'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYCLASSCODEUSSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='senderemail'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSENDEREMAILSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='recipientemail'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYRECIPIENTEMAILSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='mediatype'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYMEDIATYPESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='numvolumes'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYNUMVOLUMESSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='edition'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYEDITIONSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='computer'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYCOMPUTERSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='conferencelocation'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYCONFERENCELOCATIONSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='registrynum'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYREGISTRYNUMSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='classification'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYCLASSIFICATIONSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='section'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSECTIONSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='pamphletnum'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYPAMPHLETNUMSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='chapternum'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYCHAPTERNUMSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='pages'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYPAGESSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='volume'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYVOLUMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='issue'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYISSUESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='issn'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSERIALSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='isbn'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSERIALSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='link0'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYLINK0STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='link1'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYLINK1STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='link2'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYLINK2STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='link3'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYLINK3STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='link4'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYLINK4STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='notes'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYNOTESSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
      <xsl:apply-templates mode="refdb"/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>

<xsl:template match="seg" mode="AUTHORONLYSQ">
  <xsl:choose>
    <xsl:when test="@type='userdef1'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQUSERDEF1STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='userdef2'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQUSERDEF2STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='userdef3'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQUSERDEF3STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='userdef4'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQUSERDEF4STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='userdef5'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQUSERDEF5STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='typeofwork'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQTYPEOFWORKSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='area'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQAREASTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='ostype'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQOSTYPESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='degree'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQDEGREESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='runningtime'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQRUNNINGTIMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='classcodeintl'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQCLASSCODEINTLSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='classcodeus'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQCLASSCODEUSSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='senderemail'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQSENDEREMAILSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='recipientemail'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQRECIPIENTEMAILSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='mediatype'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQMEDIATYPESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='numvolumes'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQNUMVOLUMESSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='edition'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQEDITIONSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='computer'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQCOMPUTERSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='conferencelocation'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQCONFERENCELOCATIONSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='registrynum'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQREGISTRYNUMSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='classification'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQCLASSIFICATIONSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='section'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQSECTIONSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='pamphletnum'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQPAMPHLETNUMSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='chapternum'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQCHAPTERNUMSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='pages'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQPAGESSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='volume'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQVOLUMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='issue'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQISSUESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='issn'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQSERIALSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='isbn'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQSERIALSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='link0'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQLINK0STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='link1'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQLINK1STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='link2'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQLINK2STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='link3'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQLINK3STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='link4'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQLINK4STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='notes'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQNOTESSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
      <xsl:apply-templates mode="refdb"/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>

<xsl:template match="seg" mode="YEARONLY">
  <xsl:choose>
    <xsl:when test="@type='userdef1'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYUSERDEF1STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='userdef2'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYUSERDEF2STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='userdef3'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYUSERDEF3STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='userdef4'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYUSERDEF4STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='userdef5'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYUSERDEF5STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='typeofwork'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYTYPEOFWORKSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='area'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYAREASTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='ostype'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYOSTYPESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='degree'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYDEGREESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='runningtime'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYRUNNINGTIMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='classcodeintl'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYCLASSCODEINTLSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='classcodeus'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYCLASSCODEUSSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='senderemail'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYSENDEREMAILSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='recipientemail'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYRECIPIENTEMAILSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='mediatype'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYMEDIATYPESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='numvolumes'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYNUMVOLUMESSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='edition'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYEDITIONSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='computer'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYCOMPUTERSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='conferencelocation'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYCONFERENCELOCATIONSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='registrynum'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYREGISTRYNUMSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='classification'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYCLASSIFICATIONSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='section'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYSECTIONSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='pamphletnum'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYPAMPHLETNUMSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='chapternum'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYCHAPTERNUMSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='pages'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYPAGESSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='volume'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYVOLUMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='issue'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYISSUESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='issn'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYSERIALSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='isbn'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYSERIALSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='link0'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYLINK0STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='link1'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYLINK1STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='link2'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYLINK2STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='link3'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYLINK3STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='link4'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYLINK4STYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='notes'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYNOTESSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
      <xsl:apply-templates mode="refdb"/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>

<!-- real elements in bibliographies -->

<xsl:template match="name" mode="refdb">
  <xsl:variable name="reftype" select="ancestor::bibl/@rend"/>
  <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTADDRESSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSADDRESSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTADDRESSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLADDRESSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKADDRESSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASEADDRESSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPADDRESSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPADDRESSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFADDRESSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGADDRESSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATAADDRESSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECADDRESSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENADDRESSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARADDRESSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMADDRESSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRADDRESSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLADDRESSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURADDRESSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPADDRESSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNADDRESSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTADDRESSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICADDRESSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSADDRESSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPADDRESSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATADDRESSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMADDRESSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTADDRESSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERADDRESSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDEADDRESSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDADDRESSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATADDRESSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESADDRESSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLADDRESSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBADDRESSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOADDRESSSTYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
</xsl:template>

<xsl:template match="abbr" mode="refdb">
  <xsl:variable name="reftype" select="ancestor::bibl/@rend"/>
  <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTREFNUMBERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSREFNUMBERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTREFNUMBERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLREFNUMBERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKREFNUMBERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASEREFNUMBERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPREFNUMBERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPREFNUMBERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFREFNUMBERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGREFNUMBERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATAREFNUMBERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECREFNUMBERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENREFNUMBERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARREFNUMBERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMREFNUMBERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRREFNUMBERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLREFNUMBERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURREFNUMBERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPREFNUMBERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNREFNUMBERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTREFNUMBERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICREFNUMBERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSREFNUMBERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPREFNUMBERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATREFNUMBERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMREFNUMBERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTREFNUMBERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERREFNUMBERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDEREFNUMBERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDREFNUMBERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATREFNUMBERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESREFNUMBERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLREFNUMBERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBREFNUMBERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOREFNUMBERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
</xsl:template>

<xsl:template match="publisher" mode="refdb">
  <xsl:variable name="reftype" select="ancestor::bibl/@rend"/>
  <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTPUBLISHERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSPUBLISHERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTPUBLISHERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLPUBLISHERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKPUBLISHERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASEPUBLISHERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPPUBLISHERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPPUBLISHERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFPUBLISHERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGPUBLISHERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATAPUBLISHERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECPUBLISHERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENPUBLISHERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARPUBLISHERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMPUBLISHERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRPUBLISHERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLPUBLISHERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURPUBLISHERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPPUBLISHERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNPUBLISHERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTPUBLISHERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICPUBLISHERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSPUBLISHERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPPUBLISHERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATPUBLISHERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMPUBLISHERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTPUBLISHERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERPUBLISHERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDEPUBLISHERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDPUBLISHERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATPUBLISHERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESPUBLISHERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLPUBLISHERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBPUBLISHERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOPUBLISHERSTYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
</xsl:template>

<xsl:template match="note" mode="refdb">
  <xsl:variable name="reftype" select="ancestor::bibl/@rend"/>
  <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTABSTRACTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSABSTRACTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTABSTRACTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLABSTRACTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKABSTRACTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASEABSTRACTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPABSTRACTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPABSTRACTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFABSTRACTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGABSTRACTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATAABSTRACTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECABSTRACTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENABSTRACTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARABSTRACTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMABSTRACTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRABSTRACTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLABSTRACTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURABSTRACTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPABSTRACTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNABSTRACTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTABSTRACTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICABSTRACTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSABSTRACTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPABSTRACTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATABSTRACTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMABSTRACTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTABSTRACTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERABSTRACTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDEABSTRACTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDABSTRACTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATABSTRACTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESABSTRACTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLABSTRACTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBABSTRACTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOABSTRACTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
</xsl:template>

<!-- real elements in intext citation -->

<xsl:template match="name" mode="refdb">
  <xsl:choose>
    <xsl:when test="@type='INTEXT'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTADDRESSSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='INTEXTSQ'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQADDRESSSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='AUTHORONLY'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYADDRESSSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='AUTHORONLYSQ'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQADDRESSSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='YEARONLY'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYADDRESSSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
      <xsl:apply-templates mode="refdb"/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
<xsl:template match="abbr" mode="refdb">
  <xsl:choose>
    <xsl:when test="@type='INTEXT'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTREFNUMBERSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='INTEXTSQ'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQREFNUMBERSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='AUTHORONLY'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYREFNUMBERSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='AUTHORONLYSQ'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQREFNUMBERSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='YEARONLY'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYREFNUMBERSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
      <xsl:apply-templates mode="refdb"/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
<xsl:template match="publisher" mode="refdb">
  <xsl:choose>
    <xsl:when test="@type='INTEXT'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTPUBLISHERSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='INTEXTSQ'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQPUBLISHERSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='AUTHORONLY'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYPUBLISHERSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='AUTHORONLYSQ'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQPUBLISHERSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='YEARONLY'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYPUBLISHERSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
      <xsl:apply-templates mode="refdb"/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
<xsl:template match="note" mode="refdb">
  <xsl:choose>
    <xsl:when test="@type='INTEXT'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTABSTRACTSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='INTEXTSQ'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQABSTRACTSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='AUTHORONLY'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYABSTRACTSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='AUTHORONLYSQ'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQABSTRACTSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='YEARONLY'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYABSTRACTSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
      <xsl:apply-templates mode="refdb"/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
<!-- authorlists in bibliography -->

<xsl:template match="persName" mode="refdb">
  <xsl:variable name="reftype" select="ancestor::bibl/@rend"/>
  <xsl:choose>
    <xsl:when test="@type='author'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTAUTHORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSAUTHORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTAUTHORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLAUTHORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKAUTHORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASEAUTHORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPAUTHORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPAUTHORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFAUTHORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGAUTHORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATAAUTHORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECAUTHORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENAUTHORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARAUTHORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMAUTHORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRAUTHORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLAUTHORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURAUTHORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPAUTHORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNAUTHORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTAUTHORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICAUTHORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSAUTHORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPAUTHORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATAUTHORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMAUTHORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTAUTHORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERAUTHORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDEAUTHORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDAUTHORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATAUTHORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESAUTHORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLAUTHORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBAUTHORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOAUTHORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='editor'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASEEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATAEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEAREDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPREDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOUREDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SEREDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDEEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@type='seditor'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTSEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSSEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTSEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLSEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKSEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASESEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPSEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPSEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFSEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGSEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATASEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECSEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENSEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARSEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMSEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRSEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLSEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURSEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPSEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNSEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTSEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICSEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSSEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPSEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATSEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMSEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTSEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERSEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDESEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDSEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATSEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESSEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLSEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBSEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOSEDITORLISTSTYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
  </xsl:choose>
</xsl:template>

<!-- authorlists in intext citation -->

<xsl:template match="persName" mode="INTEXT">
  <xsl:choose>
    <xsl:when test="@type='author'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTAUTHORLISTSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='editor'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTEDITORLISTSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='seditor'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSEDITORLISTSTYLE"/>
      </xsl:call-template>
    </xsl:when>
  </xsl:choose>
</xsl:template>

<xsl:template match="persName" mode="INTEXTSQ">
  <xsl:choose>
    <xsl:when test="@type='author'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQAUTHORLISTSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='editor'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQEDITORLISTSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='seditor'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQSEDITORLISTSTYLE"/>
      </xsl:call-template>
    </xsl:when>
  </xsl:choose>
</xsl:template>

<xsl:template match="persName" mode="AUTHORONLY">
  <xsl:choose>
    <xsl:when test="@type='author'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYAUTHORLISTSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='editor'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYEDITORLISTSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='seditor'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSEDITORLISTSTYLE"/>
      </xsl:call-template>
    </xsl:when>
  </xsl:choose>
</xsl:template>

<xsl:template match="persName" mode="AUTHORONLYSQ">
  <xsl:choose>
    <xsl:when test="@type='author'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQAUTHORLISTSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='editor'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQEDITORLISTSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='seditor'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQSEDITORLISTSTYLE"/>
      </xsl:call-template>
    </xsl:when>
  </xsl:choose>
</xsl:template>

<xsl:template match="persName" mode="YEARONLY">
  <xsl:choose>
    <xsl:when test="@type='author'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYAUTHORLISTSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='editor'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYEDITORLISTSTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@type='seditor'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYSEDITORLISTSTYLE"/>
      </xsl:call-template>
    </xsl:when>
  </xsl:choose>
</xsl:template>

<!-- name components -->

<xsl:template match="surname" mode="refdb">
  <xsl:apply-templates mode="refdb"/>
</xsl:template>

<xsl:template match="foreName|forename" mode="refdb">
  <xsl:apply-templates mode="refdb"/>
</xsl:template>

<xsl:template match="name[@type='othername']" mode="refdb">
  <xsl:apply-templates mode="refdb"/>
</xsl:template>

<xsl:template match="name[@type='lineage']" mode="refdb">
  <xsl:apply-templates mode="refdb"/>
</xsl:template>

<!-- pubdates in bibliography -->

<xsl:template match="date" mode="refdb">
  <xsl:variable name="reftype" select="ancestor::bibl/@rend"/>
  <xsl:choose>
    <xsl:when test="@rend='primary'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTPUBDATESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSPUBDATESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTPUBDATESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLPUBDATESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKPUBDATESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASEPUBDATESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPPUBDATESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPPUBDATESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFPUBDATESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGPUBDATESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATAPUBDATESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECPUBDATESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENPUBDATESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARPUBDATESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMPUBDATESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRPUBDATESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLPUBDATESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURPUBDATESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPPUBDATESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNPUBDATESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTPUBDATESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICPUBDATESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSPUBDATESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPPUBDATESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATPUBDATESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMPUBDATESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTPUBDATESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERPUBDATESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDEPUBDATESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDPUBDATESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATPUBDATESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESPUBDATESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLPUBDATESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBPUBDATESTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOPUBDATESTYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@rend='secondary'">
      <xsl:choose>
        <xsl:when test="$reftype='ABST'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ABSTPUBDATESECSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ADVS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ADVSPUBDATESECSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ART'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ARTPUBDATESECSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BILLPUBDATESECSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='BOOK'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$BOOKPUBDATESECSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CASE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CASEPUBDATESECSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CHAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CHAPPUBDATESECSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='COMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$COMPPUBDATESECSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CONF'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CONFPUBDATESECSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='CTLG'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$CTLGPUBDATESECSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='DATA'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$DATAPUBDATESECSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ELEC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ELECPUBDATESECSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='GEN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$GENPUBDATESECSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='HEAR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$HEARPUBDATESECSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='ICOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$ICOMMPUBDATESECSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='INPR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$INPRPUBDATESECSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JFULL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JFULLPUBDATESECSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='JOUR'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$JOURPUBDATESECSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MAP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MAPPUBDATESECSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MGZN'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MGZNPUBDATESECSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MPCT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MPCTPUBDATESECSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='MUSIC'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$MUSICPUBDATESECSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='NEWS'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$NEWSPUBDATESECSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAMP'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PAMPPUBDATESECSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PATPUBDATESECSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='PCOMM'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$PCOMMPUBDATESECSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='RPRT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$RPRTPUBDATESECSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SER'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SERPUBDATESECSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SLIDE'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SLIDEPUBDATESECSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='SOUND'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$SOUNDPUBDATESECSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='STAT'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$STATPUBDATESECSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='THES'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$THESPUBDATESECSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNBILL'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNBILLPUBDATESECSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='UNPB'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$UNPBPUBDATESECSTYLE"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$reftype='VIDEO'">
          <xsl:call-template name="refdb-process-inline">
            <xsl:with-param name="style" select="$VIDEOPUBDATESECSTYLE"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:when>
  </xsl:choose>
</xsl:template>

<!-- pubdates in intext citation -->

<xsl:template match="date" mode="INTEXT">
  <xsl:choose>
    <xsl:when test="@rend='primary'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTPUBDATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@rend='secondary'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTPUBDATESECSTYLE"/>
      </xsl:call-template>
    </xsl:when>
  </xsl:choose>
</xsl:template>

<xsl:template match="date" mode="INTEXTSQ">
  <xsl:choose>
    <xsl:when test="@rend='primary'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQPUBDATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@rend='secondary'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INTEXTSQPUBDATESECSTYLE"/>
      </xsl:call-template>
    </xsl:when>
  </xsl:choose>
</xsl:template>

<xsl:template match="date" mode="AUTHORONLY">
  <xsl:choose>
    <xsl:when test="@rend='primary'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYPUBDATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@rend='secondary'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYPUBDATESECSTYLE"/>
      </xsl:call-template>
    </xsl:when>
  </xsl:choose>
</xsl:template>

<xsl:template match="date" mode="AUTHORONLYSQ">
  <xsl:choose>
    <xsl:when test="@rend='primary'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQPUBDATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@rend='secondary'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$AUTHORONLYSQPUBDATESECSTYLE"/>
      </xsl:call-template>
    </xsl:when>
  </xsl:choose>
</xsl:template>

<xsl:template match="date" mode="YEARONLY">
  <xsl:choose>
    <xsl:when test="@rend='primary'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYPUBDATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="@rend='secondary'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$YEARONLYPUBDATESECSTYLE"/>
      </xsl:call-template>
    </xsl:when>
  </xsl:choose>
</xsl:template>

<!-- journal title in bibliography -->

<xsl:template match="seg[@type='journal']/title" mode="refdb">
  <xsl:variable name="reftype" select="ancestor::bibl/@rend"/>
  <xsl:choose>    <xsl:when test="$reftype='ABST'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$ABSTJOURNALNAMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='ADVS'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$ADVSJOURNALNAMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='ART'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$ARTJOURNALNAMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='BILL'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$BILLJOURNALNAMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='BOOK'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$BOOKJOURNALNAMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='CASE'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$CASEJOURNALNAMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='CHAP'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$CHAPJOURNALNAMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='COMP'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$COMPJOURNALNAMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='CONF'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$CONFJOURNALNAMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='CTLG'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$CTLGJOURNALNAMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='DATA'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$DATAJOURNALNAMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='ELEC'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$ELECJOURNALNAMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='GEN'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$GENJOURNALNAMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='HEAR'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$HEARJOURNALNAMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='ICOMM'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$ICOMMJOURNALNAMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='INPR'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INPRJOURNALNAMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='JFULL'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$JFULLJOURNALNAMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='JOUR'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$JOURJOURNALNAMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='MAP'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$MAPJOURNALNAMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='MGZN'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$MGZNJOURNALNAMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='MPCT'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$MPCTJOURNALNAMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='MUSIC'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$MUSICJOURNALNAMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='NEWS'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$NEWSJOURNALNAMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='PAMP'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$PAMPJOURNALNAMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='PAT'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$PATJOURNALNAMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='PCOMM'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$PCOMMJOURNALNAMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='RPRT'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$RPRTJOURNALNAMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='SER'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$SERJOURNALNAMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='SLIDE'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$SLIDEJOURNALNAMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='SOUND'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$SOUNDJOURNALNAMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='STAT'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$STATJOURNALNAMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='THES'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$THESJOURNALNAMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='UNBILL'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$UNBILLJOURNALNAMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='UNPB'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$UNPBJOURNALNAMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='VIDEO'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$VIDEOJOURNALNAMESTYLE"/>
      </xsl:call-template>
    </xsl:when>
  </xsl:choose>
</xsl:template>

<!-- journal title in intext citation -->

<xsl:template match="seg[@type='journal']/title" mode="INTEXT">
  <xsl:call-template name="refdb-process-inline">
    <xsl:with-param name="style" select="$INTEXTJOURNALNAMESTYLE"/>
  </xsl:call-template>
</xsl:template>

<xsl:template match="seg[@type='journal']/title" mode="INTEXTSQ">
  <xsl:call-template name="refdb-process-inline">
    <xsl:with-param name="style" select="$INTEXTSQJOURNALNAMESTYLE"/>
  </xsl:call-template>
</xsl:template>

<xsl:template match="seg[@type='journal']/title" mode="AUTHORONLY">
  <xsl:call-template name="refdb-process-inline">
    <xsl:with-param name="style" select="$AUTHORONLYJOURNALNAMESTYLE"/>
  </xsl:call-template>
</xsl:template>

<xsl:template match="seg[@type='journal']/title" mode="AUTHORONLYSQ">
  <xsl:call-template name="refdb-process-inline">
    <xsl:with-param name="style" select="$AUTHORONLYSQJOURNALNAMESTYLE"/>
  </xsl:call-template>
</xsl:template>

<xsl:template match="seg[@type='journal']/title" mode="YEARONLY">
  <xsl:call-template name="refdb-process-inline">
    <xsl:with-param name="style" select="$YEARONLYJOURNALNAMESTYLE"/>
  </xsl:call-template>
</xsl:template>

<!-- book title in bibliography -->

<xsl:template match="seg[@type='book']/title" mode="refdb">
  <xsl:variable name="reftype" select="ancestor::bibl/@rend"/>
  <xsl:choose>    <xsl:when test="$reftype='ABST'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$ABSTBOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='ADVS'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$ADVSBOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='ART'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$ARTBOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='BILL'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$BILLBOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='BOOK'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$BOOKBOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='CASE'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$CASEBOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='CHAP'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$CHAPBOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='COMP'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$COMPBOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='CONF'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$CONFBOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='CTLG'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$CTLGBOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='DATA'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$DATABOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='ELEC'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$ELECBOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='GEN'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$GENBOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='HEAR'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$HEARBOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='ICOMM'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$ICOMMBOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='INPR'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INPRBOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='JFULL'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$JFULLBOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='JOUR'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$JOURBOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='MAP'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$MAPBOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='MGZN'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$MGZNBOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='MPCT'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$MPCTBOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='MUSIC'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$MUSICBOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='NEWS'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$NEWSBOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='PAMP'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$PAMPBOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='PAT'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$PATBOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='PCOMM'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$PCOMMBOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='RPRT'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$RPRTBOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='SER'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$SERBOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='SLIDE'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$SLIDEBOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='SOUND'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$SOUNDBOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='STAT'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$STATBOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='THES'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$THESBOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='UNBILL'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$UNBILLBOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='UNPB'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$UNPBBOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='VIDEO'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$VIDEOBOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
  </xsl:choose>
</xsl:template>

<!-- book title in intext citation -->

<xsl:template match="seg[@type='book']/title" mode="INTEXT">
  <xsl:call-template name="refdb-process-inline">
    <xsl:with-param name="style" select="$INTEXTBOOKTITLESTYLE"/>
  </xsl:call-template>
</xsl:template>

<xsl:template match="seg[@type='book']/title" mode="INTEXTSQ">
  <xsl:call-template name="refdb-process-inline">
    <xsl:with-param name="style" select="$INTEXTSQBOOKTITLESTYLE"/>
  </xsl:call-template>
</xsl:template>

<xsl:template match="seg[@type='book']/title" mode="AUTHORONLY">
  <xsl:call-template name="refdb-process-inline">
    <xsl:with-param name="style" select="$AUTHORONLYBOOKTITLESTYLE"/>
  </xsl:call-template>
</xsl:template>

<xsl:template match="seg[@type='book']/title" mode="AUTHORONLYSQ">
  <xsl:call-template name="refdb-process-inline">
    <xsl:with-param name="style" select="$AUTHORONLYSQBOOKTITLESTYLE"/>
  </xsl:call-template>
</xsl:template>

<xsl:template match="seg[@type='book']/title" mode="YEARONLY">
  <xsl:call-template name="refdb-process-inline">
    <xsl:with-param name="style" select="$YEARONLYBOOKTITLESTYLE"/>
  </xsl:call-template>
</xsl:template>

<!-- chapter title in bibliography -->

<xsl:template match="seg[@type='chapter' or @type='article']/title" mode="refdb">
  <xsl:variable name="reftype" select="ancestor::bibl/@rend"/>
  <xsl:choose>    <xsl:when test="$reftype='ABST'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$ABSTTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='ADVS'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$ADVSTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='ART'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$ARTTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='BILL'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$BILLTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='BOOK'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$BOOKTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='CASE'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$CASETITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='CHAP'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$CHAPTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='COMP'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$COMPTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='CONF'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$CONFTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='CTLG'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$CTLGTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='DATA'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$DATATITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='ELEC'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$ELECTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='GEN'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$GENTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='HEAR'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$HEARTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='ICOMM'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$ICOMMTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='INPR'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INPRTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='JFULL'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$JFULLTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='JOUR'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$JOURTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='MAP'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$MAPTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='MGZN'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$MGZNTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='MPCT'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$MPCTTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='MUSIC'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$MUSICTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='NEWS'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$NEWSTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='PAMP'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$PAMPTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='PAT'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$PATTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='PCOMM'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$PCOMMTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='RPRT'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$RPRTTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='SER'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$SERTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='SLIDE'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$SLIDETITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='SOUND'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$SOUNDTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='STAT'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$STATTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='THES'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$THESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='UNBILL'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$UNBILLTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='UNPB'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$UNPBTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='VIDEO'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$VIDEOTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
  </xsl:choose>
</xsl:template>

<!-- chapter title in intext citation -->

<xsl:template match="seg[@type='chapter' or @type='article']/title" mode="INTEXT">
  <xsl:call-template name="refdb-process-inline">
    <xsl:with-param name="style" select="$INTEXTTITLESTYLE"/>
  </xsl:call-template>
</xsl:template>

<xsl:template match="seg[@type='chapter' or @type='article']/title" mode="INTEXTSQ">
  <xsl:call-template name="refdb-process-inline">
    <xsl:with-param name="style" select="$INTEXTSQTITLESTYLE"/>
  </xsl:call-template>
</xsl:template>

<xsl:template match="seg[@type='chapter' or @type='article']/title" mode="AUTHORONLY">
  <xsl:call-template name="refdb-process-inline">
    <xsl:with-param name="style" select="$AUTHORONLYTITLESTYLE"/>
  </xsl:call-template>
</xsl:template>

<xsl:template match="seg[@type='chapter' or @type='article']/title" mode="AUTHORONLYSQ">
  <xsl:call-template name="refdb-process-inline">
    <xsl:with-param name="style" select="$AUTHORONLYSQTITLESTYLE"/>
  </xsl:call-template>
</xsl:template>

<xsl:template match="seg[@type='chapter' or @type='article']/title" mode="YEARONLY">
  <xsl:call-template name="refdb-process-inline">
    <xsl:with-param name="style" select="$YEARONLYTITLESTYLE"/>
  </xsl:call-template>
</xsl:template>

<!-- series title in bibliography -->

<xsl:template match="seg[@type='series']/title" mode="refdb">
  <xsl:variable name="reftype" select="ancestor::bibl/@rend"/>
  <xsl:choose>    <xsl:when test="$reftype='ABST'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$ABSTSERIESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='ADVS'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$ADVSSERIESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='ART'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$ARTSERIESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='BILL'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$BILLSERIESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='BOOK'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$BOOKSERIESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='CASE'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$CASESERIESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='CHAP'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$CHAPSERIESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='COMP'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$COMPSERIESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='CONF'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$CONFSERIESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='CTLG'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$CTLGSERIESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='DATA'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$DATASERIESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='ELEC'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$ELECSERIESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='GEN'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$GENSERIESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='HEAR'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$HEARSERIESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='ICOMM'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$ICOMMSERIESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='INPR'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INPRSERIESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='JFULL'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$JFULLSERIESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='JOUR'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$JOURSERIESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='MAP'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$MAPSERIESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='MGZN'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$MGZNSERIESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='MPCT'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$MPCTSERIESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='MUSIC'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$MUSICSERIESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='NEWS'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$NEWSSERIESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='PAMP'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$PAMPSERIESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='PAT'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$PATSERIESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='PCOMM'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$PCOMMSERIESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='RPRT'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$RPRTSERIESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='SER'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$SERSERIESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='SLIDE'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$SLIDESERIESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='SOUND'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$SOUNDSERIESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='STAT'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$STATSERIESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='THES'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$THESSERIESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='UNBILL'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$UNBILLSERIESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='UNPB'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$UNPBSERIESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='VIDEO'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$VIDEOSERIESTITLESTYLE"/>
      </xsl:call-template>
    </xsl:when>
  </xsl:choose>
</xsl:template>

<!-- series title in intext citation -->

<xsl:template match="seg[@type='series']/title" mode="INTEXT">
  <xsl:call-template name="refdb-process-inline">
    <xsl:with-param name="style" select="$INTEXTSERIESTITLESTYLE"/>
  </xsl:call-template>
</xsl:template>

<xsl:template match="seg[@type='series']/title" mode="INTEXTSQ">
  <xsl:call-template name="refdb-process-inline">
    <xsl:with-param name="style" select="$INTEXTSQSERIESTITLESTYLE"/>
  </xsl:call-template>
</xsl:template>

<xsl:template match="seg[@type='series']/title" mode="AUTHORONLY">
  <xsl:call-template name="refdb-process-inline">
    <xsl:with-param name="style" select="$AUTHORONLYSERIESTITLESTYLE"/>
  </xsl:call-template>
</xsl:template>

<xsl:template match="seg[@type='series']/title" mode="AUTHORONLYSQ">
  <xsl:call-template name="refdb-process-inline">
    <xsl:with-param name="style" select="$AUTHORONLYSQSERIESTITLESTYLE"/>
  </xsl:call-template>
</xsl:template>

<xsl:template match="seg[@type='series']/title" mode="YEARONLY">
  <xsl:call-template name="refdb-process-inline">
    <xsl:with-param name="style" select="$YEARONLYSERIESTITLESTYLE"/>
  </xsl:call-template>
</xsl:template>

<!-- title as author in bibliography -->

<xsl:template match="seg[@type='author']/title" mode="refdb">
  <xsl:variable name="reftype" select="ancestor::bibl/@rend"/>
  <xsl:choose>    <xsl:when test="$reftype='ABST'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$ABSTAUTHORLISTALTERNATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='ADVS'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$ADVSAUTHORLISTALTERNATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='ART'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$ARTAUTHORLISTALTERNATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='BILL'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$BILLAUTHORLISTALTERNATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='BOOK'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$BOOKAUTHORLISTALTERNATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='CASE'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$CASEAUTHORLISTALTERNATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='CHAP'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$CHAPAUTHORLISTALTERNATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='COMP'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$COMPAUTHORLISTALTERNATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='CONF'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$CONFAUTHORLISTALTERNATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='CTLG'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$CTLGAUTHORLISTALTERNATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='DATA'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$DATAAUTHORLISTALTERNATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='ELEC'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$ELECAUTHORLISTALTERNATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='GEN'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$GENAUTHORLISTALTERNATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='HEAR'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$HEARAUTHORLISTALTERNATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='ICOMM'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$ICOMMAUTHORLISTALTERNATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='INPR'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$INPRAUTHORLISTALTERNATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='JFULL'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$JFULLAUTHORLISTALTERNATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='JOUR'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$JOURAUTHORLISTALTERNATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='MAP'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$MAPAUTHORLISTALTERNATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='MGZN'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$MGZNAUTHORLISTALTERNATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='MPCT'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$MPCTAUTHORLISTALTERNATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='MUSIC'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$MUSICAUTHORLISTALTERNATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='NEWS'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$NEWSAUTHORLISTALTERNATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='PAMP'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$PAMPAUTHORLISTALTERNATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='PAT'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$PATAUTHORLISTALTERNATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='PCOMM'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$PCOMMAUTHORLISTALTERNATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='RPRT'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$RPRTAUTHORLISTALTERNATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='SER'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$SERAUTHORLISTALTERNATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='SLIDE'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$SLIDEAUTHORLISTALTERNATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='SOUND'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$SOUNDAUTHORLISTALTERNATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='STAT'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$STATAUTHORLISTALTERNATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='THES'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$THESAUTHORLISTALTERNATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='UNBILL'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$UNBILLAUTHORLISTALTERNATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='UNPB'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$UNPBAUTHORLISTALTERNATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$reftype='VIDEO'">
      <xsl:call-template name="refdb-process-inline">
        <xsl:with-param name="style" select="$VIDEOAUTHORLISTALTERNATESTYLE"/>
      </xsl:call-template>
    </xsl:when>
  </xsl:choose>
</xsl:template>

<!-- title as author in intext citation -->

<xsl:template match="seg[@type='author'][title]" mode="INTEXT">
  <xsl:call-template name="refdb-process-inline">
    <xsl:with-param name="style" select="$INTEXTAUTHORLISTALTERNATESTYLE"/>
  </xsl:call-template>
</xsl:template>

<xsl:template match="seg[@type='author'][title]" mode="INTEXTSQ">
  <xsl:call-template name="refdb-process-inline">
    <xsl:with-param name="style" select="$INTEXTSQAUTHORLISTALTERNATESTYLE"/>
  </xsl:call-template>
</xsl:template>

<xsl:template match="seg[@type='author'][title]" mode="AUTHORONLY">
  <xsl:call-template name="refdb-process-inline">
    <xsl:with-param name="style" select="$AUTHORONLYAUTHORLISTALTERNATESTYLE"/>
  </xsl:call-template>
</xsl:template>

<xsl:template match="seg[@type='author'][title]" mode="AUTHORONLYSQ">
  <xsl:call-template name="refdb-process-inline">
    <xsl:with-param name="style" select="$AUTHORONLYSQAUTHORLISTALTERNATESTYLE"/>
  </xsl:call-template>
</xsl:template>

<xsl:template match="seg[@type='author'][title]" mode="YEARONLY">
  <xsl:call-template name="refdb-process-inline">
    <xsl:with-param name="style" select="$YEARONLYAUTHORLISTALTERNATESTYLE"/>
  </xsl:call-template>
</xsl:template>

<!-- folded multiple citation -->

<xsl:template match="seg[@type='endtermtarget']">
  <!-- do not render directly -->
</xsl:template>

</xsl:stylesheet>
