Table row background color output class not working with DITA-OT 2.3.3

Post here questions and problems related to editing and publishing DITA content.
kwriter
Posts: 18
Joined: Wed Feb 22, 2017 8:04 pm

Table row background color output class not working with DITA-OT 2.3.3

Post by kwriter »

Hello,

For some reason, code that works fine with DITA-OT 1.8 doesn't seem to work with DITA-OT 2.3.3. In both instances I'm using the FO processor and
the DITA-OTs that come with Oxygen 18.

I have the following code in my customization to set the background color of a row to either grey or blue based on the output class.

Code: Select all

<xsl:template match="*[contains(@class, ' topic/tbody ')]/*[contains(@class, ' topic/row ')]">
<xsl:choose>
<xsl:when test="contains(@outputclass, ' bluerow ')">
<fo:table-row xsl:use-attribute-sets="blue.row">
<!-- <xsl:call-template name="commonattributes"/>
<xsl:apply-templates/> -->
</fo:table-row>
</xsl:when>
<xsl:when test="contains(@outputclass, ' greyrow ')">
<fo:table-row xsl:use-attribute-sets="grey.row">
<xsl:call-template name="commonattributes"/>
<xsl:apply-templates/>
</fo:table-row>
</xsl:when>
<xsl:otherwise>
<fo:table-row xsl:use-attribute-sets="tbody.row">
<xsl:call-template name="commonattributes"/>
<xsl:apply-templates/>
</fo:table-row>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
The attribute sets are also in my customization:

Code: Select all

<xsl:attribute-set name="grey.row">
<xsl:attribute name="background-color">#E7E6E6</xsl:attribute>
<xsl:attribute name="color">black</xsl:attribute>
</xsl:attribute-set>

<xsl:attribute-set name="blue.row">
<xsl:attribute name="background-color">#EBF0F9</xsl:attribute>
<xsl:attribute name="color">black</xsl:attribute>
</xsl:attribute-set>
Do you know why it's not working with DITA-OT 2.3.3?

Thanks.
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Table row background color output class not working with DITA-OT 2.3.3

Post by Radu »

Hi,

I'm not sure. So you are migrating a PDF customization from DITA OT 1.8 to 2.x, right?
If in the Oxygen Preferences->DITA page you set Show Console Output to Always, then add some xsl:messages in your overridden template, do they show up in the "DITA OT" console view after you publish from Oxygen? If they do not show up, it means your customized template is not called anymore.
If you can send us the PDF customization plugin via email (support@oxygenxml.com) we could try to find some time to look into this, maybe help you further.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
kwriter
Posts: 18
Joined: Wed Feb 22, 2017 8:04 pm

Re: Table row background color output class not working with DITA-OT 2.3.3

Post by kwriter »

Hi,

Thanks for such a quick response. Yes, I'm migrating from 1.8 to 2.3.3, and all has gone well except for this issue. I think the template is still being called because it is in the tables.xsl in the DITA-OT for 2.3.3 and it's active, but I'll try your suggestion just to be safe. I'll keep poking around, and if I can't figure it out, I'll send the customization.
kwriter
Posts: 18
Joined: Wed Feb 22, 2017 8:04 pm

Re: Table row background color output class not working with DITA-OT 2.3.3

Post by kwriter »

Hi Radhu,

Well, it was a small error in my syntax. I put spaces between the outputclass and the single quotes: @outputclass, ' bluerow '. Removing them fixed the issue.

Thanks again.
Post Reply