RE: [xsl] Getting Extra space while converting XML to Text using XSLT and FOP

Subject: RE: [xsl] Getting Extra space while converting XML to Text using XSLT and FOP
From: "Arun Sinha" <arunsinha666@xxxxxxxxxxx>
Date: Mon, 13 Sep 2004 12:08:22 +0000
Hi,

I am trying to convert a XML file into a Text file
using XSLT and FOP.

I am using Fop 0.20.5 rc2 from apache.

The XML is getting converted to TEXT file with
required formatting but I get extra spaces between
words. The extra spaces in words occur radomly but
multiple times in output.

Required Output
This is a sample text to display spacing issue.

FOP output
This is  a sample text  to display  spacing issue.

When two lines are compared, there is extra space
after 'is', 'text' and 'display'

I have tried using following fo block properties:

<fo:block line-height="10.5pt"  font-size="7.3pt"
font-family="Courier">

I do not know much about <xsl:FO> but isn't it possible for you to use XPath functions.

If yes then use function normalize-space()

cheers.

Arun

From: Pankaj Yadav <yadavpankaj@xxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] Getting Extra space while converting XML to Text using XSLT and FOP
Date: Mon, 13 Sep 2004 04:16:27 -0700 (PDT)


Hi ALL,

I am trying to convert a XML file into a Text file
using XSLT and FOP.

I am using Fop 0.20.5 rc2 from apache.

The XML is getting converted to TEXT file with
required formatting but I get extra spaces between
words. The extra spaces in words occur radomly but
multiple times in output.

Required Output
This is a sample text to display spacing issue.

FOP output
This is  a sample text  to display  spacing issue.

When two lines are compared, there is extra space
after 'is', 'text' and 'display'

I have tried using following fo block properties:

<fo:block line-height="10.5pt"  font-size="7.3pt"
font-family="Courier">

This solves most of the issues with text ouput like
formatting and overlapping lines etc but there are
still extra spaces between words.

Please advise, if anyone has faced similar issue and
has been able to solve it.

Thanks and Regards,

Pankaj Yadav




_______________________________ Do you Yahoo!? Shop for Back-to-School deals on Yahoo! Shopping. http://shopping.yahoo.com/backtoschool


_________________________________________________________________
Movies, music, celeb news. Stay in the loop. http://www.msn.co.in/cinema/ With MSN Entertainment!


Current Thread