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

RE: Insert HTML Page into XML CDATA Tag


insert html into xml
> I have a very big problem.
> I create a little web site and I use XSL + XML to produce
> output.Now I
> want to add a part of html page into xml tag to use a custom
> page section.
> But i find a problme,
>
> see the example :
>
> I use this xml :
>
> <resources>
>     <html><![CDATA[<B>Hello World</B>]]></html>
> </resources>
>

The purpose of CDATA is to tell the XML parser that the <B> is to be treated
as ordinary character data, not as markup. In your case you want it treated
as markup. So why are you putting it in CDATA?

Perhaps it's HTML rather than XML, so you can't nest it directly. The best
answer to that is to make the HTML into XHTML. But OK, you can't always do
that when you have lots of legacy HTML. To deal with that messy situation,
XSLT provides a messy tool: it's called disable-output-escaping="yes". Use
it only when you are desparate, and can't find a proper design solution to
the requirement.

Michael Kay
Software AG
home: Michael.H.Kay@n...
work: Michael.Kay@s...

>


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.