The following is an example of syntax highlighting through xslt using xslthl . The following Xslt processor was used: SAXON 8.7 from Saxonica ( )

Example XML document

This uses the standard builtin xml highlighter

<?xml version="1.0"?>

  Devpaks repository 4.0 - web portal
  Copyright (C) 2005  Michal Molhanec

  This program is free software; you can redistribute it and/or
  modify it under the terms of the GNU General Public License
  as published by the Free Software Foundation; either version 2
  of the License, or (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

<xsl:stylesheet xmlns:xsl="" version="1.0">

<xsl:import href="common.xsl"/>

<xsl:template match="/page">

Is this information correct?
<xsl:value-of select='@summary'/>
If it's not use Go back button of your browser or click on Restart wizard link
<a href='do_add_devpak.php' id='yeslink'>Yes, all information is correct.</a>

<p><a href="">bug #2023748</a> test
<b><u>underlined</u> and bold</b>



<xsl:template name='extracss'>
  <style type="text/css" media="screen">
    pre {
      background: white;
      border: 3px solid black;
      padding: 3px;
    #yeslink {
      font-weight: bold;



Another example

<code language="xml" xml:space="preserve">
		plain data that may contain > and < without issues

	only text sections are highlighted, real XML tags are untouched
	below you should see a header 

This is formatted as a header <no-tag>

<!-- this code is still highlighted -->

Generated by: SAXON 8.7 from Saxonica ( ) - Xslt version: 2.0