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

Posted on 2006-05-10
Last Modified: 2008-01-09
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.
Question by:blindbull
    1 Comment
    LVL 60

    Accepted Solution

    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


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
    Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now