Re: [xsl] Syntax Highlighting

Subject: Re: [xsl] Syntax Highlighting
From: Florent Georges <lists@xxxxxxxxxxxx>
Date: Wed, 16 Dec 2009 15:41:09 +0000 (GMT)
Heiko Niemann wrote:


> I would like to display a syntax highlighted
XML source/code
> (in this case WSDL) in HTML. I have found a couple
> that might do the job. To ease my search I would like to know
whether there are any recommendations for this task. The
> stylesheet should
support idention.

  Back a few years ago, I wrote a general purpose XML
in XSLT:

  If I remember
well, the serializer takes care of several
properties, like indentation,
whitespace handling (supports
@xml:space), even namespace reduction if I
remember correctly,
etc., and delegates the actual serialization to function
(simulated using FXSL's f:apply()).  So you can use the
with different configurations in the same transform.

  The distribution
contains an implementation to serialize to
plain text and another to HTML
(generating span elements with
@class to configure easily the result, but you
can also configure
it at the XSLT level).

  That could be a nice example to
translate to XSLT 2.1 ;-)


Florent Georges

Current Thread