Topics

How to customize footnote in tables for PDF #PDF #XSLT


Lisa Zeng
 

Hi DITA Experts

In my dita, there servaral table who has fn insides. 

I wish to create fn for each table 
      *  fn number starts from 1 for each tabel
      *  fn list is under its table, not at the bottom of a pages.

For example:

 Table 1 
---------------------------------------------------------------
|          XXXX[1],   |   XXXXX[2],      |    XXXX     |
 ---------------------------------------------------------------
|          XXXX        |   XXXXX[2],      |   XXXXX  | 
 ---------------------------------------------------------------  
|          XXXX        |   XXXXX[3],      |                  | 
 ---------------------------------------------------------------  
[1] I am footnote 1.
[2] I am footnote 2.
[3] I am footnote 3.


 Table 2 
---------------------------------------------------------------
|          XXXX[1],   |   XXXXX[2],      |    XXXX     |
 ---------------------------------------------------------------
|          XXXX        |   XXXXX[2],      |   XXXXX  | 
 ---------------------------------------------------------------  
|          XXXX        |   XXXXX[3],      |                  | 
 ---------------------------------------------------------------  
[1] I am footnote 1.
[2] I am footnote 2.
[3] I am footnote 3.



What I have done:

 1.  rewrite topic/fn template make is only shows fn number in table, but not fn contents in page.
2. rewrite topic/table, wish to touch the fn in table and show its related contents. but now, can't touch it. 
     blow are code which I want to touch for test.

   <xsl:template match="*[contains(@class, ' topic/table ')]">
      <!-- FIXME, empty value -->
        <xsl:variable name="scale" as="xs:string?">
            <xsl:call-template name="getTableScale"/>
        </xsl:variable>

        <fo:block-container xsl:use-attribute-sets="table__container">
            <fo:block xsl:use-attribute-sets="table">
                <xsl:call-template name="commonattributes"/>
                <xsl:if test="not(@id)">
                  <xsl:attribute name="id">
                    <xsl:call-template name="get-id"/>
                  </xsl:attribute>
                </xsl:if>
                <xsl:if test="exists($scale)">
                    <xsl:attribute name="font-size" select="concat($scale, '%')"/>
                </xsl:if>
                <xsl:apply-templates select="*[contains(@class,' ditaot-d/ditaval-startprop ')]" mode="outofline"/>
                <xsl:apply-templates/>
                <xsl:apply-templates select="*[contains(@class,' ditaot-d/ditaval-endprop ')]" mode="outofline"/>
            </fo:block>
  <fo:block xsl:use-attribute-sets="table">  
         
   
<xsl:choose>
                     <xsl:when test="contains(@class, ' topic/fn ')">
                     <xsl:text>]</xsl:text>
                    </xsl:when>
                     <xsl:otherwise>
    </xsl:otherwise>
              
                         </xsl:choose>  
          
  </fo:block>
        </fo:block-container>
    </xsl:template>

Would any of you share any clue for me where to start.

thanks a lot!!
br

Lisa Zeng




Chris Papademetrious
 

Watching - extremely interested in finding a solution to this too!