]> granicus.if.org Git - docbook-dsssl/commitdiff
Fix bug 412487, make XSL-generated callout marks honor callout mark parameters
authorNorman Walsh <ndw@nwalsh.com>
Tue, 3 Apr 2001 11:52:59 +0000 (11:52 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Tue, 3 Apr 2001 11:52:59 +0000 (11:52 +0000)
xsl/common/gentext.xsl
xsl/common/labels.xsl
xsl/common/titles.xsl
xsl/fo/callout.xsl
xsl/html/callout.xsl

index 6c2754d5ce5a096554b9737d6080242108472068..76395044c27bae6029198a2f90ab0cd45de8e1ab 100644 (file)
     <xsl:apply-templates select="." mode="object.title.template"/>
   </xsl:variable>
 
+<!--
+  <xsl:message>
+    <xsl:text>object.title.markup: </xsl:text>
+    <xsl:value-of select="local-name(.)"/>
+    <xsl:text>: </xsl:text>
+    <xsl:value-of select="$template"/>
+  </xsl:message>
+-->
+
   <xsl:call-template name="substitute-markup">
     <xsl:with-param name="allow-anchors" select="1"/>
     <xsl:with-param name="template" select="$template"/>
index e1b8c6e8d4a8bf31d87d3339b0376b3b211d6577..af85d8faac7dfe99d936768a1bf4d64b578bd843 100644 (file)
@@ -168,6 +168,12 @@ element label.</para>
     </xsl:if>
   </xsl:if>
 
+<!--
+  <xsl:message>
+    <xsl:value-of select="$label"/>, <xsl:number count="section"/>
+  </xsl:message>
+-->
+
   <xsl:choose>
     <xsl:when test="@label">
       <xsl:value-of select="@label"/>
index 4af1cc3a9027d4baecfb2ecd622c2d69e2af88b9..dc6a33322f2f94886b376f4edc1148e8068b4507 100644 (file)
@@ -254,8 +254,8 @@ title of the element. This does not include the label.
       </xsl:apply-templates>
     </xsl:when>
     <xsl:otherwise>
-      <xsl:call-template name="gentext.element.name">
-        <xsl:with-param name="element.name" select="name(.)"/>
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'Abstract'"/>
       </xsl:call-template>
     </xsl:otherwise>
   </xsl:choose>
index 6862916f33c472fe80bbf209898778e8e222f97c..e00f98d74f9fad0b0fc0e3ebefef1936bfa72231 100644 (file)
   <xsl:choose>
     <!-- Draw callouts as images -->
     <xsl:when test="$callout.graphics != '0'
-                  and $conum &lt;= $callout.graphics.number.limit">
+                    and $conum &lt;= $callout.graphics.number.limit">
       <fo:external-graphic
           src="{$callout.graphics.path}{$conum}{$callout.graphics.extension}"/>
     </xsl:when>
 
+    <xsl:when test="$callout.unicode != 0
+                    and $conum &lt;= $callout.unicode.number.limit">
+      <xsl:choose>
+        <xsl:when test="$callout.unicode.start.character = 10102">
+          <xsl:choose>
+            <xsl:when test="$conum = 1">&#10102;</xsl:when>
+            <xsl:when test="$conum = 2">&#10103;</xsl:when>
+            <xsl:when test="$conum = 3">&#10104;</xsl:when>
+            <xsl:when test="$conum = 4">&#10105;</xsl:when>
+            <xsl:when test="$conum = 5">&#10106;</xsl:when>
+            <xsl:when test="$conum = 6">&#10107;</xsl:when>
+            <xsl:when test="$conum = 7">&#10108;</xsl:when>
+            <xsl:when test="$conum = 8">&#10109;</xsl:when>
+            <xsl:when test="$conum = 9">&#10110;</xsl:when>
+            <xsl:when test="$conum = 10">&#10111;</xsl:when>
+          </xsl:choose>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:message>
+            <xsl:text>Don't know how to generate Unicode callouts </xsl:text>
+            <xsl:text>when $callout.unicode.start.character is </xsl:text>
+            <xsl:value-of select="$callout.unicode.start.character"/>
+          </xsl:message>
+          <fo:inline background-color="#404040"
+                     color="white"
+                     padding-top="0.1em"
+                     padding-bottom="0.1em"
+                     padding-start="0.2em"
+                     padding-end="0.2em"
+                     baseline-shift="0.1em"
+                     font-family="Times"
+                     font-weight="bold"
+                     font-size="75%">
+            <xsl:value-of select="$conum"/>
+          </fo:inline>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+
     <!-- Pick callouts from Zapf Dingbats - max 10 -->
     <xsl:when test="$callout.dingbats != '0' and $conum &lt;= 10">
       <fo:inline font-family="ZapfDingbats">
       </fo:inline>
     </xsl:when>
 
-    <!-- FIXME: how do I do callout.unicode here? -->
-
     <!-- Most safe: draw a dark gray square with a white number inside -->
     <xsl:otherwise>
       <fo:inline background-color="#404040"
index 242b3a48f61ad2a5983eea7d7a73ecec63c4c9ef..cb289adbfe2cf324901acdec14533d889eeb01d5 100644 (file)
   <xsl:param name="conum" select='1'/>
 
   <xsl:choose>
-    <xsl:when test="$callout.graphics = '0'
-                    or $conum > $callout.graphics.number.limit">
-
+    <xsl:when test="$callout.graphics != 0
+                    and $conum &lt;= $callout.graphics.number.limit">
+      <img src="{$callout.graphics.path}{$conum}{$callout.graphics.extension}"
+           alt="{$conum}" border="0"/>
+    </xsl:when>
+    <xsl:when test="$callout.unicode != 0
+                    and $conum &lt;= $callout.unicode.number.limit">
+      <xsl:choose>
+        <xsl:when test="$callout.unicode.start.character = 10102">
+          <xsl:choose>
+            <xsl:when test="$conum = 1">&#10102;</xsl:when>
+            <xsl:when test="$conum = 2">&#10103;</xsl:when>
+            <xsl:when test="$conum = 3">&#10104;</xsl:when>
+            <xsl:when test="$conum = 4">&#10105;</xsl:when>
+            <xsl:when test="$conum = 5">&#10106;</xsl:when>
+            <xsl:when test="$conum = 6">&#10107;</xsl:when>
+            <xsl:when test="$conum = 7">&#10108;</xsl:when>
+            <xsl:when test="$conum = 8">&#10109;</xsl:when>
+            <xsl:when test="$conum = 9">&#10110;</xsl:when>
+            <xsl:when test="$conum = 10">&#10111;</xsl:when>
+          </xsl:choose>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:message>
+            <xsl:text>Don't know how to generate Unicode callouts </xsl:text>
+            <xsl:text>when $callout.unicode.start.character is </xsl:text>
+            <xsl:value-of select="$callout.unicode.start.character"/>
+          </xsl:message>
+          <xsl:text>(</xsl:text>
+          <xsl:value-of select="$conum"/>
+          <xsl:text>)</xsl:text>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
       <xsl:text>(</xsl:text>
       <xsl:value-of select="$conum"/>
       <xsl:text>)</xsl:text>
-    </xsl:when>
-    <xsl:otherwise>
-      <img src="{$callout.graphics.path}{$conum}{$callout.graphics.extension}"
-           alt="{$conum}" border="0"/>
     </xsl:otherwise>
   </xsl:choose>
 </xsl:template>