def __transform_xsltproc(self, file, xsl_file, output, params = {}):
command = 'xsltproc '
param_string = ''
keys = params.keys()
for key in keys:
param_string += ' %s "%s"' % (key, params[key])
if param_string:
command += ' --stringparam %s' % param_string
command += ' -o %s %s %s' % (output, xsl_file, file)
# sys.stdout.write('executing command "%s\n"' % command)
(exit_status, out_text) = commands.getstatusoutput(command)
return exit_status, out_text
# os.system(command)
评论列表
文章目录