On 12/30/2010 12:07 PM, Alberto Perri wrote: > > I have been spending hours on this. Somewhere within > the XSL sheets the default setting is center.
No, the text-align property is not specified for table cells. Therefore, by default, the text is aligned to the left. > > I have placed this code in my customization file > > <xsl:attribute-set name="entry"> > <xsl:attribute name="text-align">left</xsl:attribute> > <xsl:attribute name="border-color">#404040</xsl:attribute> > <xsl:attribute name="padding">0.2em</xsl:attribute> > </xsl:attribute-set> > > > And this > > > <xsl:attribute-set name="header-entry" use-attribute-sets="entry"> > <xsl:attribute name="text-align">left</xsl:attribute> > <xsl:attribute name="font-weight">bold</xsl:attribute> > <xsl:attribute name="background-color">#E0E0E0</xsl:attribute> > </xsl:attribute-set> > > but the <xsl:attribute name="text-align">left</xsl:attribute> has no > effect. > I know that my customization file is being applied because i can change > the background color of a table header. > > Could you please be so kind to let me know how to align text in tables > left. I would like to align text both in table headers and table rows to > the left. > My only explanation is that your table elements makes use of the @align attribute and always set this attribute to "center". When this is the case, <xsl:attribute name="text-align">left</xsl:attribute> does not matter because it is superseded by what's specified in the @align attribute. See attached files: TestTables.dita - DITA source file TestTables.pdf - Conversion to PDF by ditac+XEP. TestTables.odt - Conversion to OpenDocument by ditac+XFC.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA 1.1 Topic//EN"
"topic.dtd">
<topic id="TestTables">
<title>Tests table align</title>
<body>
<table>
<title>This table does not make use of the <tt>@align</tt> attribute:
text is indeed aligned to the left</title>
<tgroup cols="2">
<tbody>
<row>
<entry>1,1</entry>
<entry>1,2</entry>
</row>
<row>
<entry>2,1</entry>
<entry>2,2</entry>
</row>
</tbody>
</tgroup>
</table>
<table>
<title>This table makes use of the <tt>@align</tt> attribute in a
<tt>colspec</tt> (where <tt>@align=center</tt>) for the first column and
in the <tt>entry</tt> elements of the second column</title>
<tgroup cols="2">
<colspec align="center"/>
<tbody>
<row>
<entry>1,1</entry>
<entry align="center">1,2 (<tt>@align=center</tt>)</entry>
</row>
<row>
<entry>2,1</entry>
<entry align="right">2,2 (<tt>@align=right</tt>)</entry>
</row>
</tbody>
</tgroup>
</table>
</body>
</topic>
TestTables.odt
Description: application/vnd.oasis.opendocument.text
TestTables.pdf
Description: Adobe PDF document
-- XMLmind DITA Converter Support List [email protected] http://www.xmlmind.com/mailman/listinfo/ditac-support

