Re: XML and Using It With Whitespace

Tim Bray (tbray@textuality.com)
Tue, 06 Jan 1998 18:56:52 -0800


At 02:06 AM 05/01/98 -0500, Chris Smith wrote:
>That doesn't mean I'm abandoning the idea - the message authentication
>we're doing is important enough to the application that I'm prepared
>to sacrifice the use of all the parsers to get the above behaviour.

Hmm, I'm failing to get some aspect of your problem. Maybe I
bypassed a message in which you explained it. It is clear that
*any* conformant parser must give you all the whitespace in the
message. It may also send a side-note along telling you that it's
not significant, but you always get it or else you're perfectly
justified in complaining to your processor author. This has the
nice effect that the amount of whitespace you get from the processor
is guaranteed to be the same whether it's using a DTD or not.

Now, the downside of this is that you can't do

<msg>
<field1 val='1'/>
<field2 val='2'/>
</msg>

and have that treated as identical to

<msg><field1 val='1'/><field2 val='2'/></msg>

i.e. no auto-magic facility to ignore pretty-printing.
No XML processor in the world, regardless of the DTD in play is allowed
to refrain from passing you the line-breaks and spaces in the
first example.

Probably I'm missing something... what is the missing piece from
your point of view? -T.