Hi,
One good thing is that it does not print it anymore. But it 
still does not process it to render the collapsable / 
expandable javascript tree.
ex: 
http://www.idiap.ch/~guillemo/JAVASCRIPT/dynapi/docs/examples/
TEST2.xml with the sylesheet named Testdiv.xsl (in the same 
directory).
while OK in html: 
http://www.idiap.ch/~guillemo/JAVASCRIPT/dynapi/docs/examples/
collapsemenu1.html
Your stylesheet is a combination of a normal XSLT stylesheet and simplified 
syntax <http://www.w3.org/TR/xslt#result-element-stylesheet>, i.e. broken. 
Remove xsl:output and xsl:template instructions, they're not allowed in 
simplified syntax stylesheets.
You should install a command-line XSLT processor and try to run the 
transformation from the command-line, easier for development. When you get it 
to work on command-line, it (the transformation) will work on the browsers, too.
Cheers,
Jarno - SITD: Snuff Machinery (9mm RMX by A. Deal & T. Schmidt)
 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list