Pass the call on to the underlying handler
@see org.xml.sax.ext.DeclHandler#externalEntityDecl(String, String, String)
162060
public void externalEntityDecl(
        String name,
        String publicId,
        String systemId)
        throws SAXException
    {
        if (m_firstTagNotEmitted)
        {
            flush();
        }
        m_handler.externalEntityDecl(name, publicId, systemId);
    }
535105
public void elementDecl(String name, String model) throws SAXException {
		if (preserveDTD) {
			// e.g. <!ELEMENT Hello (#PCDATA)>
			// --> name == Hello && model == (#PCDATA) <--
			docTypeText += "<!ELEMENT " + name + " " + model + "> ";
		}
	}
533583
def handleEntity(self, ctxt):
        
        if ctxt is None: ctxt__o = None
        else: ctxt__o = ctxt._o
        libxml2mod.xmlHandleEntity(ctxt__o, self._o)
277647
@Transactional
    @Override
    public ExternalPortletType deleteData(String id) {
        IPortletType portletType = this.portletTypeRegistry.getPortletType(Integer.parseInt(id));
        if (null == portletType) {
            return null;
        }

        ExternalPortletType result = convert(portletType);
        this.portletTypeRegistry.deleteChannelType(portletType);
        return result;
    }
1130730
private void initCld(final TransactionImpl tx)
    {
        final IndirectionHandler handler = ProxyHelper.getIndirectionHandler(obj);
        if(handler != null)
        {
            this.handler = handler;
            isNew = Boolean.FALSE;
            identity = handler.getIdentity();
            if(handler.alreadyMaterialized())
            {
                cld = tx.getBroker().getClassDescriptor(handler.getRealSubject().getClass());
            }
            else
            {
                cld = tx.getBroker().getClassDescriptor(identity.getObjectsRealClass());
            }
        }
        else
        {
            cld = tx.getBroker().getClassDescriptor(obj.getClass());
        }
    }
851364
public void elementDecl(String arg0, String arg1) throws SAXException
    {
        if (m_firstTagNotEmitted)
        {
            emitFirstTag();
        }
        m_handler.elementDecl(arg0, arg1);
    }
1007484
@POST
    @Path("fcr:commit")
    public Response commit(@PathParam("path") final String externalPath) {
        LOGGER.info("Commit transaction '{}'", externalPath);
        return finalizeTransaction(externalPath, getUserPrincipal(), true);
    }
265038
@Override
    public void elementDecl(final String name, final String model)
            throws SAXException
    {
        LOG.trace("elementDecl:{},{}", name, model);
        this.context.addElementDoctype(name, model);
    }
257178
private static SAXParser createSAXParser()
      throws ParserConfigurationException, SAXException {
    SAXParserFactory factory = SAXParserFactory.newInstance();
    factory.setValidating(false);
    factory.setXIncludeAware(false);
    factory.setFeature(
        "http://xml.org/sax/features/external-general-entities", false);
    factory.setFeature(
        "http://xml.org/sax/features/external-parameter-entities", false);
    factory.setFeature(
        "http://apache.org/xml/features/nonvalidating/load-external-dtd",
        false);
    factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);

    SAXParser parser = factory.newSAXParser();
    XMLReader xmlReader = parser.getXMLReader();
    xmlReader.setEntityResolver(NOOP_RESOLVER);
    return parser;
  }
1182477
protected void safeExecuteChangeListener(CmsEntity entity, I_CmsEntityChangeListener listener) {

        try {
            listener.onEntityChange(entity);
        } catch (Exception e) {
            String stack = CmsClientStringUtil.getStackTrace(e, "<br />");
            CmsDebugLog.getInstance().printLine("<br />" + e.getMessage() + "<br />" + stack);
        }
    }
221889
private EntityDecl expandUnresolvedEntity(String id)
        throws XMLStreamException
    {
        XMLResolver resolver = mConfig.getUndeclaredEntityResolver();
        if (resolver != null) {
            /* Ok, we can check for recursion here; but let's only do that
             * if there is any chance that it might get resolved by
             * the special resolver (it must have been resolved this way
             * earlier, too...)
             */
            if (mInput.isOrIsExpandedFrom(id)) {
                throwRecursionError(id);
            }

            WstxInputSource oldInput = mInput;
            oldInput.saveContext(this);
            // null, null -> no public or system ids
            int xmlVersion = mDocXmlVersion;
            // 05-Feb-2006, TSa: If xmlVersion not explicitly known, defaults to 1.0
            if (xmlVersion == XmlConsts.XML_V_UNKNOWN) {
                xmlVersion = XmlConsts.XML_V_10;
            }
            WstxInputSource newInput;
            try {
                newInput = DefaultInputResolver.resolveEntityUsing
                    (oldInput, id, null, null, resolver, mConfig, xmlVersion);
                if (mCfgTreatCharRefsAsEntities) {
                    return new IntEntity(WstxInputLocation.getEmptyLocation(), newInput.getEntityId(),
                            newInput.getSource(), new char[]{}, WstxInputLocation.getEmptyLocation());
                }
            } catch (IOException ioe) {
                throw constructFromIOE(ioe);
            }
            if (newInput != null) {
                // true -> is external
                initInputSource(newInput, true, id);
                return null;
            }
        }
        handleUndeclaredEntity(id);
        return null;
    }
