[Prev][Next][Index][Thread]
Collapsing Whitespace in Input
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.
So this seems to leave
(4) <mtext>Theorem 1:&Space;</mtext>
as our only option. This means that the DTD can't use
(5) <!ENTITY Space ' '>
because then (4) would become the same as (1).
So the entity Space has to be define as something else. But I'm a little
unsure what. Perhaps the best approach would be to define an SDATA
entity. The SGML process can turn the SDATA into a space after trimming
the whitespace from the element. (I actually don't know much about SDATA,
but it's use here seems appropriate)
Does anyone have any comments to clarify the issue?
--
Russell O'Connor roconnor@uwaterloo.ca
<URL:http://www.undergrad.math.uwaterloo.ca/%7Eroconnor/>
"And truth irreversibly destroys the meaning of its own message"
-- Anindita Dutta, "The Paradox of Truth, the Truth of Entropy"