def parse_attributes(attributes, element):
 result = {}
 for attr in element.attrib:
  if ('{' in attr):
   a = fixtag(attr, NS_MAP)[0]
  else:
   a = attr
  if (a in attributes):
   result[a] = element.attrib[attr]
  else:
   _log.info('in <%s>, uncaught attribute %s', fixtag(element.tag, NS_MAP)[0], attr)
 return result

def parse_attributes ( attributes , element ) : result = { } for attr in element . attrib : if ( '{' in attr ) : a = fixtag ( attr , NS_MAP ) [ 0 ] else : a = attr if ( a in attributes ) : result [ a ] = element . attrib [ attr ] else : _log . info ( 'in <%s>, uncaught attribute %s' , fixtag ( element . tag , NS_MAP ) [ 0 ] , attr ) return result
extract attributes from an element .