Heiko Niemann wrote:
Hi,
I would like to display a syntax highlighted XML source/code
(in this case WSDL) in HTML. I have found a couple stylesheets
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 serializer
in XSLT:
http://www.fgeorges.org/xslt/serial/
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 objects
(simulated using FXSL's f:apply()). So you can use the
serializer 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 ;-)
Regards,
--
Florent Georges
http://www.fgeorges.org/
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--