This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Best way to include code samples
- To: "XSL List" <xsl-list at lists dot mulberrytech dot com>
- Subject: [xsl] Best way to include code samples
- From: "Larry Garfield" <lgarfiel at students dot depaul dot edu>
- Date: Wed, 15 Aug 2001 17:28:42 -0500
- Reply-To: xsl-list at lists dot mulberrytech dot com
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 > and <).
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