Gpn008
Gpn008

Reputation: 37

Special mark on wrapping a content using XSL-FO

I am using XSLT to transform my XML to FO output. For a particular element, I am using the attribute wrap-option set as wrap, for it to wrap in the output if it exceeds the line limit. It gets wrapped properly in the output.

But, I would like to have an additional feature that, if the text is wrapped in the output, it should have some indication to the user on the wrapping. ie, if a particular line is wrapped to next line, it should have a "+" symbol in the end of the line wherever it is wrapped.

Sample input:

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

Current output:

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

Required output:

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

How can I achieve this result?

Upvotes: 1

Views: 46

Answers (1)

Tony Graham
Tony Graham

Reputation: 8068

If you are use AH Formatter, you can use the axf:line-continued-mark extension (https://www.antennahouse.com/product/ahf64/ahf-ext.html#line-continued-mark).

There's sample FO and PDF demonstrating how to use axf:line-continued-mark available in the 'Comprehensive XSL-FO Tutorials and Samples Collection' at https://www.antennahouse.com/antenna1/comprehensive-xsl-fo-tutorials-and-samples-collection/.

Upvotes: 1

Related Questions