[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

CDATA

Subject: CDATA
From: Jim Han <jhan@xxxxxxxxxxxxxxxx>
Date: Wed, 9 Apr 2003 10:48:59 -0500
ron paris
I need help outputing CDATA as HTML(Recognized as HTML).

Here's my xml:
<Article>
	<Title>The Blue Thunder Story</Title>
	<Type>
		<Name>Feature</Name>
		<Section>Product Focus</Section>
	</Type>
	<Pages>
		<Page No="0">
			<Title>Perfection Obsession</Title>
			<Content><![CDATA[
				<table width="520" border="0"
cellpadding="0" cellspacing="0">
				  <tr>
				    <td width="520" valign="top">
				      <p>&quot;Originally there was no
intention to market and sell car fuel,&quot;
				        said Horizon Engineering Manager,
John Adams. &quot;We just wanted a fuel
				        to race with - a fuel that was
better than what was on the market, that
				        was consistent from gallon to gallon
and a fuel that we could easily get.
				        What we ended up with was a fuel
that had several unique properties that
				        actually made tuning engines easier.
When industry leaders like Ron Paris
				        and several factory gas car teams
tried the fuel, they were the ones who
				        actually convinced us to market and
sell the fuel.&quot;</p>
				    </td>
				  </tr>
				</table>
			]]></Content>
		</Page>
	</Pages>
</Article>

My XSL: 
<xsl:stylesheet version = "1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:template match="Article"> 
		 <h1>
			  <xsl:value-of select="Title"/>
		 </h1> 
		 <h2>
			  <xsl:value-of select="Posted"/>
		 </h2>		 
		 <h2>
			  <xsl:value-of select="Author"/>
		 </h2> 
		 
		 <xsl:apply-templates select="Pages"/>
	</xsl:template>
	
	<xsl:template match="Pages"> 
		<xsl:apply-templates select="Page"/>
	</xsl:template>	
	
	<xsl:template match="Page"> 
		 <h3>
			  <xsl:value-of select="Title"/>
		 </h3> 
		 
		  <xsl:value-of select="Content"/>
	</xsl:template>		
</xsl:stylesheet> 

But my output in the browser is:

The Blue Thunder Story
03/19/2003
Perfection Obsession
<table width="520" border="0" cellpadding="0" cellspacing="0"> <tr> <td
width="520" valign="top"> <p>&quot;Originally there was no intention to
market and sell car fuel,&quot; said Horizon Engineering Manager, John
Adams. &quot;We just wanted a fuel to race with - a fuel that was better
than what was on the market, that was consistent from gallon to gallon and a
fuel that we could easily get. What we ended up with was a fuel that had
several unique properties that actually made tuning engines easier. When
industry leaders like Ron Paris and several factory gas car teams tried the
fuel, they were the ones who actually convinced us to market and sell the
fuel.&quot;</p> </td> </tr> </table> 


How can I get above CDATA to be recognized as HTML in the browser?
The reason why I put the content in cdata is that our article has different
html formats.

Thank you!

Jim Han



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.