Re: moving from xml:space="" to white-space

Tab Atkins Jr.: > The DOM doesn't throw away white-space at all.  That 
sort of thing
> happens solely at the display (CSS) level.

In practice the DOM doesn't, but the XML spec allows for it if that's 
how the XML processor is operating.  It's intended to allow for example

   <a>
     <b/>
   </a>

to parse without having white space only text nodes be created as 
children of <a>.  xml:space="preserve" turns that behaviour off (if the 
XML processor would have done it) and says to definitely include it in 
the DOM.

Received on Saturday, 17 March 2012 03:30:31 UTC