[whatwg] Still more comments and questions on Web Apps 1.0

Le 2007-06-09 ? 5:26, Anne van Kesteren a ?crit :

> On Sat, 09 Jun 2007 04:49:56 +0200, Michel Fortin  
> <michel.fortin at michelf.com> wrote:
>> I'd agree they're mostly useless in a browser context, but when  
>> reading HTML with the intent of reserializing it later, preserving  
>> the whitespace around the document type declaration, the comments  
>> and the root element can be beneficial for the readability of the  
>> final output. I'd keep them there, just like XML does.
> I don't think XML does that, actually.

I've tested by dumping a tree made with PHP 5's XML parser (libxml2)  
before adding XML to my argument. Now, if I look at the XML spec  
under [2.10 Whitespace Handling][1]:

"An XML processor MUST always pass all characters in a document that  
are not markup through to the application. A validating XML processor  
MUST also inform the application which of these characters constitute  
white space appearing in element content."

To me, "all characters in a document" also includes direct children  
of the document node. But perhaps I'm missing something.

  [1]: http://www.w3.org/TR/REC-xml/#sec-white-space

Michel Fortin
michel.fortin at michelf.com

Received on Saturday, 9 June 2007 14:03:54 UTC