]> granicus.if.org Git - docbook-dsssl/commitdiff
Added placeholder templates table.cell.properties and
authorBob Stayton <bobs@sagehill.net>
Sat, 22 May 2004 06:37:09 +0000 (06:37 +0000)
committerBob Stayton <bobs@sagehill.net>
Sat, 22 May 2004 06:37:09 +0000 (06:37 +0000)
table.cell.block.properties to enable adding properties
to any fo:table-cell or the cell's fo:block.

xsl/fo/table.xsl

index 6445f8daf5518ec068134d06183bcf25a2ebbf21..25ef7e0db6881a1c72905f310ea60caf286a3f0c 100644 (file)
@@ -423,10 +423,7 @@ to be incomplete. Don't forget to read the source, too :-)</para>
     <xsl:otherwise>
       <xsl:variable name="cell.content">
         <fo:block>
-          <!-- highlight this entry? -->
-          <xsl:if test="ancestor::thead">
-            <xsl:attribute name="font-weight">bold</xsl:attribute>
-          </xsl:if>
+          <xsl:call-template name="table.cell.block.properties"/>
 
           <!-- are we missing any indexterms? -->
           <xsl:if test="not(preceding-sibling::entry)
@@ -532,6 +529,7 @@ to be incomplete. Don't forget to read the source, too :-)</para>
       </xsl:variable>
 
       <fo:table-cell xsl:use-attribute-sets="table.cell.padding">
+        <xsl:call-template name="table.cell.properties"/>
         <xsl:if test="$xep.extensions != 0">
           <!-- Suggested by RenderX to workaround a bug in their implementation -->
           <!--          <xsl:attribute name="keep-together.within-column">always</xsl:attribute> -->
@@ -643,6 +641,18 @@ to be incomplete. Don't forget to read the source, too :-)</para>
   </xsl:choose>
 </xsl:template>
 
+<!-- Expand this template to add properties to any fo:table-cell -->
+<xsl:template name="table.cell.properties">
+</xsl:template>
+
+<!-- Expand this template to add properties to any cell's block -->
+<xsl:template name="table.cell.block.properties">
+  <!-- highlight this entry? -->
+  <xsl:if test="ancestor::thead">
+    <xsl:attribute name="font-weight">bold</xsl:attribute>
+  </xsl:if>
+</xsl:template>
+
 <xsl:template match="entry|entrytbl" name="sentry" mode="span">
   <xsl:param name="col" select="1"/>
   <xsl:param name="spans"/>