]> granicus.if.org Git - docbook-dsssl/commitdiff
Bug 992905: fixed ugly interaction between bibliography.collection and bibliography...
authorNorman Walsh <ndw@nwalsh.com>
Sun, 17 Oct 2004 20:15:55 +0000 (20:15 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Sun, 17 Oct 2004 20:15:55 +0000 (20:15 +0000)
xsl/fo/biblio.xsl
xsl/html/biblio.xsl

index 8a3c408cd1be6ccbea2481b57a049149e4496cd7..9d4e5b4e898ccc5dd817a4f7e874726d999b8571 100644 (file)
 <!-- ==================================================================== -->
 
 <xsl:template match="biblioentry">
-  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+  <xsl:param name="label">
+    <xsl:call-template name="biblioentry.label"/>
+  </xsl:param>
+
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
   <xsl:choose>
     <xsl:when test="string(.) = ''">
       <xsl:variable name="bib" select="document($bibliography.collection,.)"/>
       <xsl:variable name="entry" select="$bib/bibliography/*[@id=$id][1]"/>
       <xsl:choose>
         <xsl:when test="$entry">
-          <xsl:apply-templates select="$entry"/>
+         <xsl:choose>
+           <xsl:when test="$bibliography.numbered != 0">
+             <xsl:apply-templates select="$entry">
+               <xsl:with-param name="label" select="$label"/>
+             </xsl:apply-templates>
+           </xsl:when>
+           <xsl:otherwise>
+             <xsl:apply-templates select="$entry"/>
+           </xsl:otherwise>
+         </xsl:choose>
         </xsl:when>
         <xsl:otherwise>
           <xsl:message>
     <xsl:otherwise>
       <fo:block id="{$id}" xsl:use-attribute-sets="normal.para.spacing"
                 start-indent="0.5in" text-indent="-0.5in">
-        <xsl:call-template name="biblioentry.label"/>
+       <xsl:copy-of select="$label"/>
         <xsl:apply-templates mode="bibliography.mode"/>
       </fo:block>
     </xsl:otherwise>
 </xsl:template>
 
 <xsl:template match="bibliomixed">
-  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+  <xsl:param name="label">
+    <xsl:call-template name="biblioentry.label"/>
+  </xsl:param>
+
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
   <xsl:choose>
     <xsl:when test="string(.) = ''">
       <xsl:variable name="bib" select="document($bibliography.collection,.)"/>
       <xsl:variable name="entry" select="$bib/bibliography/*[@id=$id][1]"/>
       <xsl:choose>
         <xsl:when test="$entry">
-          <xsl:apply-templates select="$entry"/>
+         <xsl:choose>
+           <xsl:when test="$bibliography.numbered != 0">
+             <xsl:apply-templates select="$entry">
+               <xsl:with-param name="label" select="$label"/>
+             </xsl:apply-templates>
+           </xsl:when>
+           <xsl:otherwise>
+             <xsl:apply-templates select="$entry"/>
+           </xsl:otherwise>
+         </xsl:choose>
         </xsl:when>
         <xsl:otherwise>
           <xsl:message>
     <xsl:otherwise>
       <fo:block id="{$id}" xsl:use-attribute-sets="normal.para.spacing"
                 start-indent="0.5in" text-indent="-0.5in">
-        <xsl:call-template name="biblioentry.label"/>
+       <xsl:copy-of select="$label"/>
         <xsl:apply-templates mode="bibliomixed.mode"/>
       </fo:block>
     </xsl:otherwise>
index dcced59b5cb4561fdcd4f95dad4eb60b64c385c4..9ff9fa366a072207549134c244734cb2024521f5 100644 (file)
 <!-- ==================================================================== -->
 
 <xsl:template match="biblioentry">
+  <xsl:param name="label">
+    <xsl:call-template name="biblioentry.label"/>
+  </xsl:param>
+
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
       <xsl:variable name="entry" select="$bib/bibliography/*[@id=$id][1]"/>
       <xsl:choose>
         <xsl:when test="$entry">
-          <xsl:apply-templates select="$entry"/>
+         <xsl:choose>
+           <xsl:when test="$bibliography.numbered != 0">
+             <xsl:apply-templates select="$entry">
+               <xsl:with-param name="label" select="$label"/>
+             </xsl:apply-templates>
+           </xsl:when>
+           <xsl:otherwise>
+             <xsl:apply-templates select="$entry"/>
+           </xsl:otherwise>
+         </xsl:choose>
         </xsl:when>
         <xsl:otherwise>
           <xsl:message>
           <div class="{name(.)}">
             <xsl:call-template name="anchor"/>
             <p>
-              <xsl:call-template name="biblioentry.label"/>
+             <xsl:copy-of select="$label"/>
               <xsl:text>Error: no bibliography entry: </xsl:text>
               <xsl:value-of select="$id"/>
               <xsl:text> found in </xsl:text>
       <div class="{name(.)}">
         <xsl:call-template name="anchor"/>
         <p>
-          <xsl:call-template name="biblioentry.label"/>
+         <xsl:copy-of select="$label"/>
           <xsl:apply-templates mode="bibliography.mode"/>
         </p>
       </div>
 </xsl:template>
 
 <xsl:template match="bibliomixed">
+  <xsl:param name="label">
+    <xsl:call-template name="biblioentry.label"/>
+  </xsl:param>
+
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
       <xsl:variable name="entry" select="$bib/bibliography/*[@id=$id][1]"/>
       <xsl:choose>
         <xsl:when test="$entry">
-          <xsl:apply-templates select="$entry"/>
+         <xsl:choose>
+           <xsl:when test="$bibliography.numbered != 0">
+             <xsl:apply-templates select="$entry">
+               <xsl:with-param name="label" select="$label"/>
+             </xsl:apply-templates>
+           </xsl:when>
+           <xsl:otherwise>
+             <xsl:apply-templates select="$entry"/>
+           </xsl:otherwise>
+         </xsl:choose>
         </xsl:when>
         <xsl:otherwise>
           <xsl:message>
           <div class="{name(.)}">
             <xsl:call-template name="anchor"/>
             <p>
-              <xsl:call-template name="biblioentry.label"/>
+             <xsl:copy-of select="$label"/>
               <xsl:text>Error: no bibliography entry: </xsl:text>
               <xsl:value-of select="$id"/>
               <xsl:text> found in </xsl:text>
       <div class="{name(.)}">
         <xsl:call-template name="anchor"/>
         <p class="{name(.)}">
-          <xsl:call-template name="biblioentry.label"/>
+         <xsl:copy-of select="$label"/>
           <xsl:apply-templates mode="bibliomixed.mode"/>
         </p>
       </div>