Name

xs:normalizedString

Synopsis

xs:normalizedString is derived from xs:string by setting the whiteSpace facet to replace so that the carriage return (#xD) and tab (#x9) characters are replaced by spaces in the normalized value. (The new whitespace characters added in XML 1.1, NEL and line separator, are not affected.) A normalized string can contain any characters that are allowed in XML, although depending on context, special characters such as <, &, and " may have to be escaped with character or entity references in the usual way. All legal strings are also legal lexical representations of type xs:normalizedString. However, a schema-aware parser that presents the normalized value of an element, instead of the literal characters in the document, will replace all carriage returns and tabs with spaces before passing the string to the client application.

Constraining facets that apply to xs:normalizedString are length, minLength, maxLength, pattern, enumeration, and whiteSpace.

Get XML in a Nutshell, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.