def stylesheet_params(**kwargs):
 result = {}
 for (key, val) in kwargs.items():
  if isinstance(val, basestring):
   val = _etree.XSLT.strparam(val)
  elif (val is None):
   raise TypeError('None not allowed as a stylesheet parameter')
  elif (not isinstance(val, _etree.XPath)):
   val = unicode(val)
  result[key] = val
 return result

def stylesheet_params ( ** kwargs ) : result = { } for ( key , val ) in kwargs . items ( ) : if isinstance ( val , basestring ) : val = _etree . XSLT . strparam ( val ) elif ( val is None ) : raise TypeError ( 'None not allowed as a stylesheet parameter' ) elif ( not isinstance ( val , _etree . XPath ) ) : val = unicode ( val ) result [ key ] = val return result
convert keyword args to a dictionary of stylesheet parameters .