Reputation: 69
I am writing a simple table with two columns; but when it is getting rendered I am seeing it is getting rendered asymmetrical ; attaching screen shot
Below is my simple table code sample:
<xsl:template name="Header">
<fo:table table-layout="fixed" width="100%">
<fo:table-column column-width="proportional-column-width(1.2)" border-style="solid"/>
<fo:table-column column-width="proportional-column-width(2)" border-style="solid"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell column-number="1">
<fo:block font-size="3.5mm">
<xsl:value-of select="xpath/get/element-val"/>
</fo:block>
</fo:table-cell>
<fo:table-cell column-number="2">
<fo:block font-size="3.5mm">
<xsl:value-of select="xpath/get/element-val"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</xsl:template>
I am not trying any thing fancy here; and the content that is getting rendered in second column is what I am looking for both the columns; tried to add padding but not working.
Update
Had tried display-align="after" but nothing fruitful.
Further update
Below is the flow only for calling the template
<xsl:template name="Details">
<fo:block font-size="4.3mm" space-after.precedence="force" space-after="-3.5mm">
Testimonial is.
<fo:leader leader-pattern="rule" alignment-baseline="before-edge" rule-thickness=".5mm" leader-length="255.4mm" color="cmyk(0,0,0,1)"/>
</fo:block>
<!--Here page available width is 255.4 only-->
<xsl:call-template name="Temp2"/>
<xsl:call-template name="Header">
<!--had share template Header already-->
</xsl:template>
<xsl:template name="Temp2">
<fo:table table-layout="fixed" width="100%">
<fo:table-column column-width="33mm"/>
<fo:table-column column-width="proportional-column-width(1)"/>
<fo:table-body>
<fo:table-row>
<xsl:for-each select="xpath/get/element-val">
<xsl:if test=".='D'">
<fo:table-cell column-number="1">
<fo:block>
<fo:inline font-size="3.4mm" text-decoration="underline" writing-mode="lr">
<xsl:value-of select="following-sibling::*[1]"/>
</fo:inline>
</fo:block>
</fo:table-cell>
</xsl:if>
</xsl:for-each>
<xsl:for-each select="xpath/get/element-val">
<xsl:if test=".='E'">
<fo:table-cell column-number="2">
<fo:block font-size="3.4mm" writing-mode="lr" padding-top="1mm">
<xsl:value-of select="concat(.,' ',following-sibling::*[1])"/>
</fo:block>
</fo:table-cell>
</xsl:if>
</xsl:for-each>
</fo:table-row>
</fo:table-body>
</fo:table>
</xsl:template>
Upvotes: 0
Views: 75