diff options
Diffstat (limited to 'docs/xsl-generic')
-rw-r--r-- | docs/xsl-generic/highlighting/common.xsl | 124 | ||||
-rw-r--r-- | docs/xsl-generic/highlighting/xslthl-config.xml | 22 | ||||
-rw-r--r-- | docs/xsl-generic/html/highlight.xsl | 108 |
3 files changed, 127 insertions, 127 deletions
diff --git a/docs/xsl-generic/highlighting/common.xsl b/docs/xsl-generic/highlighting/common.xsl index 23ac77ea..32f1bbcf 100644 --- a/docs/xsl-generic/highlighting/common.xsl +++ b/docs/xsl-generic/highlighting/common.xsl @@ -1,62 +1,62 @@ -<?xml version='1.0'?> -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns:hl="java:net.sf.xslthl.ConnectorSaxon6" - xmlns:exsl="http://exslt.org/common" - exclude-result-prefixes="exsl hl" - version='1.0'> - -<!-- ******************************************************************** - $Id: common.xsl 7266 2007-08-22 11:58:42Z xmldoc $ - ******************************************************************** - - This file is part of the XSL DocBook Stylesheet distribution. - See ../README or http://docbook.sf.net/release/xsl/current/ for - and other information. - - ******************************************************************** --> - -<!-- You can override this template to do more complex mapping of - language attribute to highlighter language ID (see xslthl-config.xml) --> -<xsl:template name="language.to.xslthl"> - <xsl:param name="context"/> - - <xsl:choose> - <xsl:when test="$context/@language != ''"> - <xsl:value-of select="$context/@language"/> - </xsl:when> - <xsl:when test="$highlight.default.language != ''"> - <xsl:value-of select="$highlight.default.language"/> - </xsl:when> - </xsl:choose> -</xsl:template> - -<xsl:template name="apply-highlighting"> - <xsl:choose> - <!-- Do we want syntax highlighting --> - <xsl:when test="$highlight.source != 0 and function-available('hl:highlight')"> - <xsl:variable name="language"> - <xsl:call-template name="language.to.xslthl"> - <xsl:with-param name="context" select="."/> - </xsl:call-template> - </xsl:variable> - <xsl:choose> - <xsl:when test="$language != ''"> - <xsl:variable name="content"> - <xsl:apply-templates/> - </xsl:variable> - <xsl:apply-templates select="hl:highlight($language, exsl:node-set($content))"/> - </xsl:when> - <xsl:otherwise> - <xsl:apply-templates/> - </xsl:otherwise> - </xsl:choose> - </xsl:when> - <!-- No syntax highlighting --> - <xsl:otherwise> - <xsl:apply-templates/> - </xsl:otherwise> - </xsl:choose> -</xsl:template> - -</xsl:stylesheet> - +<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:hl="java:net.sf.xslthl.ConnectorSaxon6"
+ xmlns:exsl="http://exslt.org/common"
+ exclude-result-prefixes="exsl hl"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id: common.xsl 7266 2007-08-22 11:58:42Z xmldoc $
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://docbook.sf.net/release/xsl/current/ for
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- You can override this template to do more complex mapping of
+ language attribute to highlighter language ID (see xslthl-config.xml) -->
+<xsl:template name="language.to.xslthl">
+ <xsl:param name="context"/>
+
+ <xsl:choose>
+ <xsl:when test="$context/@language != ''">
+ <xsl:value-of select="$context/@language"/>
+ </xsl:when>
+ <xsl:when test="$highlight.default.language != ''">
+ <xsl:value-of select="$highlight.default.language"/>
+ </xsl:when>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="apply-highlighting">
+ <xsl:choose>
+ <!-- Do we want syntax highlighting -->
+ <xsl:when test="$highlight.source != 0 and function-available('hl:highlight')">
+ <xsl:variable name="language">
+ <xsl:call-template name="language.to.xslthl">
+ <xsl:with-param name="context" select="."/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$language != ''">
+ <xsl:variable name="content">
+ <xsl:apply-templates/>
+ </xsl:variable>
+ <xsl:apply-templates select="hl:highlight($language, exsl:node-set($content))"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <!-- No syntax highlighting -->
+ <xsl:otherwise>
+ <xsl:apply-templates/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
+
diff --git a/docs/xsl-generic/highlighting/xslthl-config.xml b/docs/xsl-generic/highlighting/xslthl-config.xml index dd83aa77..7c77f6fc 100644 --- a/docs/xsl-generic/highlighting/xslthl-config.xml +++ b/docs/xsl-generic/highlighting/xslthl-config.xml @@ -1,11 +1,11 @@ -<?xml version='1.0'?> -<xslthl-config> - <highlighter id='java' file='./java-hl.xml' /> - <highlighter id='delphi' file='./delphi-hl.xml'/> - <highlighter id='ini' file='./ini-hl.xml' /> - <highlighter id='php' file='./php-hl.xml' /> - <highlighter id='myxml' file='./myxml-hl.xml' /> - <highlighter id='m2' file='./m2-hl.xml' /> - <highlighter id='c' file='./c-hl.xml' /> - <namespace prefix="xslthl" uri="http://xslthl.sf.net" /> -</xslthl-config> +<?xml version='1.0'?>
+<xslthl-config>
+ <highlighter id='java' file='./java-hl.xml' />
+ <highlighter id='delphi' file='./delphi-hl.xml'/>
+ <highlighter id='ini' file='./ini-hl.xml' />
+ <highlighter id='php' file='./php-hl.xml' />
+ <highlighter id='myxml' file='./myxml-hl.xml' />
+ <highlighter id='m2' file='./m2-hl.xml' />
+ <highlighter id='c' file='./c-hl.xml' />
+ <namespace prefix="xslthl" uri="http://xslthl.sf.net" />
+</xslthl-config>
diff --git a/docs/xsl-generic/html/highlight.xsl b/docs/xsl-generic/html/highlight.xsl index 05896cd9..30f2153e 100644 --- a/docs/xsl-generic/html/highlight.xsl +++ b/docs/xsl-generic/html/highlight.xsl @@ -1,54 +1,54 @@ -<?xml version='1.0'?> -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns:xslthl="http://xslthl.sf.net" - exclude-result-prefixes="xslthl" - version='1.0'> - -<!-- ******************************************************************** - $Id: highlight.xsl 7266 2007-08-22 11:58:42Z xmldoc $ - ******************************************************************** - - This file is part of the XSL DocBook Stylesheet distribution. - See ../README or http://docbook.sf.net/release/xsl/current/ for - and other information. - - ******************************************************************** --> - -<xsl:template match='xslthl:keyword'> - <b class="hl-keyword"><xsl:apply-templates/></b> -</xsl:template> - -<xsl:template match='xslthl:string'> - <b class="hl-string"><i style="color:red"><xsl:apply-templates/></i></b> -</xsl:template> - -<xsl:template match='xslthl:comment'> - <i class="hl-comment" style="color: silver"><xsl:apply-templates/></i> -</xsl:template> - -<xsl:template match='xslthl:tag'> - <b class="hl-tag" style="color: blue"><xsl:apply-templates/></b> -</xsl:template> - -<xsl:template match='xslthl:attribute'> - <span class="hl-attribute" style="color: blue"><xsl:apply-templates/></span> -</xsl:template> - -<xsl:template match='xslthl:value'> - <span class="hl-value" style="color: blue"><xsl:apply-templates/></span> -</xsl:template> - -<xsl:template match='xslthl:html'> - <b><i style="color: red"><xsl:apply-templates/></i></b> -</xsl:template> - -<xsl:template match='xslthl:xslt'> - <b style="color: blue"><xsl:apply-templates/></b> -</xsl:template> - -<xsl:template match='xslthl:section'> - <b><xsl:apply-templates/></b> -</xsl:template> - -</xsl:stylesheet> - +<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xslthl="http://xslthl.sf.net"
+ exclude-result-prefixes="xslthl"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id: highlight.xsl 7266 2007-08-22 11:58:42Z xmldoc $
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://docbook.sf.net/release/xsl/current/ for
+ and other information.
+
+ ******************************************************************** -->
+
+<xsl:template match='xslthl:keyword'>
+ <b class="hl-keyword"><xsl:apply-templates/></b>
+</xsl:template>
+
+<xsl:template match='xslthl:string'>
+ <b class="hl-string"><i style="color:red"><xsl:apply-templates/></i></b>
+</xsl:template>
+
+<xsl:template match='xslthl:comment'>
+ <i class="hl-comment" style="color: silver"><xsl:apply-templates/></i>
+</xsl:template>
+
+<xsl:template match='xslthl:tag'>
+ <b class="hl-tag" style="color: blue"><xsl:apply-templates/></b>
+</xsl:template>
+
+<xsl:template match='xslthl:attribute'>
+ <span class="hl-attribute" style="color: blue"><xsl:apply-templates/></span>
+</xsl:template>
+
+<xsl:template match='xslthl:value'>
+ <span class="hl-value" style="color: blue"><xsl:apply-templates/></span>
+</xsl:template>
+
+<xsl:template match='xslthl:html'>
+ <b><i style="color: red"><xsl:apply-templates/></i></b>
+</xsl:template>
+
+<xsl:template match='xslthl:xslt'>
+ <b style="color: blue"><xsl:apply-templates/></b>
+</xsl:template>
+
+<xsl:template match='xslthl:section'>
+ <b><xsl:apply-templates/></b>
+</xsl:template>
+
+</xsl:stylesheet>
+
|