OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: XSL-FO cutomization: Tables, striped

Hi List (specially Bob Stayton...)
I have read some of your book chapter for table customization, still, I
have trouble finding how I have to apply the modification.
In chapter 30, table.row.properties template, you gave an example of row
customization that allow one to get even and odd rows with different
background color. Nice, exactly what I need !
So, I added the complete template definition to my customization, and
set my table as 
<table colsep="1" frame="all" role="Tab1" rowsep="1" tabstyle="striped">
But, when I try to run the stylesheet, I can't find any reference to the
custom color...
So, digging a bit, I found that the template was called, but when I try
to get the result of 
<xsl:variable name="rownum">
    <xsl:number from="tgroup" count="row"/>

With <xsl:value-of select="$rownum"/>, I get an empty content.
Thus, I don't have the color because the 
<xsl:if test="$rownum mod 2 = 0">
  <xsl:attribute name="background-color">#EE00EE</xsl:attribute>

Thus, I assume that either the table structure is bad (see starting
definition below) or something get wrong with the customization.
<table colsep="1" frame="all" role="Tab1" rowsep="1" tabstyle="striped">
         <title>A compounds table</title>
         <tgroup cols="8">
            <colspec colname="c1"/>
            <colspec colname="c2"/>
            <colspec colname="c3"/>
            <colspec colname="c4"/>
            <colspec colname="c5"/>
            <colspec colname="c6"/>
            <colspec colname="c7"/>
            <colspec colname="c8"/>
                  <entry nameend="c2" namest="c1" role="Tab1">Client
                  <entry nameend="c4" namest="c3"
                  <entry nameend="c6" namest="c5" role="Tab1">Other
                  <entry nameend="c8" namest="c7"
                  <entry role="Tab2">Reference </entry>
                  <entry role="Tab2">Batch </entry>
                  <entry role="Tab2">FW</entry>
                  <entry role="Tab2">MW</entry>
                  <entry role="Tab2">Purity</entry>
                  <entry role="Tab2">Form</entry>
                  <entry role="Tab2">Stock</entry>
                  <entry role="Tab2">Flag</entry>
                  <entry role="Tab3"/>
                  <entry role="Tab3">batch-001</entry>
                  <entry role="Tab3">357.0</entry>
                  <entry role="Tab3">262.4</entry>
                  <entry role="Tab3">-1.0</entry>
                  <entry role="Tab3">Gel</entry>
                  <entry role="Tab3">Yes</entry>
                  <entry role="Tab3">*</entry>

Thanks and best regards,

Saxon9he, DB5

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]