Comment 3 for bug 167125

Revision history for this message
Buliabyak-users (buliabyak-users) wrote :

You're right, SVG states that whitespace must be ignored by
default (unless there's xml:space="preserve"). But in
practice this only affects how text is displayed in <text>
element:

http://www.w3.org/TR/SVG11/text.html#WhiteSpace

and it never says that an XML processor must _strip_ this
whitespace. Just ignore when displaying, which is what
Inkscape does. On the other hand, XML says

http://www.w3.org/TR/2004/REC-xml-20040204/#sec-white-space

that it's OK to use whitespace for formatting. No one is
obliged to strip it. In fact, I think it will be wrong to
strip it without asking. So the worst offender in this
situation is not Inkscape and not even AI, but the svg2pdf
which, according to XML/SVG specs, must ignore these
newlines instead of crashing on them.

How our XML editor displays the whitespace nodes is another,
purely cosmetic issue. Even if we suppress the display of
these phantom nodes, we should strive to preserve the
formatting whitespace in the open/write cycle as much as
possible.