protected Document getStreamHeader()
    {
        final Element stream = DocumentHelper.createElement(QName.get("stream", "stream", "http://etherx.jabber.org/streams"));
        final Document document = DocumentHelper.createDocument(stream);
        document.setXMLEncoding(StandardCharsets.UTF_8.toString());
        stream.add(getNamespace());
        stream.addAttribute("from", XMPPServer.getInstance().getServerInfo().getXMPPDomain());
        stream.addAttribute("id", session.getStreamID().getID());
        stream.addAttribute(QName.get("lang", Namespace.XML_NAMESPACE), session.getLanguage().toLanguageTag());
        stream.addAttribute("version", Session.MAJOR_VERSION + "." + Session.MINOR_VERSION);

        return document;
    }
Determines whether stanza's namespace matches XEP-0198 namespace
@param stanza Stanza to be checked
@return whether stanza's namespace matches XEP-0198 namespace
xmppserver/src/main/java/org/jivesoftware/openfire/net/StanzaHandler.java