Only include "standalone" attribute if it was explicitly set to "yes" in input document ("no" is the default value)

This commit is contained in:
Eduard Braun 2016-06-12 15:36:02 +02:00
parent 1a8ece216d
commit 84b36c7109

View file

@ -3090,7 +3090,10 @@ def scourString(in_string, options=None):
# return the string with its XML prolog and surrounding comments
if options.strip_xml_prolog == False:
total_output = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n'
total_output = '<?xml version="1.0" encoding="UTF-8"'
if doc.standalone:
total_output += ' standalone="yes"'
total_output += '?>\n'
else:
total_output = ""