W3C home > Mailing lists > Public > public-pfwg-comments@w3.org > January to March 2008

On whitespace trimming

From: Henri Sivonen <hsivonen@iki.fi>
Date: Sun, 23 Mar 2008 22:24:29 +0200
Message-Id: <58837EAA-7F97-45A3-9E2F-0E769653FECF@iki.fi>
To: public-pfwg-comments@w3.org

WAI-ARIA references XSD datatype which allow whitespace around the  
value. However, experience with HTML, SVG and MathML implementations  
shows that even when specs allow leading and trailing whitespace in  
attribute values, implementations tend not to do so in an  
interoperable way--especially if the attribute is expected to take one  
of enumerated possible values. As a result, authors must avoid extra  
whitespace in order to make their pages work in a robust way.

Therefore, for document conformance, I suggest disallowing leading and  
trailing whitespace except when the value is a list of space-separated  
tokens (in which case the common design pattern is to require one or  
more whitespace characters in between tokens and zero or more before  
and after).

(I'm implementing conformance checking according to this suggestion.)

Henri Sivonen
Received on Sunday, 23 March 2008 20:25:14 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:45:56 UTC