# File lib/xml/util/xmlcanonicalizer.rb, line 257
        def write_attribute_axis(node)
          list = Array.new()
                                        #Sorting-Bug

          #node.attributes().each_attribute{|attr|

          #  list.push(attr) if (!is_namespace_node(attr.value()) && !is_namespace_decl(attr)) # && is_node_visible(

          #}

                                        node.attributes().sort().each{|key,attr|
            list.push(attr) if (!is_namespace_node(attr.value()) && !is_namespace_decl(attr)) # && is_node_visible(

          }
          if (!@exclusive && node.parent() != nil && node.parent().parent() != nil)
            cur = node.parent()
            while (cur != nil)
              #next if (cur.attributes() == nil)

              cur.each_attribute{|attribute|
                next if (attribute.prefix() != "xml")
                next if (attribute.prefix().index("xmlns") == 0)
                next if (node.namespace(attribute.prefix()) == attribute.value())
                found = true
                list.each{|n|
                  if (n.prefix() == "xml" && n.value() == attritbute.value())
                    found = true
                    break
                  end
                }
                next if (found)
                list.push(attribute)
              }
            end
          end
          list.each{|attribute|
            if (attribute != nil)
              if (attribute.name() != "xmlns")
                @res = @res + " " + normalize_string(attribute.to_string(), NODE_TYPE_ATTRIBUTE).gsub("'",'"')
              end
              # else

              # @res = @res + " " + normalize_string(attribute.name()+'="'+attribute.to_s()+'"', NODE_TYPE_ATTRIBUTE).gsub("'",'"')

              #end

            end
          }
        end