def inc_value(value, name, node):
    """Increment global value with node attribute values"""
    ival = 0
    try:
        sval = node.attributes[name].value
        ival = int(sval)
    finally:
        return value + ival
