@Override
    public void startDocument() throws SAXException {
        // If we are stepping then we always reset for each doc.
        if (steppingMode) {
            // Assume the first line is the XML declaration.
            lineNo = 1;
            colNo = 0;
            depth = 0;
            inStartElement = false;
        }

        super.startDocument();
    }
This method tells filters that a stream is about to be parsed so that
they can complete any setup necessary.
stroom-pipeline/src/main/java/stroom/pipeline/filter/ResultLocator.java