]> granicus.if.org Git - docbook-dsssl/commitdiff
Make citations numbered if bibliography.numbered != 0.
authorMauritz Jeanson <mj@johanneberg.com>
Sun, 29 Apr 2007 10:47:33 +0000 (10:47 +0000)
committerMauritz Jeanson <mj@johanneberg.com>
Sun, 29 Apr 2007 10:47:33 +0000 (10:47 +0000)
xsl/fo/inline.xsl
xsl/html/inline.xsl

index 42817128c9fa38b252bfd488ecaae3b4dc7922d8..c941308279f027741bdc76b59ac49e0293ce58df 100644 (file)
           </xsl:call-template>
         </xsl:attribute>
 
-        <xsl:call-template name="inline.charseq"/>
+       <xsl:choose>
+         <xsl:when test="$bibliography.numbered != 0">
+           <xsl:apply-templates select="$target" mode="citation"/>
+         </xsl:when>
+         <xsl:otherwise>
+           <xsl:call-template name="inline.charseq"/>
+         </xsl:otherwise>
+       </xsl:choose>
+     
       </fo:basic-link>
       <xsl:text>]</xsl:text>
     </xsl:when>
   </xsl:choose>
 </xsl:template>
 
+<xsl:template match="biblioentry|bibliomixed" mode="citation">
+  <xsl:number from="bibliography" count="biblioentry|bibliomixed"
+             level="any" format="1"/>
+</xsl:template>
+
 <!-- ==================================================================== -->
 
 <xsl:template match="comment[&comment.block.parents;]|remark[&comment.block.parents;]">
index 6529e56e90fc9524a3f60ee5c4d8d50b0ccdc655..0e508250911ba449adf4c855177674dc78fc3b94 100644 (file)
           </xsl:call-template>
         </xsl:attribute>
 
-        <xsl:call-template name="inline.charseq"/>
+       <xsl:choose>
+         <xsl:when test="$bibliography.numbered != 0">
+           <xsl:apply-templates select="$target" mode="citation"/>
+         </xsl:when>
+         <xsl:otherwise>
+           <xsl:call-template name="inline.charseq"/>
+         </xsl:otherwise>
+       </xsl:choose>
+
       </a>
       <xsl:text>]</xsl:text>
     </xsl:when>
   </xsl:choose>
 </xsl:template>
 
+<xsl:template match="biblioentry|bibliomixed" mode="citation">
+  <xsl:number from="bibliography" count="biblioentry|bibliomixed"
+             level="any" format="1"/>
+</xsl:template>
+
 <!-- ==================================================================== -->
 
 <xsl:template match="comment[&comment.block.parents;]|remark[&comment.block.parents;]">