Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
This seems like such a stupid question but I've looked and looked and am getting nowhere...and I'm not that good with XSL FO.
Is there a way to test if the text is wider than the block and if so, change the inherited text-align=left to text-align=center if it is just one short sentence?
<xsl:template match="trim.para">
<fo:block font-family="sanserif" space-before.conditionality="discard" space-before.maximum="8pt" space-before.minimum="6pt" space-before.optimum="7pt" span="all">
<xsl:if test="@bullet" ==" yes"=">
<xsl:text disable-output-escaping="no">•</xsl:text>
</xsl:if>
<xsl:apply-templates select="node()"/">
</fo:block>
</xsl:template>
Thanks,
John T. Jarrett
BAE Systems | Arbortext PE version 5.4 | LOGSA XSL-FO v 1.7