Re: Text alignment with xml:space="preserve"

> Can anyone here explain me why setting xml:space leads to repositioning of the
> text? Is there another way (maybe by css) to show the correct number of spaces
> with the right text alignment?

The "xml:space" property controls the XML processor's white space
handling [1]. Setting it to "preserve" leads to all whitespace being
kept for processing. That's exactly why your text is being
repositioned - it contains leading (and trailing) white space ! ;-)

To achieve the (apparently) desired effect, one should trim remove all
undesired whitespace:

>        <text style="fill: rgb(0, 0, 0); font-size: 12; font-family:
> &quot;Arial&quot;; baseline-shift: 22%; text-anchor: start;">
>            <tspan x="90.0px" y="120.0px" xml:space="preserve">Dies sind   3 Leerzeichen!</tspan>
>        </text>

This is probably what you want. :-)

Hope this helps,

 Helder Magalh„es


Received on Friday, 4 July 2008 16:14:44 UTC