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: Re: [docbook-apps] XSL-FO cutomization: Tables, striped


Hi,
If you are using DocBook 5, then all references to element names in your XSL templates 
must have the namespace prefix, otherwise they won't match the elements in your 
documents.  So use "d:row" instead of "row", etc., where the d: prefix is declared as 
a namespace at the top of the customization stylesheet file.

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net


----- Original Message ----- 
From: "Fabien Tillier" <f.tillier@cerep.fr>
To: <docbook-apps@lists.oasis-open.org>
Sent: Wednesday, July 07, 2010 1:52 AM
Subject: [docbook-apps] 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"/>
  </xsl:variable>

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>
</xsl:if>
Fail.

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"/>
            <tbody>
               <row>
                  <entry nameend="c2" namest="c1" role="Tab1">Client
ID</entry>
                  <entry nameend="c4" namest="c3"
role="Tab1">XXXXXXXXX</entry>
                  <entry nameend="c6" namest="c5" role="Tab1">Other
ID</entry>
                  <entry nameend="c8" namest="c7"
role="Tab1">YYYYYYYYY</entry>
               </row>
   <row>
                  <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>
               </row>
               <row>
                  <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>
               </row>
</tbody>
         </tgroup>
      </table>


Thanks and best regards,
Fabien

Saxon9he, DB5


---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org





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