There are several options when generating JSP, or any other "not-quite-XML" syntax:
(a) use xsl:output method="text" and do all the serialization yourself
(b) use xsl:output method="xml" in conjunction with disable-output-escaping and/or XSLT 2.0 character maps
(c) generate pure XML and then postprocess it using some other technology
(d) write your own output method, if your XSLT processor allows this
(e) In the case of JSP, there is a pure XML syntax that's an alternative to the "non-XML" syntax using tags such as <%...%>.
I would recommend (e) as the cleanest way to go. None of the other options is very satisfactory.
See for example
http://weblogs.java.net/blog/simongb...g_webap_6.html
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference