private void printNamespace(Writer out, Namespace ns,
                              EclipseNamespaceStack namespaces)
    throws IOException {
    String prefix = ns.getPrefix();
    String uri = ns.getURI();

    // Already printed namespace decl?
    if (uri.equals(namespaces.getURI(prefix))) {
      return;
    }

    out.write(" xmlns");
    if (!prefix.equals("")) {
      out.write(":");
      out.write(prefix);
    }
    out.write("=\"");
    out.write(uri);
    out.write("\"");
    namespaces.push(ns);
  }
private void printNamespace(Writer out, Namespace ns,
                              EclipseNamespaceStack namespaces)