FAQ: XSL Transformations (XSLT) in Mozilla
"Just like for XHTML, document.write is not supported during XSLT transformations. Sadly, current builds don't error, but just give unexpected results, like crashes."