Fix bug when DOCTYPE is present. Big performance improvement to makeWellFormed() function

This commit is contained in:
JSCHILL1 2010-02-05 16:28:13 -06:00
parent c835423e8f
commit c00bc8b70c
5 changed files with 37 additions and 14 deletions

6
unittests/comments.svg Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" ?>
<!-- Empty -->
<!-- Comment #2 -->
<svg xmlns="http://www.w3.org/2000/svg">
</svg>
<!-- After -->

After

Width:  |  Height:  |  Size: 120 B

7
unittests/doctype.svg Normal file
View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- comment -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"/>

After

Width:  |  Height:  |  Size: 350 B