Manuel Mall wrote:

This solves the first supposed problem (interaction between nbsp and
pretty-printing spaces), but the second one is still open: what
happens if we have
   someContent<nbsp><space>otherContent ?
*IF* (and I'm not at all sure about this) there can be a break , then
both spaces should be discarded:

IMO yes there can be a break and no only the space needs to be removed. Again the argument is that nbsp is not whitespace as per XSL-FO definition and need not to be removed.

What makes you think that both the nbsp and the space needs to be removed around a fop generated linebreak?

Oops, I forgot to add an importand condition: if the user explicitly states that the nsbp must be discarded around a line break:
  <fo:inline suppress-at-line-break="suppress">&nbsp;</fo:inline>
Well, the more I look at this, the more it seems unlikely to ever happen ... we are probably having a highly theoretical disquisition! :-)

Anyway, I was still not sure whether there could be a break so I looked back at the Unicode Annex #14.

GL  Non-breaking (Glue) (XB/XA)  (normative)

Non-breaking characters prohibit breaks on either side, but that prohibition can be overridden by SP or ZW. In particular, when NBSP follows SPACE, there is a break opportunity after the SPACE and NBSP will go as visible space onto the next line. See also WJ. The following lists the characters of line break class GL with additional description.


NO-BREAK SPACE is the preferred character to use where two words should be visually separated but kept on the same line, as in the case of a title and a name Dr.<NBSP>Joseph Becker. When SPACE follows NBSP, there is no break, because there never is a break in front of SPACE. NARROW NO-BREAK SPACE is used in Mongolian. The mongolian vowel separator acts like a NNBSP in its line breaking behavior. It additionally affects the shaping of certain vowel characters as described in [Unicode] Section 12.3, Mongolian.

So, it seems there could be a break between SPACE and NBSP (with NBSP starting the next line), but not between NBSP and SPACE. Can we say this is settled?


Reply via email to