Solved

XML Transformation and CDATA Sections

Posted on 2001-06-04
2
467 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
Comment Utility
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
Comment Utility
Thanks for the help.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

762 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

6 Experts available now in Live!

Get 1:1 Help Now