Name

normalize-space( )

Synopsis

                     string normalize-space( )
string normalize-space(string s)

The normalize-space() function strips all leading and trailing whitespace from its argument and replaces each run of whitespace with a single space character. Among other effects, this removes all line breaks. If the argument is omitted, it normalizes the string-value of the context node. A nonstring may be passed to this function, in which case it’s automatically converted to a string, as if by the string( ) function, and that string is normalized and returned.

Get XML in a Nutshell, 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.