]> granicus.if.org Git - docbook-dsssl/commitdiff
Citations to nonexistent biblioentries do not issue warning.
authorJirka Kosek <jirka@kosek.cz>
Wed, 6 Sep 2006 09:20:33 +0000 (09:20 +0000)
committerJirka Kosek <jirka@kosek.cz>
Wed, 6 Sep 2006 09:20:33 +0000 (09:20 +0000)
xsl/fo/inline.xsl
xsl/html/inline.xsl

index e761080ba25424b22e0bd10538ff77ca19d1c006..4dcc3c67de84a568a0a7459417d07a8fc8918a2b 100644 (file)
 </xsl:template>
 
 <xsl:template match="citation">
-  <!-- todo: biblio-citation-check -->
-  <xsl:text>[</xsl:text>
-  <xsl:call-template name="inline.charseq"/>
-  <xsl:text>]</xsl:text>
+  <!-- todo: integrate with bibliography collection -->
+  <xsl:variable name="targets" select="(//biblioentry | //bibliomixed)[abbrev = string(current())]"/>
+
+  <xsl:choose>
+    <xsl:when test="$targets">
+      <xsl:call-template name="xref">
+       <xsl:with-param name="targets" select="$targets"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:text>[</xsl:text>
+      <xsl:call-template name="inline.charseq"/>
+      <xsl:text>]</xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
 </xsl:template>
 
 <!-- ==================================================================== -->
index 5b56ee260e159cbc71ff428e5968e1de1394f97d..ee20053bedbc3ab38247714c8d02e9bf53cd8e7e 100644 (file)
       </xsl:call-template>
     </xsl:when>
     <xsl:otherwise>
-      <xsl:message>
-       <xsl:text>Citation to nonexistent publication abbrev: </xsl:text>
-        <xsl:value-of select="."/>
-      </xsl:message>
       <xsl:text>[</xsl:text>
       <xsl:call-template name="inline.charseq"/>
       <xsl:text>]</xsl:text>