【问题标题】:Special mark on wrapping a content using XSL-FO使用 XSL-FO 包装内容的特殊标记
【发布时间】:2017-06-12 18:40:20
【问题描述】:

我正在使用 XSLT 将我的 XML 转换为 FO 输出。对于特定元素,我使用属性wrap-option 设置为wrap,如果它超过行限制,它会在输出中换行。它被正确地包装在输出中。

但是,我想要一个额外的功能,如果文本被包装在输出中,它应该有一些关于包装的指示给用户。即,如果将特定行换行到下一行,则该行的末尾应该有一个“+”符号,无论它被换行。

示例输入:

Testing the wrapped input specification for understanding the wrapping has happened.
Normal line without wrapping.
Again a lengthy line which exceeds the line limit.

当前输出:

Testing the wrapped input specification
for understanding the wrapping has happened.
Normal line without wrapping.
Again a lengthy line which exceeds
the line limit.

所需输出:

Testing the wrapped input specification+
for understanding the wrapping has happened.
Normal line without wrapping.
Again a lengthy line which exceeds+
the line limit.

我怎样才能达到这个结果?

【问题讨论】:

    标签: xslt-2.0 xsl-fo


    【解决方案1】:

    如果您使用 AH Formatter,您可以使用 axf:line-continued-mark 扩展名 (https://www.antennahouse.com/product/ahf64/ahf-ext.html#line-continued-mark)。

    https://www.antennahouse.com/antenna1/comprehensive-xsl-fo-tutorials-and-samples-collection/ 的“综合 XSL-FO 教程和示例集合”中提供了演示如何使用 axf:line-continued-mark 的示例 FO 和 PDF。

    【讨论】:

      猜你喜欢
      • 2013-02-23
      • 2014-09-12
      • 2013-10-13
      • 1970-01-01
      • 2013-07-18
      • 2021-05-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多