]> granicus.if.org Git - docbook-dsssl/commitdiff
Fix invalid href generated if $insert.olink.pdf.frag=0 and $fop1.extensions=1.
authorAlexey Neyman <stilor@att.net>
Fri, 25 Oct 2013 18:01:39 +0000 (18:01 +0000)
committerAlexey Neyman <stilor@att.net>
Fri, 25 Oct 2013 18:01:39 +0000 (18:01 +0000)
xsl/fo/xref.xsl

index 7d2faa0213a541d1c67c0ff6b7d5018f2bd88a3f..f4332b11c4459f1f5c0244acb3bc243b029b7806 100644 (file)
         <xsl:when test="$href != ''">
           <xsl:choose>
             <xsl:when test="$fop1.extensions != 0">
-              <xsl:variable name="mybeg" select="substring-before($href,'#')"/>
-              <xsl:variable name="myend" select="substring-after($href,'#')"/>
-              <fo:basic-link external-destination="url({concat($mybeg,'#dest=',$myend)})"
+              <xsl:variable name="href.mangled">
+                <xsl:choose>
+                  <xsl:when test="contains($href, '#')">
+                    <xsl:value-of select="concat(substring-before($href,'#'), '#dest=', substring-after($href,'#'))"/>
+                  </xsl:when>
+                  <xsl:otherwise>
+                    <xsl:value-of select="$href"/>
+                  </xsl:otherwise>
+                </xsl:choose>
+              </xsl:variable>
+              <fo:basic-link external-destination="{$href.mangled}"
                              xsl:use-attribute-sets="olink.properties">
                 <xsl:copy-of select="$hottext"/>
               </fo:basic-link>