def attribute( name, namespace=nil )
      prefix = nil
      if namespaces.respond_to? :key
        prefix = namespaces.key(namespace) if namespace
      else
        prefix = namespaces.index(namespace) if namespace
      end
      prefix = nil if prefix == 'xmlns'
      ret_val =
        attributes.get_attribute( "#{prefix ? prefix + ':' : ''}#{name}" )
      return ret_val unless ret_val.nil?
      return nil if prefix.nil?
      
      
      return nil unless ( namespaces[ prefix ] == namespaces[ 'xmlns' ] )
      attributes.get_attribute( name )
    end