aboutsummaryrefslogtreecommitdiffstats
path: root/config-application-package/src/main/java/com/yahoo/config/application/ValidationProcessor.java
blob: b02ccc711c0bc034b8d4c9e59925ec4a5170c64d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.config.application;

import org.w3c.dom.Document;
import org.w3c.dom.NodeList;

import javax.xml.transform.TransformerException;
import java.io.IOException;

public class ValidationProcessor implements PreProcessor {

    @Override
    public Document process(Document input) throws IOException, TransformerException {
        NodeList includeitems = input.getElementsByTagNameNS("http://www.w3.org/2001/XInclude", "*");
        if (includeitems.getLength() > 0)
            throw new UnsupportedOperationException("XInclude not supported, use preprocess:include instead");
        return input;
    }

}