@Override
    public void startDTD(String name, String publicID, String systemID) throws SAXException {
        inDTD = true;
        try {
            writeDocType(name, publicID, systemID);
        }
        catch (IOException e) {
            handleException(e);
        }

        if (lexicalHandler != null) {
            lexicalHandler.startDTD(name, publicID, systemID);
        }
    }
<p>Writes the closing tag of an {@link Element}</p>

@param element <code>Element</code> to output.
@throws IOException if the element could not be written
xmppserver/src/main/java/org/jivesoftware/util/XMLWriter.java