]> granicus.if.org Git - docbook-dsssl/commitdiff
Improve formatting of ulink footnotes; provide template to override formatting; use...
authorNorman Walsh <ndw@nwalsh.com>
Mon, 20 Jan 2003 17:19:30 +0000 (17:19 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Mon, 20 Jan 2003 17:19:30 +0000 (17:19 +0000)
xsl/fo/xref.xsl

index 7d9b6026cfb341d3422b0772c1dbf5c7c49673d9..b1f91795023aead4a2b5e5111bb9bd627774f57e 100644 (file)
   </xsl:apply-templates>
 </xsl:template>
 
+<xsl:template match="glossentry" mode="xref-to">
+  <xsl:choose>
+    <xsl:when test="$glossentry.show.acronym = 'primary'">
+      <xsl:choose>
+        <xsl:when test="acronym|abbrev">
+          <xsl:apply-templates select="(acronym|abbrev)[1]"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:apply-templates select="glossterm[1]" mode="xref-to"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates select="glossterm[1]" mode="xref-to"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="glossterm" mode="xref-to">
+  <xsl:apply-templates/>
+</xsl:template>
+
 <xsl:template match="index" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
     <!-- yes, show the URI -->
     <xsl:choose>
       <xsl:when test="$ulink.footnotes != 0 and not(ancestor::footnote)">
-        <xsl:variable name="ulink.fn.mark">
-          <fo:inline>
-            <!-- FIXME: this isn't going to be perfect! -->
-            <xsl:text>[</xsl:text>
-            <xsl:number level="any"
-                        from="chapter|appendix|preface|article|refentry"
-                        format="1"/>
-            <xsl:text>]</xsl:text>
-          </fo:inline>
-        </xsl:variable>
-
         <fo:footnote>
-          <fo:inline font-size="90%">
-            <xsl:copy-of select="$ulink.fn.mark"/>
-          </fo:inline>
+          <xsl:call-template name="ulink.footnote.number"/>
           <fo:footnote-body font-family="{$body.font.family}"
                             font-size="{$footnote.font.size}">
             <fo:block>
-              <fo:inline font-size="90%">
-                <xsl:copy-of select="$ulink.fn.mark"/>
-                <xsl:text> </xsl:text>
-              </fo:inline>
+              <xsl:call-template name="ulink.footnote.number"/>
+              <xsl:text> </xsl:text>
               <fo:inline>
                 <xsl:value-of select="@url"/>
               </fo:inline>
   </xsl:if>
 </xsl:template>
 
+<xsl:template name="ulink.footnote.number">
+  <fo:inline font-size="90%">
+    <!-- FIXME: this isn't going to be perfect! -->
+    <xsl:text>[</xsl:text>
+    <xsl:number level="any"
+                from="chapter|appendix|preface|article|refentry"
+                format="{$ulink.footnote.number.format}"/>
+    <xsl:text>]</xsl:text>
+  </fo:inline>
+</xsl:template>
+
 <xsl:template name="hyphenate-url">
   <xsl:param name="url" select="''"/>
   <xsl:choose>