code: static <T> T resolveAttributeFromMap(
          Node node, String attributeName, Map<String, ? extends T> map)
      {
          String id = XmlUtils.getAttributeValue(node, attributeName, null);
          if (id == null)
          {
              throw new XmlException(
                  "No attribute \""+attributeName+"\" found");
          }
          T result = map.get(id);
          if (result == null)
          {
              throw new XmlException(
                  "Could not resolve value with id \""+id+"\"");
          }
          return result;
      }
docs: Resolve the value in the given map whose key is the value of
  the specified attribute.
  
  @param <T> The type of the elements in the map
  @param node The node
  @param attributeName The name of the attribute
  @param map The map
  @return The value in the map whose key is the value of the
  specified attribute
  @throws XmlException If either the given node does not contain
  an attribute with the given name, or the map does not contain
  a value for the respective attribute value