forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johannes Schaefer <>
Subject coloring table cells
Date Wed, 23 Feb 2005 09:32:04 GMT

Using the Excel-Plugin cells may be colored by putting the
color's hex value in a cell (e.g. #ff0000). We use this
feature for color tables in our styleguides.

This is done inside the plugin by writing
   <td style="background-color:#ff0000;">
to the XML output stream.

The @style attribute is not part of a valid document-v1.3
xml-document but gets passed on to HTML output,
so it works. (I guess because internally there is no more

Is there a valid way to specify a specific style for a
single element in document-v1.3 (or v2.0)?

The only way I see is to use a class attribute but this is
not possible because each and every cell may have a
different bg-color.

To display these background-colors in PDF, too, I adapted
document2fo.xsl by adding
   <xsl:attribute name="background-color">
     <xsl:value-of select="substring-before( substring-after(
                           @style, 'background-color:'),';')"
to the <fo:cell> definition.


User Interface Design GmbH * Teinacher Str. 38 * D-71634 
Fon +49 (0)7141 377 000 * Fax  +49 (0)7141 377 00-99
Geschäftsstelle: User Interface Design GmbH * 
Lehrer-Götz-Weg 11 * D-81825 München

Buch "User Interface Tuning" von Joachim Machate & Michael 

Besuchen Sie uns auf der Hannover Messe 11.-15. April 2005
Halle 2, Stand C14 auf dem MMI Gemeinschaftsstand

Nächstes TAE-Seminar zu User Interface Design
Ostfildern-Nellingen, 07.-08. April 2005 TAE-Veranstaltung Nr. 31189

View raw message