Переглянути джерело

Added support for striped tables in docs

G Panagiotatos 13 роки тому
батько
коміт
05e1b058dc
1 змінених файлів з 19 додано та 0 видалено
  1. 19 0
      docs/BuildTools/fo.xsl

+ 19 - 0
docs/BuildTools/fo.xsl

@@ -336,6 +336,25 @@
        </fo:inline>
 </xsl:template>
 
+<!--Special-TABLE-Striping-TEMPLATE-->
+<xsl:template name="table.row.properties">
+  <xsl:variable name="tabstyle">
+    <xsl:call-template name="tabstyle"/>
+  </xsl:variable>
+    <xsl:variable name="rownum">
+    <xsl:number from="tgroup" count="row"/>
+  </xsl:variable>
+  <xsl:choose>
+    <xsl:when test="$tabstyle = 'striped'">
+      <xsl:if test="$rownum mod 2 = 0">
+        <xsl:attribute name="background-color">#939598</xsl:attribute>
+      </xsl:if>
+    <xsl:if test="$rownum mod 2 != 0">
+      <xsl:attribute name="background-color">#bcbec0</xsl:attribute>
+    </xsl:if>
+   </xsl:when>
+ </xsl:choose>
+</xsl:template>
 
 </xsl:stylesheet>