xsl-list
[Top] [All Lists]

RE: XSL-FO and Spaces

2006-02-13 10:28:09
It looks like your <fo:block> elements are being set to justify, possibly 
inherited from something.

Try specifying <fo:block text-align="left"> (or whatever alignment you are 
looking for) - that should solve the problem.

Regards,
Brenda

-----Original Message-----
From: "Inez Störzer" [mailto:inez(_dot_)stoerzer(_at_)gmx(_dot_)de] 
Sent: Monday, February 13, 2006 11:54 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] XSL-FO and Spaces

Hi,

I've got a problem with XSLT/XSL-FO and spaces:

Here's a part from my XML-File

--- snip ---

    <Adressfenster>
        <MdtName>FritzMusterGmbH</MdtName>
        <MdtStrasse>Gewerbestrasse 6</MdtStrasse>
        <MdtOrt>Nürnberg</MdtOrt>
        <MdtPLZ>90478</MdtPLZ>
    </Adressfenster>

---snip ---

and here the interesting part from my XSLT/XSL-FO-File

--- snip ---

   <xsl:template match="Adressfenster">
      <fo:block><xsl:value-of select="MdtName" /></fo:block>
      <fo:block><xsl:value-of select="MdtStrasse" /></fo:block>
      <fo:block><xsl:value-of select="MdtPLZ" /><xsl:text>&#x20; 
</xsl:text><xsl:value-of select="MdtOrt" /></fo:block>
   </xsl:template>   

--- snip ---

I try to create a text-file with FOP 0.20.5 from Apache. The result is a bit
astonishing:

--- snip ---
FritzMusterGmbH

Gewerbestrasse       6
90478    Nürnberg
--- snip ---

Between "MdtName" and "MdtStrasse" is one empty line, but not between
"MdtStrasse" and "MdtPLZ". This string "Gewerbestrasse 6" in Tag
"MdtStrasse" with one space between Gewerbestrasse and number 6 ist
converted to a string with 6 spaces between Gewerbestrasse and number 6.
I've checked the text in MdtStrasse with a binary editor, there's really
only one space in the xml-file, no other characters.
And between MdtPLZ and MdtOrt are shown 4 spaces instead the one space I
tried to insert. I've checked the text in MdtStrasse with a binary editor,
there's one space between

Does anyone have an idea what's going wrong here? Thanks for your help!

Greetings
Inez

--~------------------------------------------------------------------
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>
--~--



--~------------------------------------------------------------------
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>
--~--



<Prev in Thread] Current Thread [Next in Thread>