With Xalan 2.6.0, when a simple stylesheet, say test.xsl and input xml, say test.xml is used, transformation works fine.
If simple test.xsl file include or import other stylesheets and imported/included stylesheets import/include more stylesheets, then, transformation works; however, in the final output (html), content inside xsl:comment tags are dropped. I have a big application that produced this problem. I cannot provide a simpler version of the testcase. However, I have resolved the issue by making one minor change in the code. I will provide the patch that resolved my problem.