2. Overview of the config file XML structure

All elements and attributes are in the namespace http://indexdata.com/metaproxy. This is most easily achieved by setting the default namespace on the top-level element, as here:

    <metaproxy xmlns="http://indexdata.com/metaproxy" version="1.0">
   

The top-level element is <metaproxy>. This contains a <start> element, a <filters> element and a <routes> element, in that order. <filters> is optional; the other two are mandatory. All three are non-repeatable.

The <start> element is empty, but carries a route attribute, whose value is the name of route at which to start running - analogous to the name of the start production in a formal grammar.

If present, <filters> contains zero or more <filter> elements. Each filter carries a type attribute which specifies what kind of filter is being defined (frontend_net, log, etc.) and contain various elements that provide suitable configuration for a filter of its type. The filter-specific elements are described in Reference. Filters defined in this part of the file must carry an id attribute so that they can be referenced from elsewhere.

<routes> contains one or more <route> elements, each of which must carry an id element. One of the routes must have the ID value that was specified as the start route in the <start> element's route attribute. Each route contains zero or more <filter> elements. These are of two types. They may be empty, but carry a refid attribute whose value is the same as the id of a filter previously defined in the <filters> section. Alternatively, a route within a filter may omit the refid attribute, but contain configuration elements similar to those used for filters defined in the <filters> section. (In other words, each filter in a route may be included either by reference or by physical inclusion.)