translate() is quite inappropriate here, it converts individual characters.
You basically seem to want the logic
if contains($a, $b)
then concat(substring-before($a, $b), substring-after($a, $b)
else (:I suspect:) $a
(except that you'll have to apply that recursively if you want to eliminate multiple occurrences of $b).
In 2.0 you can use the replace() function.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference