6. Configuration

When CoffeePot starts, it looks for a configuration file, a Java properties file. If a file named .nineml.properties is found in the user’s home directory, that file is loaded. If that file doesn’t exist, CoffeePot searches for nineml.properties (no leading “.”) on the class path.

An example nineml.properties file:


If the file is found and is a usable Java properties file, the following options are read from it:

cache (directory name)

The location of the cache.

default-log-level (string)

The default log level: “trace”, “debug”, “info”, “warning”, “error”, or “silent”.

graphviz (filename)

The location of the Graphviz “dot” program that should be used for rendering SVG diagrams of graphs and trees.

ignore-trailing-whitespace (boolean)

If true, trailing whitespace at the end of input files will be ignored if it isn’t successfully parsed.

log-levels (string)

A list of log category/level mappings.

pedantic (boolean)

By default, CoffeePot accepts certain grammar extensions, such as pragmas. If pedantic is true, only grammars strictly conforming to the Invisible XML specification may be used.

progress-bar (boolean, or “tty”)

Setting the progress bar to true or false enables or disables it. Setting it to “tty” enables it only if the output is going to a “tty”, an interactive computer terminal.

prefix-parsing (boolean)

If true, a parse will succeed if it matches a prefix of the input.

pretty-print (boolean)

If true, line breaks and indentation will be added to the XML output so that it’s easier to read.

trailing-newline-on-output (boolean)

If true, a newline will be printed after the output. It’s often useful to have a newline at the end of the XML, after the closing tag of the document element.