Depends on whether you want to truncate names longer than 6 chars or leave them as they are. The following code truncates:
substring(concat('.....', $in), string-length($in))
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference