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

Best way to include code samples

Subject: Best way to include code samples
From: "Larry Garfield" <lgarfiel@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 15 Aug 2001 17:28:42 -0500
include code
I suppose this is half an XML question, but since it's being processed
through XSLT I suppose it's fair game.

I have an XML file that includes code snippets and samples, that are
themselves in XML, either of the same DTD or another DTD.  The destined
output is XHTML or Text.  In the XHTML, I'd like the code snippets passed
through and entity-ified (if there is such a word), so that when viewed in a
web browser the output looks like "<html>" (meaning lots of &gt; and &lt;).
In the text output, I'd just like it passed through directly.  In both cases
I want to maintain the current formatting as much as possible.

Would wrapping these snippets in CDATA sections be sufficent?  Will that
result in adequate conversion of the tags into output that looks like tags?
What changes will I need in my XSLT scripts then to make sure it processes
those correctly?  Or is there a better method?

Thanks in advance.

--Larry Garfield


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.