xsl-list
[Top] [All Lists]

RE: Getting Extra space while converting to Text using XSLT FO

2004-07-15 01:23:01

The Text should appear as it is specified in XSL e.g in XSL I have given 
        <fo:block text-align="start" space-before="6pt">
                        <xsl:text>Testing the data for Exta
spaces</xsl:text>
        </fo:block>

So it should appear with single spacing between every word like this :
"Testing the data for Exta spaces"
But its coming like this : "Testing  the  data  for Exta  spaces" . Kindly
notice that it has given
double space in between words. 

I have tried with <fo:block white-space-collapse="false" ...> 
Its still giving the same output, I am using Apache FOP for my xml to text
conversion.
I have tried with other options also like padding = 0


Thanks & regards
Leena

-----Original Message-----
From: Arulraj [mailto:p_arulraj(_at_)yahoo(_dot_)com]
Sent: Thursday, July 15, 2004 1:26 PM
To: Leena Sharma
Subject: Re: [xsl] Getting Extra space while converting to Text using
XSLT FO


Please quote the question some more clearly.. Because
How the text to be appear in output ?

Try to test with <fo:block
white-space-collapse="false" ...
 
Regards,
Arul
--- Leena Sharma <leena(_dot_)s(_at_)sonata-software(_dot_)com> wrote:
Hi ALl,
I am giving Text in my XSL in <fo:block> and doing
that XSLT to generate
Text file. But its giving extra space in between the
words.
This is also not consistent between all words. How
to over come this
problem? Below is formatting file which I am using.
I have posted this earlier but its not coming in
list.
Thanks 
Leena 
leena(_dot_)s(_at_)sonata-software(_dot_)com

<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
    xmlns:fo="http://www.w3.org/1999/XSL/Format";
    version='1.0'>
<xsl:output method="text" indent="no"/>
    <xsl:template match="DocGenJob">
        <fo:root>
            <fo:layout-master-set>
                 <fo:simple-page-master
master-name="mainPage"
                     page-height="300mm"
page-width="20cm">
                 
                     <fo:region-body
region-name="xsl-region-body"
text-align="start"/>
                     <fo:region-before
region-name="xsl-region-before"
extent="20mm"/>
                     <fo:region-after
region-name="xsl-region-after"
extent="20mm"/>
                 </fo:simple-page-master>
             </fo:layout-master-set>

             <fo:page-sequence
master-reference="mainPage">
             <fo:static-content
flow-name="xsl-region-before">
                <fo:block text-align="right">
                  page  <fo:page-number/> of
<fo:page-number-citation
ref-id="content_terminator"/>
          </fo:block>
        </fo:static-content>
  
              <fo:flow  flow-name="xsl-region-body"
text-align="start">
                       <fo:block> </fo:block>. 
                      <fo:block text-align="start" space-before="6pt">
                      <xsl:text>Testing the data for Exta spaces
</xsl:text>
                      </fo:block>

                     <fo:block
id="content_terminator"/>    
                   </fo:flow>
             </fo:page-sequence>

        </fo:root>
    </xsl:template>
</xsl:stylesheet>

*********************************************************************
Disclaimer: The information in this e-mail and any
attachments is
confidential / privileged. It is intended solely for
the addressee or
addressees. If you are not the addressee indicated
in this message, you may
not copy or deliver this message to anyone. In such
case, you should destroy
this message and kindly notify the sender by reply
email. Please advise
immediately if you or your employer does not consent
to Internet email for
messages of this kind.

*********************************************************************


--+------------------------------------------------------------------
XSL-List info and archive: 
http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to:
http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--





                
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail
*********************************************************************
Disclaimer: The information in this e-mail and any attachments is
confidential / privileged. It is intended solely for the addressee or
addressees. If you are not the addressee indicated in this message, you may
not copy or deliver this message to anyone. In such case, you should destroy
this message and kindly notify the sender by reply email. Please advise
immediately if you or your employer does not consent to Internet email for
messages of this kind.
*********************************************************************


<Prev in Thread] Current Thread [Next in Thread>
  • RE: Getting Extra space while converting to Text using XSLT FO, Leena Sharma <=