我正在使用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.
如何实现此结果?
答案 0 :(得分:1)
如果您使用的是AH Formatter,则可以使用axf:line-continue-mark扩展名(https://www.antennahouse.com/product/ahf64/ahf-ext.html#line-continued-mark)。
示例FO和PDF演示如何在https://www.antennahouse.com/antenna1/comprehensive-xsl-fo-tutorials-and-samples-collection/的“综合XSL-FO教程和样本集合”中使用axf:line-continue-mark。