for (int i = 0; i < count; i++) {
final String value = reader.getAttributeValue(i);
if (!isNoNamespaceAttribute(reader, i)) {
throw unexpectedAttribute(reader, i);
} else {
final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
required.remove(attribute);
switch (attribute) {
case NAME: {
name = value;
binding.get(OP_ADDR).set(address).add(SOCKET_BINDING, name);
break;
}
case INTERFACE: {
AbstractSocketBindingResourceDefinition.INTERFACE.parseAndSetParameter(value, binding, reader);
if (binding.get(AbstractSocketBindingResourceDefinition.INTERFACE.getName()).getType() != ModelType.EXPRESSION
&& !interfaces.contains(value)) {
throw MESSAGES.unknownInterface(value, attribute.getLocalName(),
Element.INTERFACES.getLocalName(), reader.getLocation());
}
binding.get(INTERFACE).set(value);
break;
}