The W3C XML Schema Language uses the whiteSpace facet to specify whether white space in an attribute or element with a simple type should be preserved, replaced, or collapsed.
Preserved white space is like xml:space="preserve"; that is, all white space is considered to be significant.
Replaced white space replaces all tabs, carriage returns, and line feeds with a single space each. Thus the number of white space characters is preserved but their type may be changed.
Collapsed white space first replaces all carriage returns and line feeds with a single space each, then replaces each run of consecutive spaces with a single space, and finally trims all leading and trailing white space.
However, once again this only offers a hint to the client ...