<s> import logging <EOL> import lxml <EOL> from werkzeug . wrappers import Response <EOL> from pywps import __version__ , OWS , NAMESPACES , OGCUNIT <EOL> LOGGER = logging . getLogger ( __name__ ) <EOL> def xpath_ns ( el , path ) : <EOL> return el . xpath ( path , namespaces = NAMESPACES ) <EOL> def xml_response ( doc ) : <EOL> """<STR_LIT>""" <EOL> LOGGER . debug ( '<STR_LIT>' ) <EOL> pywps_version_comment = '<STR_LIT>' % __version__ <EOL> xml = lxml . etree . tostring ( doc , pretty_print = True ) <EOL> response = Response ( pywps_version_comment . encode ( '<STR_LIT:utf8>' ) + xml , <EOL> content_type = '<STR_LIT>' ) <EOL> response . status_percentage = <NUM_LIT:100> ; <EOL> return response </s>
