f:syntax-highlight

f:syntax-highlight — Performs syntax highlighting.

Function:
{http://docbook.org/ns/docbook/functions}syntax-highlight#1
{http://docbook.org/ns/docbook/functions}syntax-highlight#2
{http://docbook.org/ns/docbook/functions}syntax-highlight#3
Defined in:
highlight.xsl (3)
Used in:
modules/verbatim.xsl, highlight.xsl
Used by:

Synopsis

f:syntax-highlight($source as xs:string)
f:syntax-highlight($source as xs:string,
$language as xs:string)
f:syntax-highlight($source as xs:string,
$options,
$pyoptions as map(xs:string,xs:string)) as node()*

Description

Verbatim environments that specify a language can be syntax highlighted. Syntax highlighting adds additional spans so that, for example, CSS can be used to make keyword bold or quoted strings a different color.

Syntax highlighting requires an extension function. The list of languages that will be syntax highlighted is taken from $verbatim-syntax-highlight-languages.