Normalize-space is very useful function in XPath when you build it with reference of some string or keyword to use it webdriver script and it has leading or trailing intermediate repeating white space. Normalize-space will strip such unwanted space or white space. In selenium webdriver, very often we use keywords reference in building xpath. If there is not any good reference to build xapth then it is mandatory to use such keywords as reference.
You can look at my post describing different ways to build xpath .
Here i am presenting one example where we will use normalize-space function to build xpath and use it in selenium webdriver test script.