Name
xs:whiteSpace — Allows you to specify how whitespace processing should be performed on the contents of a type
Applies to
xs:normalizedString
,
xs:string
Attributes
value
One of
preserve
,replace
, orcollapse
Operation
This facet determines how the schema processor will report
whitespace contained in string values. If the value
attribute is set to preserve
, all whitespace will be kept
unchanged. If the value
attribute is set to replace
,
all whitespace characters—including #x9
(tab), #xA
(line feed), #xD
(carriage return), and #x20
(space)—will be replaced with space
characters. If the value
attribute is set to collapse
,
every sequence of whitespace characters will be replaced with a
single space.
Datatypes may also perform their own whitespace processing,
but once whitespace is discarded through replace
or collapse
, which is the case for all
types except xs:string
and
xs:normalizedString
, it cannot
be recovered.
Get XML Pocket Reference, 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.