protected void writeNamespace(String prefix, String uri) throws IOException {
        if ( prefix != null && !prefix.isEmpty()) {
            writer.write(" xmlns:");
            writer.write(prefix);
            writer.write("=\"");
        }
        else {
            writer.write(" xmlns=\"");
        }
        writer.write(uri);
        writer.write("\"");
    }
Writes the SAX namepsaces
@param prefix the namespace prefix
@param uri the URL of the namespace
@throws IOException if the namespace could not be written
xmppserver/src/main/java/org/jivesoftware/util/XMLWriter.java