@Override
    public void startElement(final String uri,
                             final String localName,
                             final String qName,
                             final Attributes atts)
            throws SAXException {

        // For slowing down a load in testing
//        try {
//            Thread.sleep(2_000);
//            LOGGER.info("Finished sleep");
//        } catch (InterruptedException e) {
//            LOGGER.info("==================INTERRUPTED=======================");
//            Thread.currentThread().interrupt();
//        }

        depthLevel++;
        insideElement = true;
        content.clear();

        LOGGER.trace("startElement {} {} {}, level:{}", uri, localName, qName, depthLevel);

        if (VALUE_ELEMENT.equalsIgnoreCase(localName)) {
            insideValueElement = true;
            stagingValueOutputStream.clear();
        } else if (insideValueElement) {
            recordHavingSeenXmlContent();

            final String prefix = getPrefix(qName);
            if (!hasUriBeenApplied(prefix, uri)) {
                // elm has a uri that we have not done a fastInfoSet startPrefixMapping to
                // so do it now
                fastInfosetManuallyAddPrefixMapping(prefix, uri);
            }

            for (int i = 0; i < atts.getLength(); i++) {
                final String attrPrefix = getPrefix(atts.getQName(i));
                if (!hasUriBeenApplied(attrPrefix)) {
                    // attr has a uri that we have not done a fastInfoSet startPrefixMapping
                    // so do it now
                    final String attrUri = prefixToUriMap.get(attrPrefix);
                    if (attrUri != null) {
                        fastInfosetManuallyAddPrefixMapping(attrPrefix, attrUri);
                    }
                }
            }

//            LOGGER.trace("appliedUris {}", appliedUris);
////            if (!appliedUris.contains(uri) && !uri.equals(valueXmlDefaultNamespaceUri)) {
//            uriToPrefixMap.c
//            if (!appliedUris.contains(uri)) {
//                // we haven't seen this uri before so find its prefix and call startPrefixMapping on the
//                // serializer so it understands them
//                String prefix = uriToPrefixMap.get(uri);
//                if (prefix != null) {
////                    fastInfosetStartPrefixMapping(prefix, uri);
//                }
//                appliedUris.add(uri);
//            }

//            if (uri.equals(valueXmlDefaultNamespaceUri)) {
//                // This is the default namespace so remove it from the element
////                newUri = "";
//                newQName = localName;
////                fastInfosetStartPrefixMapping("", uri);
//            }

            fastInfosetStartElement(localName, uri, qName, atts);
        }

        super.startElement(uri, localName, qName, atts);
    }
This method looks for a post processing function. If it finds one it does
not output the element. Instead it stores data about the function and
sets a flag so that the function can be performed when the corresponding
end element is reached.

@param uri       The element's Namespace URI, or the empty string.
@param localName The element's local name, or the empty string.
@param qName     The element's qualified (prefixed) name, or the empty string.
@param atts      The element's attributes.
@throws org.xml.sax.SAXException The client may throw an exception during processing.
@see stroom.pipeline.filter.AbstractXMLFilter#startElement(java.lang.String,
java.lang.String, java.lang.String, org.xml.sax.Attributes)
stroom-pipeline/src/main/java/stroom/pipeline/refdata/ReferenceDataFilter.java