public static Cons processAttributeList(Cons reverseattributelist, XmlElement element, KvCons namespaceTable) {
    if (reverseattributelist == Stella.NIL) {
      return (Stella.NIL);
    }
    { Cons attributelist = Stella.NIL;
      Cons conscell = null;
      String attributename = null;

      while (!(reverseattributelist == Stella.NIL)) {
        conscell = new Cons();
        conscell.value = reverseattributelist.value;
        reverseattributelist = reverseattributelist.rest;
        conscell.rest = attributelist;
        attributelist = conscell;
        if (reverseattributelist == Stella.NIL) {
          { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

            stream000.nativeStream.print("Malformed attribute list in XML element `" + element + "'");
            throw ((BadArgumentException)(BadArgumentException.newBadArgumentException(stream000.theStringReader()).fillInStackTrace()));
          }
        }
        attributename = ((TokenizerToken)(reverseattributelist.value)).content;
        reverseattributelist = reverseattributelist.rest;
        conscell = new Cons();
        if (Stella.xmlnsAttributeNameP(attributename)) {
          conscell.value = Stella.makeXmlnsAttribute(attributename);
        }
        else {
          conscell.value = Stella.makeXmlAttributeRespectingNamespace(attributename, element, namespaceTable);
        }
        conscell.rest = attributelist;
        attributelist = conscell;
      }
      return (attributelist);
    }
  }