]> granicus.if.org Git - docbook-dsssl/commitdiff
Implemented patch #1075144 to make the url text in a ulink in FO
authorBob Stayton <bobs@sagehill.net>
Mon, 8 May 2006 02:10:38 +0000 (02:10 +0000)
committerBob Stayton <bobs@sagehill.net>
Mon, 8 May 2006 02:10:38 +0000 (02:10 +0000)
output an active link as well.

xsl/fo/xref.xsl

index 7494cd5626b67bfe53dbe94d29293f9b58583bab..b778940e2fca1452eac585b83b0c7d01062cb6b1 100644 (file)
 </xsl:template>
 
 <xsl:template match="ulink" name="ulink">
-  <fo:basic-link xsl:use-attribute-sets="xref.properties">
-    <xsl:attribute name="external-destination">
-      <xsl:call-template name="fo-external-image">
-        <xsl:with-param name="filename" select="@url"/>
-      </xsl:call-template>
-    </xsl:attribute>
+  <xsl:variable name ="ulink.url">
+    <xsl:call-template name="fo-external-image">
+      <xsl:with-param name="filename" select="@url"/>
+    </xsl:call-template>
+  </xsl:variable>
 
+  <fo:basic-link xsl:use-attribute-sets="xref.properties"
+                 external-destination="{$ulink.url}">
     <xsl:choose>
       <xsl:when test="count(child::node())=0">
         <xsl:call-template name="hyphenate-url">
             <fo:block>
               <xsl:call-template name="ulink.footnote.number"/>
               <xsl:text> </xsl:text>
-              <fo:inline>
+              <fo:basic-link external-destination="{$ulink.url}">
                 <xsl:value-of select="@url"/>
-              </fo:inline>
+              </fo:basic-link>
             </fo:block>
           </fo:footnote-body>
         </fo:footnote>
       <xsl:otherwise>
         <fo:inline hyphenate="false">
           <xsl:text> [</xsl:text>
-          <xsl:call-template name="hyphenate-url">
-            <xsl:with-param name="url" select="@url"/>
-          </xsl:call-template>
+          <fo:basic-link external-destination="{$ulink.url}">
+            <xsl:call-template name="hyphenate-url">
+              <xsl:with-param name="url" select="@url"/>
+            </xsl:call-template>
+          </fo:basic-link>
           <xsl:text>]</xsl:text>
         </fo:inline>
       </xsl:otherwise>
     </xsl:choose>
   </xsl:if>
+
 </xsl:template>
 
 <xsl:template name="ulink.footnote.number">