Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
| Search | Today's Posts | Mark Forums Read
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 10th, 2006, 11:10 AM
c2c c2c is offline
Registered User
 
Join Date: Sep 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Render HTML inside CDATA with XSL

Hi, I'm trying to style my Atom 1.0 feed with XSL.
I need to use <![cdata[...]]> to prevent special characters to create a parse error.
But then HTML tags inside <![cdata[...]]> aren't recognized by any browser.

That's the part of my Atom 1.0 feed :
Code:
<summary type="xhtml">
<![cdata[
<div xmlns="http://www.w3.org/1999/xhtml">
my content
</div>
]]>
</summary>
and I get :
Code:
<div xmlns="http://www.w3.org/1999/xhtml">
my content
</div>
instead of :
Code:
my content
Using <xsl:value-of select="atom:summary"/>
I tried several ways to get it work, but none did :

method="text"
cdata-section-elements="atom:summary"
disable-output-escaping="yes"
<summary type="xhtml"><![cdata[<div xmlns="http://www.w3.org/1999/xhtml">my content</div>]]></summary>
sdgsdg
I took example on my feedburner feed.
Their BrowserFriendly feature (which is just an XSL in fact) works fine on my feed,
but once I copy locally my feedburner feed (the XML file) and try to view it still using their XSL http://feeds.feedburner.com/~d/styles/atom10full.xsl, it's broken, HTML tags aren't recognized.




Similar Threads
Thread Thread Starter Forum Replies Last Post
Rendering HTML inside XML through XSL - HELP !!! jilly XSLT 6 May 23rd, 2007 10:36 AM
How to read cdata in xsl gantait XSLT 4 February 26th, 2007 04:34 AM
Render HTML tags jacksprophet XSLT 1 December 28th, 2006 07:03 PM
cdata-section-elements in xsl:output ROCXY XSLT 1 March 2nd, 2006 11:44 AM
CDATA in XML - convert to HTML suri XSLT 1 July 31st, 2003 08:22 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.