W3C home > Mailing lists > Public > www-dom@w3.org > April to June 1999

Re: RFC: White Space Handling In XML Parsing

From: Arkin <arkin@trendline.co.il>
Date: Fri, 21 May 1999 09:04:07 -0400
Message-ID: <374559C7.DB8A4870@trendline.co.il>
CC: www-dom@w3.org
"Spaces in XML are data and cannot be tossed."

Which is practically the view of the RFC. But we all know that some
spaces are not data, and that the DOM does not preserve txtual format.
According to the DOM, the following two can be returned as the same tree
content:

  <img    src = "http://www.test.com"
          alt = "Nothing else to say" />

and

  <img alt="Nothing else to say" src="http://www.test.com"/>

Notice how the formatting information is lost, even the order of
attributes is not the same. If your editor is trusting the DOM to
deliver a visual presentation of the source document, you better
re-think it.

Arkin


Paul Grosso wrote:
> 
> At 16:55 1999 05 20 -0400, Booth, David wrote:
> >I think Larry makes a good case for the value of
> >whitespace preservation in some applications.
> >
> >Perhaps the key question
> >is how many people will be writing applications such
> >as XML editors that should retain whitespace formatting,
> >versus how many people will be writing other applications
> >that simply need to consume XML, and don't care much
> >about the whitespace formatting the input had.
> 
> No, for the DOM, that is *not* the key question.  Of
> course there are more consuming (browser) applications
> than producing (editor) applications--that is practically
> tautological but irrelevant.
> 
> The DOM has already decided that editor applications are
> key reference applications.  The DOM must allow editors
> to support XML.  Spaces in XML are data and cannot be tossed.
Received on Friday, 21 May 1999 09:14:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:46 GMT