Take out the
Code:
xmlns="http://www.w3.org/TR/REC-html40"
it does not make sense as HTML 4 is an SGML application that does not know any namespaces.
If you want the stylesheet to create a HTML 4 output document then don't use any namespace at all. If you want to create a XHTML 1.0 output document then use
Code:
xmlns="http://www.w3.org/1999/xhtml"
With IE you might get lucky that it feeds the transformation result to its HTML parser which simply ignores the xmlns="http://www.w3.org/TR/REC-html40" but Mozilla will create an XML result document tree and then does not recognize the namespace of all the elements as it is not defined.