【发布时间】:2018-03-13 12:19:26
【问题描述】:
这是我的 xsl 的 sn-p:
<fo:table-row height="27.8mm">
<fo:table-cell border-bottom="0.2mm solid" number-columns-spanned="2">
<fo:table border="0px solid"
border-collapse="collapse"
table-layout="fixed"
width="100%"
height="100%">
<fo:table-column column-width="110mm"/>
<fo:table-body>
<fo:table-row height="27.8mm">
<fo:table-cell border-bottom="0.2mm solid" height="28mm">
<xsl:call-template name="LabelTemplate">
<xsl:with-param name="name" select="'REFERENCE'"/>
</xsl:call-template>
<xsl:call-template name="ReferenceTemplate">
<xsl:with-param name="First" select="First"/>
<xsl:with-param name="Second" select="Second"/>
<xsl:with-param name="eNo" select="eNo"/>
</xsl:call-template>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:table-cell>
</fo:table-row>
在ReferenceTemplate 中使用内联容器时,不会显示任何内容。
<xsl:template name="ReferenceTemplate">
<xsl:param name="First"/>
<xsl:param name="Second"/>
<xsl:param name="eNo"/>
<xsl:param name="size" select="'22pt'"/>
<xsl:param name="left" select="'5pt'"/>
<xsl:param name="top" select="'15px'"/>
<xsl:param name="text-indent" select="'5px'"/>
<fo:block-container
position="absolute"
top="{$top}" left="{$left}" right="5pt"
width="auto"
border="0px solid">
<fo:inline-container vertical-align="top" inline-progression-dimension="49.9%">
<fo:block><xsl:value-of select="$Second"/></fo:block>
</fo:inline-container>
<fo:inline-container vertical-align="top" inline-progression-dimension="49.9%">
<fo:block><xsl:value-of select="$First"/></fo:block>
</fo:inline-container>
</fo:block-container>
</xsl:template>
当使用此示例而不是显示内联容器内容时。
<fo:block text-align-last="justify">
<xsl:value-of select="$Second"/>
<fo:leader leader-pattern="space" />
<xsl:value-of select="$First"/>
</fo:block>
【问题讨论】:
标签: xslt xslt-1.0 apache-fop