Schemas
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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access