Solved

XML Transformation and CDATA Sections

Posted on 2001-06-04
2
472 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MySqlDump not dumping triggers 1 43
tomcat startup error 5 105
hibernate jars 4 45
eclipse console opening separately 2 29
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
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.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

831 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