[Transformation Type: PDF] Changing font-size of the list used in table cells

Post here questions and problems related to editing and publishing DITA content.
girishkanmas
Posts: 8
Joined: Thu Apr 14, 2022 8:37 am

[Transformation Type: PDF] Changing font-size of the list used in table cells

Post by girishkanmas »

Hi,
Through my custom plugin, I did the following to change font-size of the <li> elements used in the <table>:
Added following in the <custom-plugn>\cfg\fo\attrs]\custom.xsl file:

Code: Select all

<xsl:attribute-set name="table_ul" use-attribute-sets="common.block">
    <xsl:attribute name="font-size">8pt</xsl:attribute>
 </xsl:attribute-set>
And added following in the <custom-plugn>\cfg\fo\xsl\custom.xsl

Code: Select all

<xsl:template match="*[contains(@class,' topic/entry ')]/*[contains(@class,' topic/li ')]">
    <fo:list-item>
      <fo:list-item-label/>
      <fo:list-item-body>
            <fo:block xsl:use-attribute-sets="table_ul">
              <xsl:call-template name="commonattributes"/>
              <xsl:apply-templates/>
            </fo:block>
      </fo:list-item-body>
    </fo:list-item>
  </xsl:template>
But it's not working. The generated PDF is using the default font-size to format lists in tables.
girishkanmas
Posts: 8
Joined: Thu Apr 14, 2022 8:37 am

Re: [Transformation Type: PDF] Changing font-size of the list used in table cells

Post by girishkanmas »

Just FYI...I could fix the issue with help from Radu.
Have used the following condition:

Code: Select all

<xsl:when test="ancestor::*[contains(@class, ' topic/entry ')]">
Post Reply