XSLT » XPath Core Functions » normalize-space

Syntax:
string = normalize-space(string)

The normalize-space function returns a string in which all of the preceding and trailing white space has been removed, and in which all internal sequences of white is replaced with one white space. The string argument is optional. If omitted, the default is to use the string value of the context node.