On whitespace trimming

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
hsivonen@iki.fi
http://hsivonen.iki.fi/

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