使用 XSL-FO 包装内容的特殊标记

Special mark on wrapping a content using XSL-FO

我正在使用 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.

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

如果您使用 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/ 的 'Comprehensive XSL-FO Tutorials and Samples Collection' 中提供了演示如何使用 axf:line-continued-mark 的示例 FO 和 PDF。