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

RE: Mal-formed HTML within XML

Subject: RE: Mal-formed HTML within XML
From: Maria Amuchastegui <mamuchastegui@xxxxxxxxxxx>
Date: Sun, 20 Feb 2005 17:58:06 -0500
maria amuchastegui
How do I use disable-output-escaping in conjunction with CDATA?

I tried this but it didn't work:

<Html><xsl:text disable-output-escaping="yes">
<![CDATA[
<p>This is the Summary section.
]]>
</xsl:text>
</Html>

Maria

-----Original Message-----
From: Michael Kay
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Sent: 20/02/05 5:31 PM
Subject: RE:  Mal-formed HTML within XML

> For historical reasons, I need to store mal-formed html 
> within my xml data,
> and then output it as html, without the tags showing.

Two possible solutions:

(a) use the tidy utility to make the HTML well-formed

(b) use disable-output-escaping to serialize the CDATA content without
escaping the angle brackets.

Usual caveats about d-o-e apply, but this is the use case that justifies
its
inclusion in the spec.

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

> 
> <Content>
> 	<Section ref="2">
> 		<Name>Summary</Name>
> 		<HTML><p>Hello world&nbsp;</HTML>
> 	</Section>
> <Content>
> 
> If I put the html inside CDATA tags, then the tags are 
> displayed in the
> browser, but if I don't use CDATA then the xml is not well-formed.
> 
> Is there a way to do this?
> 
> Maria

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.