Web Development

General discussion


XSLT: from XML to HTML?

By Engineer-TH ·

I tried to come up a XML file which conatins a
comments field. I like to put line-break at
the place I like. I tried <BR/> but it was
removed after I applied xslt or xsltproc on
my XML file. The result HTML was no line-break
at all.

Is there any way I can solve the problem?

Please reply your comments or suggestions
to tony_hsu52@yahoo.com directly.



This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

don't put BR in XML file

by Jay Eckles In reply to XSLT: from XML to HTML?

You don't want to put elements like BR in your XML file unless BR is defined in the XML application you're using (like XHTML, for example). Instead, when you're writing the HTML for the transformation of the comments element in your XSLT, include the BR there. The BR is not making it to the HTML because your XSLT probably isn't looking for a BR as part of that XML application.

Good luck.


Related Discussions

Related Forums