[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Getting Extra space while converting XML to Text

Subject: RE: 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
converting xml to text
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: 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.