With the recent introduction of xml:space support, there's one problem. It is set on text but its effect is on the children tspans. However, since the text element is itself affected by it, when you save and open a file with such a text object, the newline between <text> and its first <tspan> is preserved: it becomes an empty text node in XML editor and is visible as an empty line on the canvas, shifting the text lines down. What is the best way to fix this? I see several options:
- make sure xml:space is set on each tspan but not on text
- make sure any text nodes directly under <text> are not shown as text lines on canvas nor as text nodes in xml editor
- specifically exclude <text> from being affected by xml:space
- when serializing svg, make sure there is no whitespace under <text>
Mental, what do you think?
_________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus&pgmarket=en-ca&RU=http%3a%2...
On Tue, 2003-12-16 at 17:18, bulia byak wrote:
- make sure xml:space is set on each tspan but not on text
I think this is a good solution.
- make sure any text nodes directly under <text> are not shown as text lines
on canvas nor as text nodes in xml editor
This might be a little dodgy from a standards-compliance perspective.
- specifically exclude <text> from being affected by xml:space
- when serializing svg, make sure there is no whitespace under <text>
Either of these would break XML compliance.
-mental
MenTaLguY wrote:
On Tue, 2003-12-16 at 17:18, bulia byak wrote:
- make sure xml:space is set on each tspan but not on text
I think this is a good solution.
Could be...
Would leading and trailing whitespace just in the <text></text> tags cause problems?
- specifically exclude <text> from being affected by xml:space
- when serializing svg, make sure there is no whitespace under <text>
Either of these would break XML compliance.
I think the last one is the actual solution. And probably doesn't break XML compliance.
participants (3)
-
bulia byak
-
Jon A. Cruz
-
MenTaLguY