Removing whitespaces at the end of a line

Here should go questions about transforming XML with XSLT and FOP.
wisdom_tooth
Posts: 2
Joined: Tue Apr 30, 2013 3:31 pm

Removing whitespaces at the end of a line

Post by wisdom_tooth »

Hi!
When transforming a text encoded according to TEI P5, how to remove whitespaces before a

Code: Select all

<lb break="no">
in case we're going to have a floating text output without linebreaks.

Code: Select all

<lb n="1"/>Lorem ipsum do
<lb n="2" break="no"/>lor sit amet,
The output is:

Code: Select all

Lorem ipsum do lor sit amet,
But it should be:

Code: Select all

 Lorem ipsum dolor sit amet,
We need this

Code: Select all

<lb break="no">
because we have two different layouts of one document: one as a floating text, the other as a line for line transcription.

Thanks!