private void createXPathExecutables() {
        final FieldIndex fieldIndex = queryInfoHolder.getFieldIndex();
        xPathExecutables = new XPathExecutable[fieldIndex.size()];

        for (int pos = 0; pos < fieldIndex.size(); pos++) {
            final String fieldName = fieldIndex.getField(pos);
            if (fieldName != null) {
                String xpathPart = fieldName;

                if (EVENT_ID.equals(xpathPart)) {
                    xpathPart = "@" + EVENT_ID;
                } else if (STREAM_ID.equals(xpathPart)) {
                    xpathPart = "@" + STREAM_ID;
                }

                String xpath = "/" + topLevelElementToSkip + "/" + secondLevelElementToCreateDocs + "/" + xpathPart;

                try {
                    xPathExecutables[pos] = compiler.compile(xpath);
                } catch (SaxonApiException e) {
                    log(Severity.FATAL_ERROR, LogUtil.message("Error in XPath Expression: {}", xpath), e);
                }
            }
        }
    }
Sets the locator to use when reporting errors.

@param locator The locator to use.
stroom-search/stroom-search-extraction/src/main/java/stroom/search/extraction/XPathExtractionOutputFilter.java