Re: [svgwg] White-space only text nodes. (#352)

The SVG Working Group just discussed `White-space only text nodes.`, and agreed to the following:

* ``RESOLUTION: `xml-space` attribute does not affect parsing of whitespace nodes.``

<details><summary>The full IRC log of that discussion</summary>
&lt;AmeliaBR> Topic: White-space only text nodes.<br>
&lt;AmeliaBR> GitHub: https://github.com/w3c/svgwg/issues/352<br>
&lt;AmeliaBR> Dirk: For SVG, we have the XML whitespace rule but we also have CSS property.<br>
&lt;AmeliaBR> Tav: Issue came up when updating inkscape. We actually strip whitespace-only nodes unless there is `xml-space="preserve"` (which we always add when we generate code).<br>
&lt;AmeliaBR> ... But I can't find an XML spec that recommends that.<br>
&lt;AmeliaBR> ... So I'd be happy with just keeping whitespace nodes always.<br>
&lt;AmeliaBR> Dirk: Are then other differences between them, or can we just treat xml-space as mapping to CSS.<br>
&lt;AmeliaBR> Amelia: That's how we've currently got it defined.<br>
&lt;AmeliaBR> Tav: It's a little complicated. xml-space strips out a lot of stuff. The Level 4 CSS spec adds in a new value for `white-space` that matches the `xml-space` behavior.<br>
&lt;AmeliaBR> https://svgwg.org/svg2-draft/text.html#WhiteSpace<br>
&lt;AmeliaBR> Tav: Browsers implement the attribute already.<br>
&lt;AmeliaBR> Amelia: Not consistently. I think only Firefox implements it fully.<br>
&lt;AmeliaBR> Tav: Yes, there was some issue about the inheritability of the attribute.<br>
&lt;chris> https://www.w3.org/TR/css-text-4/#white-space-property<br>
&lt;chris> https://www.w3.org/TR/css-text-3/#white-space-property<br>
&lt;AmeliaBR> https://drafts.csswg.org/css-text-4/#propdef-text-space-collapse<br>
&lt;AmeliaBR> Amelia: Could we move the new values from CSS Text 4 into SVG 2, and make that the stable definition for now?<br>
&lt;AmeliaBR> Chris: Looking at the Level 3 vs 4 definitions of `white-space`, I don't see any new values.<br>
&lt;AmeliaBR> Amelia: Looks like it's been moved to a new `text-space-collapse` longhand. The `preserve-spaces` value.<br>
&lt;AmeliaBR> Myles: I'm not sure what the issue is. Can we just defer it to CSS WG?<br>
&lt;AmeliaBR> Tav: I could do some updated testing on what current behavior is.<br>
&lt;myles> ++chris<br>
&lt;AmeliaBR> Dirk: The question is whether we need to do this now, or can defer the fix until later.<br>
&lt;AmeliaBR> Amelia: We could leave the current spec text, which has special rendering behavior for the attribute not defined in CSS. The issue about removing whitespace-only nodes sounds like its a non-issue per spec, from Tav's research.<br>
&lt;AmeliaBR> Chris: If there is interest in implementing the new keyword, I like the idea of moving it up to be a stable spec. We could discuss that.<br>
&lt;AmeliaBR> Dirk: The open issue is then what does `xml-space="default"` map to. Need testing for that.<br>
&lt;AmeliaBR> ... Can we resolve on not dropping white-space nodes?<br>
&lt;AmeliaBR> Eric: I don't think we should ever just drop nodes. That would affect JS and so on.<br>
&lt;AmeliaBR> Amelia: If Inkscape drops nodes as part of import/export clean-up, that's probably not a big issue, but that's not per spec.<br>
&lt;AmeliaBR> ... The issue is whether this was actually a parser instruction on the XML parser, that the nodes get dropped before the DOM is created.<br>
&lt;chris> http://www.xmlplease.com/xml/xmlspace/<br>
&lt;chris> +1<br>
&lt;AmeliaBR> Dirk: Can we resolve?<br>
&lt;AmeliaBR> RESOLUTION: `xml-space` attribute does not affect parsing of whitespace nodes.<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/svgwg/issues/352#issuecomment-448008728 using your GitHub account

Received on Monday, 17 December 2018 21:40:42 UTC