To demonstrate the bug: 1) Load the example XML document (rawdata.xml) into Mozilla. 2) The browser should automatically load the XSLT stylesheet transform-raw.xsl, and display the transformed result (visible as the the string "data inside stuff") 3) Run the javascript script: javascript: if (typeof XMLSerializer != 'undefined') { var text = new XMLSerializer().serializeToString(document); var win = window.open('', 'sourceView'); win.document.open(); win.document.write('Serialized result document<\/title><\/head><body><pre id=%22result%22><\/pre><\/body><\/html>'); win.document.close(); win.focus(); win.document.getElementById('result').appendChild(win.document.createTextNode(text)); } void 0 This will pop a new window displayhing the serialzed results tree (THanks Martin Honnen!) 4) Note the <meta> tag that is present, but that shouldn't be there!