Solved

XML Transformation and CDATA Sections

Posted on 2001-06-04
2
469 Views
Last Modified: 2013-11-23
I have an XML element which contains HTML text which is not well-formed. So I contained the HTML in a CDATA section. . I am running a transformation using XSL to convert my document into HTML to be viewed in a browser. The parsing and the transformation work fine, except that the markup characters within the CDATA section are being converted to entities, so the end viewer is seeing the HTML markup displayed in the browser instead of the results of that HTML. So if within the CDATA section the
XML doc reads <B>HELLO</B>, the transformation output is &lt;B&re;HELLO&lt;B&rt;

The question is, how do I get the transformer to maintain the HTML within the CDATA section without transforming the mark-up characters into entities?
0
Comment
Question by:tgoglia
2 Comments
 
LVL 12

Accepted Solution

by:
ahosang earned 200 total points
ID: 6154205
You need the attribute:
disable-output-escaping="yes" to be put in your <xsl:value-of> tag like:

<xsl:value-of select="whatever" disable-output-escaping="yes"/>
0
 

Author Comment

by:tgoglia
ID: 6157202
Thanks for the help.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

943 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

7 Experts available now in Live!

Get 1:1 Help Now