xslthl Configuration
xslthl is configured through an XML file as explained in the xslthl-config.xml section. The location to this configuration file can be provided as the 3rd argument to the highlight(...) xslt function. Or by setting a Java system property.
xslthl-config.xml file
This is the main configuration file for xslthl. It contains information about what highlighter configurations to load, to what language id they should be associated to. It also contains information on what XML prefix and namespace uri to use for the generated XML elements.
This configuration file starts with an <xslthl-config> tag. Within this tag you can specify zero or more <highlighter> elements. It can contain a single <namespace> element.
<highlighter> element
This element contains two attributes:
- id: the identifier of for the language that is being associated with the highlighter configuration file. This id should be used as the first argument of the highlight(...) function
- file: a relative file name of the highlighter configuration file to load. It is relative to the xslthl-config.xml file. Information about the syntax of these highlighter configuration files can be found in this document.
<namespace> element
This item defines the XML namespace and prefix to use for the generated elements. It can be use only once in the configuration file. It has the following attributes:
- prefix (default: xslthl): the namespace to register.
- url (default: http://xslthl.sf.net): the uri to use for this namespace.
Java system properties
xslthl recognizes the following system properties:
- xslthl.config: the location to the configuration file to use (when no explicit configuration file was specified)
- xslthl.config.verbose: if set to true debug information will be written to the standard output during loading of the configuration file. This can be useful for debugging configuration problemens. (Deprecated as of version 2.1)
- xslthl.noexternal: if set to true the languageId parameter of the highlight(...) function can only contain the id of a registered syntax highlighter and can not contain an location to a highlighter configuration file.
- xslthl.loglevel: Set the debug log output, can be any of: SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST. Default is WARNING. (Since 2.1)