xs:normalizedString
The xs:normalizedString type is identical to xs:string, except in the way that whitespace is normalized in its values. This whitespace normalization takes place during validation, and also when values are constructed or cast to xs:normalizedString. For values of type xs:normalizedString, the processor replaces each carriage return, line feed, and tab by a single space. This is different from xs:string values, where whitespace is preserved. There is no collapsing of multiple consecutive spaces into a single space; this is done with values of type xs:token.
The whitespace handling of the xs:normalizedString type is different from that of the normalize-string function, which does collapse multiple adjacent spaces to a single space.
The xs:normalizedString type is derived by restriction from xs:string, so any functions and operations that can be performed on strings, such as substring and comparing using the < operator, can also be performed on xs:normalizedString values.
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