RE: [xsl] rendering xml fragment tree as syntax highlighted HTML

Subject: RE: [xsl] rendering xml fragment tree as syntax highlighted HTML
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 12 Jan 2007 15:47:17 -0000
> I want to copy a fragment tree from my source xml document 
> using <xsl:copy-of/> to the result html document.
> This xml fragment should be rendered als well known code2html 
> tools does it for perl code etc.
> It means at least all < and > have to be transformed into 
> &lt; and &gt;

If you want to transform the subtree, then you can't use xsl:copy-of.
xsl:copy-of always produces an exact copy. You need a modified identity
template. I can't tell you any more, because the way "well known code2html
tools does it for perl code" isn't well-known to this reader.

Michael Kay
http://www.saxonica.com/

Current Thread