Re: [xsl] Best way to include code samples

Subject: Re: [xsl] Best way to include code samples
From: Larry Garfield <lgarfiel@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 16 Aug 2001 07:45:07 -0500
Yow!  Looks impressive, but perhaps overkill?  I only want to preserve a snippet
within the document, with different snippets in different DTDs.  I'd like to be
able to keep the document (which is in DocBook) valid against the DTD as well,
which would necessitate CDATA, wouldn't it?

Evan Lenz wrote:

> Hi Larry,
>
> A few people have implemented this. Check out my "xml-to-string" converter
> at http://www.xmlportfolio.com/xml-to-string. Links to other examples,
> including Oliver Becker's, which is more specifically oriented to HTML
> syntax-coloring, can be found at
> http://www.dpawson.co.uk/xsl/sect4/N10301.html.
>
> Hope this helps,
>
> Evan Lenz
> XYZFind Corp.
>
> > -----Original Message-----
> > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Larry
> > Garfield
> > Sent: Wednesday, August 15, 2001 3:29 PM
> > To: XSL List
> > Subject: [xsl] Best way to include code samples
> >
> >
> > 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
> >
> >
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

--
Larry Garfield
lgarfiel@xxxxxxxxxxxxxxxxxxx

Do you have a PalmOS Organizer?  Click here to add me to your address book:
http://signature.coola.com/?lgarfiel@xxxxxxxxxxxxxxxxxxx

-- "If at first you don't succeed, skydiving isn't for you." :-)



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


Current Thread