Have you tried toUpperCase(substring($name,0,1))+toLowerCase(substring($name,1))
Edit: I have tested as follows:
toUpperCase(substring($Contact/Attribute,0,1)) + toLowerCase(substring($Contact/Attribute,1))
gives exactly the same results as
replaceFirst(toLowerCase($Contact/Attribute), substring($Contact/Attribute,0,1), toUpperCase(substring($Contact/Attribute,0,1)))
The second one is the method suggested by Bas. Personally, I think the first method is easier to see what's happening, but both work.
Shouldn't substring($name, 1, 0) be substring($name, 0, 1) ?