You can create your own XSLT from scratch if you wish, but you may find it easier to adapt docx4j's existing HTML output code.
2.8.1 contains 2 ways of generating HTML output.
The first (and primary) way is via XSLT. See HTMLExporterNG2 and docx2xhtmlNG2.xslt.
The other is HtmlExporterNonXSLT, which was added as a proof of concept since running Xalan extension functions on Android is problematic. It is not as complete/mature as the XSLT based approach.
A comment looks something like:
Using xml Syntax Highlighting
quick brown </w:t>
Parsed in 0.004 seconds, using GeSHi
Since a comment is comprised of "point" tags, not a single XML container, your challenge is to know when you are 'in' a comment. ie you have to maintain state.
Using XSLT, you can maintain state passing a param between templates, or going into a specific mode, or via extension functions. You can do it using any of these approaches (though I'd look at using the modelStates object).
State is easier to maintain using HtmlExporterNonXSLT, since that is pure Java. But putting comments aside, you should try it first to see how far off the HTML output is from your needs.
Hope this helps.. Jason