915450
private static Source createSafeSource(XMLReader reader, InputSource source) {
        try {
            reader.setFeature("http://xml.org/sax/features/external-general-entities", false);
        } catch (SAXException ignored) {
            /* Fallback entity resolver will be used */
        }
        try {
            reader.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
        } catch (SAXException ignored) {
            /* Fallback entity resolver will be used */
        }
         // Fallback in case the above features are not supported by the underlying XML library.
        reader.setEntityResolver((publicId, systemId) -> {
            return new InputSource(new ByteArrayInputStream(XXE_MARKER.getBytes(StandardCharsets.US_ASCII)));
        });
        return new SAXSource(reader, source);
    }
889438
private void outputDocTypeDecl(String name) throws SAXException {
        if (true == m_needToOutputDocTypeDecl)
        {
            String doctypeSystem = getDoctypeSystem();
            String doctypePublic = getDoctypePublic();
            if ((null != doctypeSystem) || (null != doctypePublic))
            {
                final java.io.Writer writer = m_writer;
                try
                {
                writer.write("<!DOCTYPE ");
                writer.write(name);

                if (null != doctypePublic)
                {
                    writer.write(" PUBLIC \"");
                    writer.write(doctypePublic);
                    writer.write('"');
                }

                if (null != doctypeSystem)
                {
                    if (null == doctypePublic)
                        writer.write(" SYSTEM \"");
                    else
                        writer.write(" \"");

                    writer.write(doctypeSystem);
                    writer.write('"');
                }

                writer.write('>');
                outputLineSep();
                }
                catch(IOException e)
                {
                    throw new SAXException(e);
                }
            }
        }

        m_needToOutputDocTypeDecl = false;
    }
297260
void outputEntityDecl(String name, String value) throws IOException
    {
        final java.io.Writer writer = m_writer;
        writer.write("<!ENTITY ");
        writer.write(name);
        writer.write(" \"");
        writer.write(value);
        writer.write("\">");
        writer.write(m_lineSep, 0, m_lineSepLen);
    }
580780
private void parseEntityRef(boolean externalAllowed) throws SAXException,
            IOException {
        String name;

        name = readNmtoken(true);
        require(';');
        switch (getEntityType(name)) {
            case ENTITY_UNDECLARED:
                // NOTE: XML REC describes amazingly convoluted handling for
                // this case. Nothing as meaningful as being a WFness error
                // unless the processor might _legitimately_ not have seen a
                // declaration ... which is what this implements.
                String message;

                message = "reference to undeclared general entity " + name;
                if (skippedPE && !docIsStandalone) {
                    handler.verror(message);
                    // we don't know this entity, and it might be external...
                    if (externalAllowed) {
                        handler.skippedEntity(name);
                    }
                } else {
                    fatal(message);
                }
                break;
            case ENTITY_INTERNAL:
                pushString(name, getEntityValue(name));

                // workaround for possible input pop before marking
                // the buffer reading position
                char t = readCh();
                unread(t);
                int bufferPosMark = readBufferPos;

                int end = readBufferPos + getEntityValue(name).length();
                for (int k = readBufferPos; k < end; k++) {
                    t = readCh();
                    if (t == '&') {
                        t = readCh();
                        if (t == '#') {
                            // try to match a character ref
                            tryReadCharRef();

                            // everything has been read
                            if (readBufferPos >= end) {
                                break;
                            }
                            k = readBufferPos;
                            continue;
                        } else if (Character.isLetter(t)) {
                            // looks like an entity ref
                            unread(t);
                            readNmtoken(true);
                            require(';');

                            // everything has been read
                            if (readBufferPos >= end) {
                                break;
                            }
                            k = readBufferPos;
                            continue;
                        }
                        fatal(" malformed entity reference");
                    }

                }
                readBufferPos = bufferPosMark;
                break;
            case ENTITY_TEXT:
                if (externalAllowed) {
                    pushURL(false, name, getEntityIds(name), null, null, null,
                            true);
                } else {
                    fatal("reference to external entity in attribute value.",
                            name, null);
                }
                break;
            case ENTITY_NDATA:
                if (externalAllowed) {
                    fatal("unparsed entity reference in content", name, null);
                } else {
                    fatal("reference to external entity in attribute value.",
                            name, null);
                }
                break;
            default:
                throw new RuntimeException();
        }
    }
477181
public void notationDecl(String name, String pubID, String sysID) throws SAXException {
        // TODO Auto-generated method stub
        try {
            DTDprolog();
            
            m_writer.write("<!NOTATION ");            
            m_writer.write(name);
            if (pubID != null) {
                m_writer.write(" PUBLIC \"");
                m_writer.write(pubID);
  
            }
            else {
                m_writer.write(" SYSTEM \"");
                m_writer.write(sysID);
            }
            m_writer.write("\" >");
            m_writer.write(m_lineSep, 0, m_lineSepLen);
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }
175579
public void fireEndEntity(String name)
        throws org.xml.sax.SAXException
    {
        if (m_tracer != null)
            flushMyWriter();
    	// we do not need to handle this.
    }