private List<PreProcessor> setupChain() {
        List<PreProcessor> chain = new ArrayList<>();
        chain.add(new IncludeProcessor(applicationDir));
        chain.add(new OverrideProcessor(instance, environment, region, cloud, tags));
        chain.add(new PropertiesProcessor());
        chain.add(new ValidationProcessor()); // must be last in chain
        return chain;
    }
A preprocessor for services.xml files that handles deploy:environment, deploy:region, preprocess:properties, preprocess:include
and create a new Document which is based on the supplied environment and region

@author hmusum
config-application-package/src/main/java/com/yahoo/config/application/XmlPreProcessor.java