xsd:normalizedString
The type xsd:normalizedString
represents a character string that may contain any Unicode character allowed by XML. Certain characters, namely the "less than" symbol (<
) and the ampersand (&
), must be escaped (using the entities <
and &
, respectively) when used in strings in XML instances.
The xsd:normalizedString
type has a whiteSpace
facet of replace
, which means that the processor replaces each carriage return, line feed, and tab by a single space. This processing is equivalent to the processing of CDATA
attribute values in XML 1.0. There is no collapsing of multiple consecutive spaces into a single space.
Simple Type Information
Namespace: http://www.w3.org/2001/XMLSchema
Schema Document: datatypes.xsd
Content
- Based on xsd:string
- White Space: replace
Examples
Valid values | Comment |
---|---|
This is a string! | |
Édition française. | |
12.5 | |
an empty string is valid | |
PB&J | when parsed, it will become "PB&J" |
Separated by 3 spaces. | when parsed, the spaces will be retained |
This | when parsed, the line break will be replaced by a space |
Invalid values | Comment |
AT&T | ampersand must be escaped |
3 < 4 | the "less than" symbol must be escaped |
Type Inheritance Chain
- xsd:anySimpleType
- restricted by xsd:string
- restricted by xsd:normalizedString
- restricted by xsd:token
- restricted by xsd:language
- restricted by xsd:NMTOKEN
- used in list xsd:NMTOKENS
- restricted by xsd:Name
- restricted by xsd:NCName
- restricted by xsd:ID
- restricted by xsd:IDREF
- used in list xsd:IDREFS
- restricted by xsd:ENTITY
- used in list xsd:ENTITIES
- restricted by xsd:NCName
- restricted by xsd:token
- restricted by xsd:normalizedString
- restricted by xsd:string