]> granicus.if.org Git - docbook-dsssl/commitdiff
Changed graphical.admonition template from an fo:table
authorBob Stayton <bobs@sagehill.net>
Fri, 15 Nov 2002 05:16:28 +0000 (05:16 +0000)
committerBob Stayton <bobs@sagehill.net>
Fri, 15 Nov 2002 05:16:28 +0000 (05:16 +0000)
to an fo:list-block, so it works in both FOP and XEP.

xsl/fo/admon.xsl

index 63f4199971af6dcb83b32131c2539ef5e77853a5..0f6f7c5d2703fc63adec115a03271af46be0fa65 100644 (file)
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
+  <xsl:variable name="graphic.width">
+     <xsl:call-template name="admon.graphic.width"/>
+  </xsl:variable>
 
   <fo:block id="{$id}">
-    <fo:table>
-      <fo:table-body>
-        <fo:table-row>
-          <fo:table-cell number-rows-spanned="2">
+    <fo:list-block provisional-distance-between-starts="{$graphic.width} + 18pt"
+               provisional-label-separation="18pt"
+               xsl:use-attribute-sets="list.block.spacing">
+      <fo:list-item>
+          <fo:list-item-label end-indent="label-end()">
             <fo:block>
-              <fo:external-graphic width="auto" height="auto">
+              <fo:external-graphic width="auto" height="auto"
+                                  content-width="{$graphic.width}" >
                 <xsl:attribute name="src">
                   <xsl:call-template name="admon.graphic"/>
                 </xsl:attribute>
-                <xsl:attribute name="content-width">
-                  <xsl:call-template name="admon.graphic.width"/>
-                </xsl:attribute>
               </fo:external-graphic>
             </fo:block>
-          </fo:table-cell>
-          <fo:table-cell>
+          </fo:list-item-label>
+          <fo:list-item-body start-indent="body-start()">
             <fo:block xsl:use-attribute-sets="admonition.title.properties">
               <xsl:apply-templates select="." mode="object.title.markup"/>
             </fo:block>
-          </fo:table-cell>
-        </fo:table-row>
-        <fo:table-row>
-          <fo:table-cell number-columns-spanned="2">
             <fo:block xsl:use-attribute-sets="admonition.properties">
               <xsl:apply-templates/>
             </fo:block>
-          </fo:table-cell>
-        </fo:table-row>
-      </fo:table-body>
-    </fo:table>
+          </fo:list-item-body>
+      </fo:list-item>
+    </fo:list-block>
   </fo:block>
 </xsl:template>