]> granicus.if.org Git - docbook-dsssl/commitdiff
Fix bug in question template that output empty list-item-label when
authorBob Stayton <bobs@sagehill.net>
Fri, 5 Apr 2013 16:50:38 +0000 (16:50 +0000)
committerBob Stayton <bobs@sagehill.net>
Fri, 5 Apr 2013 16:50:38 +0000 (16:50 +0000)
defaultlabel = 'none'.

xsl/fo/qandaset.xsl

index f6c4d3948445251d12de1c7a56fbff52ae9ccf01..5e81d285f32bd877848a4814120b27147c4efb26 100644 (file)
 
   <fo:list-item id="{$entry.id}" xsl:use-attribute-sets="list.item.spacing">
     <fo:list-item-label id="{$id}" end-indent="label-end()">
-        <xsl:if test="string-length($label.content) &gt; 0">
-                       <fo:block font-weight="bold">
-                         <xsl:copy-of select="$label.content"/>          
-                       </fo:block>
-        </xsl:if>
+      <xsl:choose>
+        <xsl:when test="string-length($label.content) &gt; 0">
+          <fo:block font-weight="bold">
+            <xsl:copy-of select="$label.content"/>          
+          </fo:block>
+        </xsl:when>
+        <xsl:otherwise>
+          <fo:block/>
+        </xsl:otherwise>
+      </xsl:choose>
     </fo:list-item-label>
     <fo:list-item-body start-indent="body-start()">
       <xsl:choose>
     <fo:list-item-label id="{$id}" end-indent="label-end()">
       <xsl:choose>
         <xsl:when test="string-length($answer.label) &gt; 0">
-                       <fo:block font-weight="bold">
-                         <xsl:copy-of select="$answer.label"/>
-                       </fo:block>
+          <fo:block font-weight="bold">
+            <xsl:copy-of select="$answer.label"/>
+          </fo:block>
         </xsl:when>
         <xsl:otherwise>
-                       <fo:block/>
+          <fo:block/>
         </xsl:otherwise>
       </xsl:choose>
     </fo:list-item-label>