[whatwg] xml:space

Anne van Kesteren annevk at opera.com
Tue Jan 23 07:51:51 PST 2007


On Tue, 23 Jan 2007 10:45:15 -0500, liorean <liorean at gmail.com> wrote:
> Well, considering the purpose of XHTML (main purpose is presentation
> for humans, no?) is there any reason to NOT just set it to default to
> "preserve" on the html element, fixed to "preserve" on the script,
> style, pre and textarea elements and have it implied through an entity
> for all other elements? Style sheets can change whether presentation
> of whitespace is collapsed or not. By default, the whitespace is
> collapsed but for the pre element it's conserved, but that can
> overridden by user or author style sheets. But whitespace that is
> structurally collapsed at the XML level cannot be restored for
> presentation by the style sheet, so this whitespace is lost from ever
> being presented as it appeared in the document.

xml:space can't affect the tree being formed as far as I know. It's not  
entirely clear to me what its use is anyway, except in SVG, where they  
defined it in a funny way to make it do something.


Regarding whether or not HTML5 should mention it. It seems the intention  
of the XML specification is that you have to say it's allowed: "In valid  
documents, this attribute, like any other, MUST be declared if it is  
used." Opinions probably vary on this.


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>



More information about the whatwg mailing list