Skip to content

Configuration File Format

dwdyer edited this page Sep 13, 2010 · 2 revisions

The Anorak configuration file is an XML file that describes the structure of one or more leagues and that specifies options that control the generation of HTML pages. This format is still evolving and is subject to change.

Example

Configuration Elements

<config>

The root element of the XML file is the <config> element. It has two mandatory attributes: output specifies the path (relative or absolute) to the directory in which HTML output will be generated, and templates specifies the location of the Anorak HStringTemplate templates to use. The <config> element contains one or more <league> elements.

<league>

The <league> element groups together one or more divisions. There is one mandatory attribute, name, which provides a label for the league system.

<division>

The <division> element represents a single grouping of teams that compete against each other over the course of a league season. It has one mandatory attribute, name, which specifies the name of the division. The <division> element contains one or more <season> elements representing current and/or previous seasons of this division.

<season>

The season element specifies the results data for a single season of a single division. The input attribute specifies the path to an RLT file containing the results for this season. The output attribute specifies a relative directory (below the output root specified by the <config> element) to receive the output generated for this season.

There are also a number of optional boolean attributes for a season (all of these attributes default to false if not specied):

  • aggregated Set to true when a dataset is made up from multiple seasons of the same division (e.g. an all-time Premier League table). Provides a hint to templates so that the layout can be optimised for this type of dataset.
  • collated Set to true when a dataset is made up from seasons from different divisions (e.g. a 2009/10 all-England table). Provides a hint to templates so that the layout can be optimised for this type of dataset.
  • archive Set to true when the season is not the current season. Prevents generation of form tables and current sequences (these are only meaningful in the present, not for historical seasons).
  • scorers Set to true when the data file contains complete goal-scorer information for the season, otherwise goal-scorers will be omitted from all results and top scorer statistics will not be generated.
  • neutral Set to true when the distinction between home and away fixtures is not meaningful. Prevents the generation of separate home and away tables.