]> granicus.if.org Git - docbook-dsssl/commitdiff
Bug #426166, fix duplicate id on qandaentry formatting
authoruid48421 <uid48421>
Wed, 4 Jul 2001 16:47:57 +0000 (16:47 +0000)
committeruid48421 <uid48421>
Wed, 4 Jul 2001 16:47:57 +0000 (16:47 +0000)
xsl/fo/qandaset.xsl

index bb8b6d456d9c65aac895e1d1d5a340ed391f1435..87e7aa04f9f3308ec337be7c203162c90997aeea 100644 (file)
 -->
 </xsl:template>
 
-<xsl:template match="question|answer">
+<xsl:template match="question">
   <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
   <xsl:variable name="entry.id">
     <xsl:call-template name="object.id">
   </fo:list-item>
 </xsl:template>
 
+<xsl:template match="answer">
+  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+  <xsl:variable name="entry.id">
+    <xsl:call-template name="object.id">
+      <xsl:with-param name="object" select="parent::*"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <fo:list-item xsl:use-attribute-sets="list.item.spacing">
+    <fo:list-item-label id="{$id}" end-indent="label-end()">
+      <fo:block>
+        <xsl:call-template name="question.answer.label"/>
+      </fo:block>
+    </fo:list-item-label>
+    <fo:list-item-body start-indent="body-start()">
+      <xsl:apply-templates/>
+    </fo:list-item-body>
+  </fo:list-item>
+</xsl:template>
+
 </xsl:stylesheet>