def non_ns_attrs_ns_bindings(ns_stack, element_name, attrs)
      non_ns_attrs, ns_declared = partition_namespace_decls(attrs)

      ns_explicit = extract_explicit_namespace_bindings(element_name, attrs)
      ns_undeclared = undeclared_namespace_bindings(ns_stack + [ns_declared], ns_explicit)
      ns_bindings = merge_namespace_bindings(ns_declared, ns_undeclared)

      [non_ns_attrs, ns_bindings]
    end
def non_ns_attrs_ns_bindings(ns_stack, element_name, attrs)
      non_ns_attrs, ns_declared = partition_namespace_decls(attrs)

      ns_explicit = extract_explicit_namespace_bindings(element_name, attrs)
      ns_undeclared = undeclared_namespace_bindings(ns_stack + [ns_declared], ns_explicit)
      ns_bindings = merge_namespace_bindings(ns_declared, ns_undeclared)

      [non_ns_attrs, ns_bindings]
    end
given the existing +ns_stack+ of ns bindings, a +element_name+ and it's +attributes+,
 return a pair <tt>[non_ns_attrs, ns_bindings]</tt> containing
 non-ns related attributes, and namespace bindings for the current element,
 both those declared in attributes and declared implicitly through exploded element names