summaryrefslogtreecommitdiff
path: root/docs/xsl-generic/highlighting/common.xsl
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2019-05-28 07:20:50 -0400
committerReinhard Tartler <siretart@tauware.de>2019-05-28 07:20:50 -0400
commit6017757bc079f4446aa77bc5c0855c52741280f4 (patch)
tree41bfcfc2aab37312ef73bf9b30867a235c8117f3 /docs/xsl-generic/highlighting/common.xsl
parent1b839d11810d6202f9b6f41db8f0ec3197e6a867 (diff)
New upstream version 0.13~~git20190527.g039c4a1
Diffstat (limited to 'docs/xsl-generic/highlighting/common.xsl')
-rw-r--r--docs/xsl-generic/highlighting/common.xsl124
1 files changed, 62 insertions, 62 deletions
diff --git a/docs/xsl-generic/highlighting/common.xsl b/docs/xsl-generic/highlighting/common.xsl
index 32f1bbcf..23ac77ea 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>
+