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

RE: Handling CDATA element

Subject: RE: Handling CDATA element
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 9 Feb 2006 17:06:29 -0000
handling cdata
I'm afraid none of the tools handle this well. The sole purpose of CDATA is
to tell the system that the angle brackets around <br> aren't to be treated
as markup, which means that when you want to treat them as markup, you've
got a problem. disable-output-escaping is one way around that problem, but
it's messy.

It's not clear what you actually want to produce as your output or exactly
where your difficulty lies.

Michael Kay
http://www.saxonica.com/

 

> -----Original Message-----
> From: Thorsten Scherler [mailto:thorsten@xxxxxxxxxx] 
> Sent: 09 February 2006 16:22
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Handling CDATA element
> 
> Hi all,
> 
> I have a question regarding the CDATA element.
> 
> My problem is the following. I have a rss feed like:
> http://issues.apache.org/jira/secure/IssueNavigator.jspa?view=
> rss&pid=12310000&fixfor=12310040&resolutionIds=-1&sorter/field
> =priority&sorter/order=DESC&tempMax=25&reset=true&decorator=none
> that returns something like:
> 
> <description><![CDATA[html-to-document.xsl no longer converts 
> content to
> an XDoc. Instead it renders converts documents to XDoc, instead it
> allows H1, H2 etc. elements to pass through.
> <br>
> 
> <br>
> ]]></description>
> 
> Now in my xsl I have something like the following to preserve 
> the markup
> of the cdata (it can contain any html markup).
> ...
> <xsl:value-of select="description" disable-output-escaping="yes" />
> ...
> 
> If you remove @disable-output-escaping then it will transformed to
> &lt;br&gt;
> 
> That looses the markup information but result in well-formed markup. I
> prefer well-formed over well-presented, but best would be both. ;-)
> 
> I am unsure how to fix that, has somebody an idea?
> 
> TIA for any informations
> 
> salu2
> -- 
> thorsten
> 
> "Together we stand, divided we fall!" 
> Hey you (Pink Floyd)

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.