Fix prefixing namespace prefix declarations when not using the default namespace (XML serialization bug)

This commit is contained in:
JSCHILL1 2009-08-12 09:49:22 -05:00
parent eb2a7a05ac
commit d4747e2bd7
5 changed files with 51 additions and 13 deletions

View file

@ -856,7 +856,12 @@ class WellFormedXMLAmpersandInTextContent(unittest.TestCase):
wellformed = scour.scourString(open('unittests/xml-well-formed.svg').read())
self.assert_( wellformed.find('<desc>Peanut Butter &amp; Jelly</desc>') != -1,
'Improperly serialized &amp; in text content')
class NamespaceDeclPrefixesInXML(unittest.TestCase):
def runTest(self):
xmlstring = scour.scourString(open('unittests/xml-ns-decl.svg').read())
self.assert_( xmlstring.find('xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"') != -1,
'Improperly serialized namespace prefix declarations')
# TODO; write a test for embedding rasters
# TODO: write a test for --disable-embed-rasters
# TODO: write tests for --keep-editor-data