[whatwg] xml:space

Henri Sivonen hsivonen at iki.fi
Mon Jan 22 08:52:52 PST 2007

On Jan 22, 2007, at 16:32, Henri Sivonen wrote:

> Since this editor artifact is harmless in browsers and useful in  
> editors, it would be nice if the spec made it conforming at least  
> on the <pre> element in XHTML5.

Suggested text:
The xml:space attribute may be used on XHTML elements of XML  
documents. Authors must not use the xml:space attribute in HTML  
documents. The xml:space attribute, if present, must have the literal  
value "default" or the literal value "preserve". The meaning of this  
attribute is outside the scope of this specification.

If that's too permissive, here's what would minimally cover my use case:
In XHTML (but not in HTML), the element pre may have the attribute  
xml:space. If the attribute is present, the value of the attribute  
must be "preserve".

The first conforms to XML 1.0 for sure. The latter may not exactly,  
depending on spec interpretation.

Henri Sivonen
hsivonen at iki.fi

More information about the whatwg mailing list