]> granicus.if.org Git - docbook-dsssl/commitdiff
Improve formatting of glossseealso
authorNorman Walsh <ndw@nwalsh.com>
Mon, 16 Apr 2001 13:02:59 +0000 (13:02 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Mon, 16 Apr 2001 13:02:59 +0000 (13:02 +0000)
xsl/fo/glossary.xsl

index bcf35f7feb38d73dc241c6907b0ae4d42a481b91..71becc221c03fe9b04d5de00d61f94ff82b677f0 100644 (file)
@@ -233,7 +233,16 @@ GlossEntry ::=
 
 <xsl:template match="glossentry/glossdef">
   <fo:list-item-body start-indent="body-start()">
-    <xsl:apply-templates/>
+    <xsl:apply-templates select="*[local-name(.) != 'glossseealso']"/>
+    <xsl:if test="glossseealso">
+      <fo:block>
+        <xsl:call-template name="gentext.template">
+          <xsl:with-param name="context" select="'glossary'"/>
+          <xsl:with-param name="name" select="'seealso'"/>
+        </xsl:call-template>
+        <xsl:apply-templates select="glossseealso"/>
+      </fo:block>
+    </xsl:if>
   </fo:list-item-body>
 </xsl:template>
 
@@ -247,21 +256,24 @@ GlossEntry ::=
   <xsl:variable name="otherterm" select="@otherterm"/>
   <xsl:variable name="targets" select="//node()[@id=$otherterm]"/>
   <xsl:variable name="target" select="$targets[1]"/>
-  <fo:block>
-    <xsl:call-template name="gentext.template">
-      <xsl:with-param name="context" select="'glossary'"/>
-      <xsl:with-param name="name" select="'seealso'"/>
-    </xsl:call-template>
-    <xsl:choose>
-      <xsl:when test="@otherterm">
-        <xsl:apply-templates select="$target" mode="xref"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:apply-templates/>
-      </xsl:otherwise>
-    </xsl:choose>
-    <xsl:text>.</xsl:text>
-  </fo:block>
+
+  <xsl:choose>
+    <xsl:when test="@otherterm">
+      <xsl:apply-templates select="$target" mode="xref"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates/>
+    </xsl:otherwise>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="position() = last()">
+      <xsl:text>.</xsl:text>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:text>, </xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
 </xsl:template>
 
 <!-- ==================================================================== -->