On Tue, 2003-12-16 at 23:02, bulia byak 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.
Possible, but unelegant. Matsuru Oka has spent effort on making xml:space inherited from text to tspan, and now we abandon that?
xml:space inheritance is required by the XML specification, so it wouldn't be a waste as far as that went.
Besides, a user may want to remove xml:space in which case it's much more convenient to do once on a text element rather than on each tspan.
This is true.
- 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.
Disagree on the last one. Where's the incompliance? The user certainly did not _ask_ us to insert whitespace text nodes between the tspans, and by not inserting them we won't break any standard. There's no standard saying XML tags must be on separate lines :) So I like this option most, but unfortunately it requires digging deep into the parsing and serializing code, which I'm frankly afraid to do.
Ahh, I misunderstood the last suggestion a litle -- if we're creating the <text> ourselves from scratch (rather than it having been loaded from a file), sure. Just need to be sure that we respect any whitespace that was in the file when it was loaded.
In fact, I think you've caught a conformance bug with the current beahvior. For elements where xml:space applies, we should _never_ be adding any whitespace between elements that isn't explicitly provided as a text node.
I will look at that when I have time.
-mental
(fwiw, for reference, the details of xml:space handling are specified in http://www.w3.org/TR/REC-xml#sec-white-space )