Re: Collapsing Whitespace in Input

At 10:37 AM 3/21/98, "Russell Steven Shawn O'Connor" <roconnor@wronski.math.uwaterlo wrote:
>I don't quite understand this whitespace issue.
>
>(1) <mtext>Theorem 1: </mtext>
>
>is equivalent to
>
>(2) <mtext>Theorem 1:</mtext>
>
>Section 2.3.5 says that if you want to have whitespace uncollapsed, then
>you must use entities to escape it.
>
>(3) <mtext>Theorem 1:&x20;</mtext>
>
>won't work because to an SGML processor (1) and (3) are equivalent.

We thought that statement in 2.3.5 was probably wrong for that reason
(in fact some of us thought it was definitely wrong),
but we didn't have a good solution, so we left it in to see what people
would come up with (and whether anyone read the proposal carefully enough
to notice the problem -- congratulations on "passing the test"!).

This problem should be clarified somehow in the final release.
One possibility is to strike that incorrect sentence,
and suggest instead that zero-width entities can be added around
or between whitespace characters that should not be collapsed,
e.g.

  <mtext>Theorem 1: &ZeroWidthSpace;</mtext>

or (for two spaces in the middle)

  <mtext>Theorem &ZeroWidthSpace; 1:</mtext>

Another possibility is to add an attribute to prevent the collapsing.
I vaguely recall such an attribute being suggested in some version
of the XML proposal.

- Bruce Smith
<bruce@wolfram.com>

Received on Monday, 23 March 1998 04:12:08 UTC