]> granicus.if.org Git - docbook-dsssl/commitdiff
fix bug #133 Citation linking to abbrev should ignore whitespace
authorbobstayton <bobs@sagehill.net>
Fri, 22 Feb 2019 22:08:55 +0000 (14:08 -0800)
committerbobstayton <bobs@sagehill.net>
Sat, 23 Feb 2019 01:14:39 +0000 (17:14 -0800)
xsl/fo/inline.xsl
xsl/html/inline.xsl

index 927811c4620f5d01e61976f4d890b5731058f592..7a9016591849c0847549bc2396c9064498056956 100644 (file)
 
 <xsl:template match="d:citation">
   <!-- todo: integrate with bibliography collection -->
-  <xsl:variable name="targets" select="(//d:biblioentry | //d:bibliomixed)[d:abbrev = string(current())]"/>
+  <xsl:variable name="targets" select="(//d:biblioentry | //d:bibliomixed)[normalize-space(d:abbrev) = normalize-space(string(current()))]"/>
   <xsl:variable name="target" select="$targets[1]"/>
 
   <xsl:choose>
 </xsl:template>
 
 <xsl:template match="d:citebiblioid">
-  <xsl:variable name="targets" select="//*[d:biblioid = string(current())]"/>
+  <xsl:variable name="targets" select="//*[normalize-space(d:biblioid) = normalize-space(string(current()))]"/>
   <xsl:variable name="target" select="$targets[1]"/>
 
   <xsl:choose>
index 36dd7347696da20801a53ae6cc3d95a3ceb1b010..81c5c1b77a297cf935fe556c77a68cf573697df6 100644 (file)
 
 <xsl:template match="d:citation">
   <!-- todo: integrate with bibliography collection -->
-  <xsl:variable name="targets" select="(//d:biblioentry | //d:bibliomixed)[d:abbrev = string(current())]"/>
+  <xsl:variable name="targets" select="(//d:biblioentry | //d:bibliomixed)[normalize-space(d:abbrev) = normalize-space(string(current()))]"/>
   <xsl:variable name="target" select="$targets[1]"/>
 
   <xsl:choose>
 </xsl:template>
 
 <xsl:template match="d:citebiblioid">
-  <xsl:variable name="targets" select="//*[d:biblioid = string(current())]"/>
+  <xsl:variable name="targets" select="//*[normalize-space(d:biblioid) = normalize-space(string(current()))]"/>
   <xsl:variable name="target" select="$targets[1]"/>
 
   <xsl:choose>