我有一份用 XML 编码的中世纪手稿(使用 TEI 模式)。手稿有一个“主体”,它已在 XSL:FO 中xsl-region-body
完美地映射到并输出。手稿的左右页边空白处还有一些“注释”(注解)。这些在 XML 文档中被标记,例如<add type="margin_gloss" place="left">Some foo note</add>
我已保留xsl-region-start
并xsl-region-end
接收这些相对于它们在原始手稿中的位置的页边注。但是,我无法让标记的文本“流入”这些区域。
注意:我将硬编码数据放入这些区域没有问题,例如,<fo:static-content flow-name="xsl-region-after">
问题是Apache FOP告诉我下面的代码:For "fo:page-sequence", only one "fo:flow" may be declared.
<fo:page-sequence master-reference="odd">
<fo:static-content flow-name="xsl-region-after"
font-family="Times"
font-size="8pt">
<fo:block text-align="center">-<fo:page-number/>-
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-end"
font-family="Times"
font-size="6pt">
<xsl:call-template name="marginalia-right"/>
</fo:flow>
<fo:flow flow-name="xsl-region-body"
font-family="Times"
font-size="8pt"
space-before="8pt"
space-after="8pt">
<xsl:apply-templates/>
</fo:flow>
</fo:page-sequence>
我使用 XSL 模板提取注释:
<xsl:template match="//tei:add[@type='margin_gloss' and @place='right']" name="marginalia-right">
<fo:block>
<xsl:value-of select="text()"/>
</fo:block>
</xsl:template>
总结一下这个问题:我希望用 XML 标记的边距注释<add>
出现在. FPO 告诉我我不能“流动”两次。xsl-region-start
xsl-region-end
xsl-region-body