You need to be aware that when you say a problem is urgent, many people will avoid responding, because they prefer helping people who have time to study the answers carefully and learn from them.
The first thing to ask is: can you use XSLT 2.0 for this? You're using ends-with(), which is a 2.0 function, and that suggests you could use regular expressions, in which case you can use
replace($labelValue, '(^.*?)\.*$', '$1')
However, creative solutions are often possible in 1.0. I think you could solve this one by using translate() to translate "." into space, then using normalize-space(), then using translate() to translate spaces back into ".".
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference