Converts $string-var (a string) to the normalizedString data type. As part of the conversion, all occurrences of tabs (#x9), line feeds (#xA) and carriage returns (#xD) are replaced with spaces (#x20).
xs:normalizedString(xs:string $string-var) —> xs:normalizedString
Returns $string-var after conversion to the normalizedString data type.
As part of the conversion to the normalizedString data type, tabs are replaced by spaces as shown in the following example query:
<result>{xf:normalizedString(" tab1 tab2 tab3 tab4")}</result>
The preceding query, generates the following XML result:
<result> tab1 tab2 tab3 tab4</result>
As part of the conversion to the normalizedString data type, carriage returns are replaced by spaces as shown in the following example query:
<result>{xf:normalizedString(" CR1 CR2 ")}</result>
The preceding query, generates the following XML result:
<result> CR1 CR2 </result>
W3C normalizedString data type description.