- From: Chris Bass via GitHub <sysbot+gh@w3.org>
- Date: Mon, 27 Mar 2017 14:17:22 +0000
- To: public-tt@w3.org
chrisb-bbcrd has just created a new issue for https://github.com/w3c/imsc: == Clarify whitespace handling when xml:space="default" == A feature of the fillLineGap example file (example 7) in IMSC1.0.1 has raised a question regarding the handling of whitespace, which @nigelmegitt has suggested I raise here to get clarification. Example 7 has tabs at the end of some of its lines. The section I'm particularly interested is as follows (with tabs shown as '\t'): ``` [...] <span style="spanStyle">jumps over the </span><span style="spanStyleSmall">lazy</span><span style="spanStyle"> dog</span><br/>\t\t\t\t \t\t\t\t<span style="spanStyle">##Line gaps##</span> [...] ``` Between the `<br/>` and the last span in this section we have an anonymous span with the following text: ``` "\t\t\t\t \t\t\t\t" ``` As I read the specs, the `linefeed-treatment` and `white-space-collapse` rules apply as follows: 1. Replace newline by space: `"\t\t\t\t \t\t\t\t"` 2. Collapse down the whitespace, leaving the initial tab: `"\t"` Then, when it comes to line building, the last line of the block will contain the final span ("##Line gaps##") preceded by the single remaining tab character. According to the `suppress-at-line-break="auto"` rules, only space (U+0020) characters have a value of 'suppress' applied to them. Thus, the `white-space-treatment="ignore-if-surrounding-linefeed"` rules won't remove the tab at the start of this final line, and the line is rendered with an indent. If the sequence I've just outlined is the correct interpretation of the specs, then Fig. 1, showing how the lines should be rendered, is wrong, as the last line in each image should be indented. The question is: Is this the correct interpretation of the specs? Please view or discuss this issue at https://github.com/w3c/imsc/issues/224 using your GitHub account
Received on Monday, 27 March 2017 14:17:28 UTC