forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johannes Schaefer <johannes.schae...@uidesign.de>
Subject coloring table cells
Date Wed, 23 Feb 2005 09:32:04 GMT
Hello!

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
validation).

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.

BTW:
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:'),';')"
     />
   </xsl:attribute>
to the <fo:cell> definition.

Cheers
Johannes


-- 
User Interface Design GmbH * Teinacher Str. 38 * D-71634 
Ludwigsburg
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
www.uidesign.de

Buch "User Interface Tuning" von Joachim Machate & Michael 
Burmester
www.user-interface-tuning.de

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

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

Mime
View raw message