<html xmlns="http://www.w3.org/1999/xhtml"> <head> <script> function foo() { document.getElementById("ms").setAttribute("foo", "x"); } </script> </head> <body onload="foo()"> <mstyle xmlns="http://www.w3.org/1998/Math/MathML" id="ms" /> </body> </html>