final Iterator iterator = childElement.getAttributes();
while (iterator.hasNext()) {
final Attribute nextAttribute = (Attribute) iterator.next();
final QName name = nextAttribute.getName();
if (attributeMap.containsKey(name)) {
throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0059_MULTIPLE_ATTRS_WITH_SAME_NAME_DETECTED_FOR_ASSERTION(nextAttribute.getName(), childElement.getName())));
} else {
if (nsVersion.asQName(XmlToken.Optional).equals(name)) {
optional = parseBooleanValue(nextAttribute.getValue());
} else if (nsVersion.asQName(XmlToken.Ignorable).equals(name)) {
ignorable = parseBooleanValue(nextAttribute.getValue());
} else {
attributeMap.put(name, nextAttribute.getValue());
}
}
}
final AssertionData nodeData = new AssertionData(childElement.getName(), value, attributeMap, childNode.getType(), optional, ignorable);
// check visibility value syntax if present...
if (nodeData.containsAttribute(PolicyConstants.VISIBILITY_ATTRIBUTE)) {
final String visibilityValue = nodeData.getAttributeValue(PolicyConstants.VISIBILITY_ATTRIBUTE);
if (!PolicyConstants.VISIBILITY_VALUE_PRIVATE.equals(visibilityValue)) {
throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0004_UNEXPECTED_VISIBILITY_ATTR_VALUE(visibilityValue)));
}
}
childNode.setOrReplaceNodeData(nodeData);
}