Name

xsd:normalizedString — Whitespace-replaced strings

Synopsis

<xsd:simpleType name="normalizedString” id="normalizedString">
 <xsd:restriction base="xsd:string">
 <xsd:whiteSpace value="replace"/>
 </xsd:restriction>
</xsd:simpleType>

Derived from

xsd:string

Primary

xsd:string

Known subtypes

xsd:token

Data parameters (facets)

enumeration, length, maxLength, minLength, pattern

Description

The lexical space of xsd:normalizedString is unconstrained (any valid XML character may be used). Its value space is the set of strings after whitespace replacement—i.e., after any occurrence of #x9 (tab), #xA (linefeed), and #xD (carriage return) have been replaced by an occurrence of #x20 (space) without any whitespace collapsing.

Restrictions

This is the only datatype that performs whitespace replacement without collapsing. When whitespace isn’t significant, xsd:token is preferred.

This datatype corresponds neither to the XPath function normalize-space() (which performs whitespace trimming and collapsing) nor to the DOM normalize method (which is a merge of adjacent text objects).

Example

The value of the element:

<title lang="en">
  Being a Dog Is 
  a Full-Time Job
</title>"

is the string: " Being a Dog Is a Full-Time Job “, in which all whitespace has been replaced by spaces, if the title element is a type xsd:normalizedString.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.121.156