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

kwriter
Posts: 15

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

Wed Mar 29, 2017 11:42 pm

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: 5585

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

Thu Mar 30, 2017 11:40 am

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: 15

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

Thu Mar 30, 2017 4:26 pm

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: 15

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

Thu Mar 30, 2017 5:32 pm

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.

Return to “DITA (Editing and Publishing DITA Content)”

Who is online

Users browsing this forum: No registered users and 1 guest