Your problem has nothing to do with HTML tags. If the content type is "text/plain", the browser will display whatever you send as plain, uninterpreted text. If you send HTML, you will see the HTML source.
The problem is probably that you set a "text/plain" content type in your
JSP, that is
before it gets fed through Xalan. Actually, Xalan determines its own output content type. You can control this - how else? - using the XSL template. The tag controlling this is <output/>. You use it directly inside the <stylesheet> (or <transform> ) element.
<output method="text"/> should produce plain text output. If you want a MIME type other than "text/plain", add a "media-type" attribute, e.g.
media-type="text/chocolate". You can also use an "encoding" attribute to indicate the character encoding used.
<output method="html"/> should produce HTML output. Again you can specify a MIME type and/or encoding. In addition, you can specify a document type attribute, e.g.
doctype-system="html3.2.dtd". This should cause Xalan to emit a
<!DOCTYPE> tag in the HTML output.
This means that you would create two stylesheets, each with a different
<output/> tag. I assume your XML is supposed to specify the content, the stylesheets determine how it is rendered. Text and HTML are quite different ways to render your content; it makes sense to use separate stylesheets for them.
- Peter
[This message has been edited by Peter den Haan (edited May 10, 2001).]