How to render HTML tags from XML in an XSLT transformation?

I have a small XSLT file that has an output method set as follows:

      <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>

The problem that I have is that the XSLT file is transformed against XML from a database. This XML contains html tags such as <strong and <b and the tags are displayed in the output of the page. What I want is for the result of the transform to result in the HTML tags being applied in the output.

For example, The <u>knees</u> are <em>good</em> for walking should be displayed in the output with the knees underlined and the good bold but I get only the text with the tags as text.

The XSLT is transformed via an ASP.NET XML control.

Thanks for any help given I am really stuck.
blindbullAsked:
Who is Participating?
 
Geert BormansConnect With a Mentor Information ArchitectCommented:
Hi blindbull,

"The <u>knees</u> are <em>good</em> for walking"

If you see this, that means that the tags are escaped like this
"The &lt;u&gt;knees&lt;/u&gt;

in the XSLT you can switch this escaping off
if the above is eg. in element "test"
you can do this
<xsl:value-off select='test' disable-output-escaping="yes"/>
that should do the trick

Cheers!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.