- From: Dirk Schulze via GitHub <sysbot+gh@w3.org>
- Date: Thu, 06 Jun 2019 12:06:19 +0000
- To: public-svg-issues@w3.org
dirkschulze has just labeled an issue for https://github.com/w3c/svgwg as "Needs editing": == White-space only text nodes. == Relevant links: https://www.w3.org/TR/SVG2/struct.html#XMLSpaceAttribute https://www.w3.org/TR/SVG2/text.html#WhiteSpaceProperty The attribute xml:space is used to control white space in SVG 1.1 inside <text> elements. As this is an XML attribute, it presumably must also follow XML rules for handling white-space only text nodes (different from text elements) which dictate that a value of "default" results in the removal of text nodes that only contain white space: `<text><tspan>A</tspan> <tspan>B</tspan></text> => AB` `<text><tspan>A</tspan> B <tspan>C</tspan></text> => A B C` This behavior is not clearly defined in either the SVG 1.1 or SVG 2 specs and neither Firefox nor Chrome seem to follow this. Inkscape has followed this behavior (except due to a bug, now fixed, introduced by a change in the libxml2 library). If this interpretation is wrong, then text should be added to the spec to make it clearer. Note XHTML2 sets xml:space to preserve for all elements. PS. It's a real pain that we can't attach SVG files! See https://github.com/w3c/svgwg/issues/352
Received on Thursday, 6 June 2019 12:06:21 UTC