Click to See Complete Forum and Search --> : XSLT Output to HTML


Padrill
06-20-2003, 10:58 AM
I read in Bob DuCharme XSLT Quikly book that the output method="HTML" is used to allow tags such as <br> in the stylesheet. However Marrowsoft Xselerator, MSXSL and Xalan don't process the file but throw an error that <br> doesn't have a closing tag.

If Bob DuCharme is wrong what's the difference between using HTML and XML as output methods (since XHTML is valid XML)?

brendandonhue
06-20-2003, 11:10 AM
All tags in XHTML must be closed.
<br> Becomes <br></br>
XHTML allows a quicker version
<br/>
But that causes problems in older browsers. Adding a space helps older browsers to render it correctly.
A <br> in XHTML is
<br />

Charles
06-20-2003, 11:17 AM
It is a bit confusing, but your "literal result elements" need to follow the XML rules so that the whole stylesheet is a valid XML document. When generating HTML the processor will convert <br/> and <br></br> to <br>. You might also find that some processor drops some or all tags that are optional in HTML.

Padrill
06-20-2003, 11:44 AM
Thanx Charles.