def _setStyle(node, styleMap):
 fixedStyle = ';'.join([((prop + ':') + styleMap[prop]) for prop in styleMap.keys()])
 if (fixedStyle != ''):
  node.setAttribute('style', fixedStyle)
 elif node.getAttribute('style'):
  node.removeAttribute('style')
 return node

def _setStyle ( node , styleMap ) : fixedStyle = ';' . join ( [ ( ( prop + ':' ) + styleMap [ prop ] ) for prop in styleMap . keys ( ) ] ) if ( fixedStyle != '' ) : node . setAttribute ( 'style' , fixedStyle ) elif node . getAttribute ( 'style' ) : node . removeAttribute ( 'style' ) return node
sets the style attribute of a node to the dictionary stylemap .