]> granicus.if.org Git - docbook-dsssl/commitdiff
Added support for spacing="compact" in variablelist, per bug report #1722540.
authorBob Stayton <bobs@sagehill.net>
Fri, 25 May 2007 22:35:00 +0000 (22:35 +0000)
committerBob Stayton <bobs@sagehill.net>
Fri, 25 May 2007 22:35:00 +0000 (22:35 +0000)
xsl/fo/lists.xsl

index bd3fc537371a40be4c0b11d60fb69b453cedb50a..487ce2fe50922327ba13d63e22870f2cca2c945f 100644 (file)
   </fo:list-item>
 </xsl:template>
 
+<xsl:template match="varlistentry" mode="vl.as.list">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+  <xsl:variable name="item.contents">
+    <fo:list-item-label end-indent="label-end()" text-align="start">
+      <fo:block>
+        <xsl:apply-templates select="term"/>
+      </fo:block>
+    </fo:list-item-label>
+    <fo:list-item-body start-indent="body-start()">
+      <fo:block>
+        <xsl:apply-templates select="listitem"/>
+      </fo:block>
+    </fo:list-item-body>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="parent::*/@spacing = 'compact'">
+      <fo:list-item id="{$id}"
+          xsl:use-attribute-sets="compact.list.item.spacing">
+        <xsl:copy-of select="$item.contents"/>
+      </fo:list-item>
+    </xsl:when>
+    <xsl:otherwise>
+      <fo:list-item id="{$id}" xsl:use-attribute-sets="list.item.spacing">
+        <xsl:copy-of select="$item.contents"/>
+      </fo:list-item>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+
 <xsl:template match="variablelist" mode="vl.as.blocks">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>