[thelist] preserving HTML in XSL

Alister Cameron alister at cameron.org
Thu Jan 24 06:51:37 CST 2002

Hope I can explain this succinctly!

Using XSLISAPI2.1, I am able to dynamically create an XML page which I then
push to an XSL stylesheet server-side for rendering the the client as
straight HTML/DHTML/JS/whatever.

The value of XSLISAPI2.1 is in giving me flexibility both with creating the
XML dynamically, and with selection of XSL stylesheets.

All that's fine. But I'm stuck on the issue of "passing throught" a chunk of
HTML which I "insert" into the HTML at an appropriate place (with an XML
tag), which is preserved through the XSL transformation, and is meant to
come out the other end, as rendered HTML along with the rest of it.

But alas, I can't get it not to "escape"... all the square brackets turn
into < etc. I've tried wrapping the html in CDATA tags, I've tried a
trick with wrapping the HTML in a comment tag... you name it.

Since I'm no guru, I'm sure there's more to try.

SUMMARY: I am looking for the generic how-to answer for including a chunk of
pre-prepared HTML in an XML file so that when the XML file is transformed
into HTML for the client (I'm just working with v4 and up web browser
clients here), the HTML slots into the rest of what the xsl stylesheet has
spat out, all as HTML to be rendered by the browser... no escaped crap!

Any ideas? Any tested code I can see?!

Thanks for your help.

Alister Cameron
Cameron Creative

(Please also send replies direct to me at alister at cameron.org too!)

More information about the thelist mailing list