private void handleValueEndElement() throws SAXException {
        LOGGER.trace("End of value XML fragment");
        LOGGER.trace("================================================");
        insideValueElement = false;

        if (haveSeenXmlInValueElement) {
            // Complete the fastInfoSet serialisation to stagingValueOutputStream
            fastInfosetEndDocument();
            typeId = FastInfosetValue.TYPE_ID;
        } else {
            // Simple string value
            final String value = content.toString();
            if (NullSafe.isBlankString(value)) {
                typeId = NullValue.TYPE_ID;
            } else {
                typeId = StringValue.TYPE_ID;
                stagingValueOutputStream.write(value.getBytes(StandardCharsets.UTF_8));
            }
        }
    }
This method applies a post processing function if we are currently within
a function element. At this stage we should have details of the function
to apply from the corresponding start element and content to apply it to
from the characters event.

@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.
@throws SAXException The client may throw an exception during processing.
@see stroom.pipeline.filter.AbstractXMLFilter#endElement(String,
String, String)
stroom-state/stroom-state-impl/src/main/java/stroom/state/impl/pipeline/StateFilter.java