Rotate Text in Table Header

Post here questions and problems related to editing and publishing DITA content.
Tinmen
Posts: 21
Joined: Wed Jun 28, 2023 11:49 pm

Rotate Text in Table Header

Post by Tinmen »

Using the following code, I can rotate text in table body cells but not in table header cells. I am setting the attribute to

Code: Select all

 rotate="1"
in both cases.

Code: Select all

<thead>
 <row>
<entry rotate="1">Description</entry>
</row>
</thead>
and

Code: Select all

<tbody>
<row>
<entry rotate="1">Rotate this text.</entry>
</row>
</tbody>
XSL Code

Code: Select all

<xsl:template match="*[contains(@class, ' topic/thead ')]/*[contains(@class, ' topic/row ')]/*[contains(@class, ' topic/entry ')]" mode="rotateTableEntryContent">
    <fo:block-container reference-orientation="-90" width="150px" height="80px">
      <fo:block xsl:use-attribute-sets="thead.row.entry__content">
        <xsl:apply-templates select="." mode="ancestor-start-flag"/>
        <xsl:call-template name="processEntryContent"/>
        <xsl:apply-templates select="." mode="ancestor-end-flag"/>
      </fo:block>
    </fo:block-container>
  </xsl:template>
  <xsl:template match="*[contains(@class, ' topic/tbody ')]/*[contains(@class, ' topic/row ')]/*[contains(@class, ' topic/entry ')]" mode="rotateTableEntryContent">
    <fo:block-container reference-orientation="-90" width="120px" height="50px" margin-left="25%" white-space="nowrap">
      <fo:block xsl:use-attribute-sets="tbody.row.entry__content">
        <xsl:apply-templates select="." mode="ancestor-start-flag"/>
        <xsl:call-template name="processEntryContent"/>
        <xsl:apply-templates select="." mode="ancestor-end-flag"/>
      </fo:block>
    </fo:block-container>
  </xsl:template>
Is there a setting elsewhere preventing the table header text from being rotated?

Regards

Tinmen
Tinmen
Posts: 21
Joined: Wed Jun 28, 2023 11:49 pm

Re: Rotate Text in Table Header

Post by Tinmen »

Found my answer. A callout table template in tables.xsl was overriding.
Post Reply