code: public AttributeList setAttributes(AttributeList attributes) {
          final AttributeList ret = new AttributeList(attributes.size());
          for (Object o : attributes) {
              Attribute attr = (Attribute) o;
              try {
                  setAttribute(attr);
                  ret.add(new Attribute(attr.getName(), getAttribute(attr.getName())));
              } catch (Exception e) {
                  // Attribute is not included in returned list. The spec says so
              }
          }
          return ret;
      }
docs: {@inheritDoc}