GNOME Bugzilla – Bug 692800
Libxml2 fails to parse SVG files created with Adobe Illustrator
Last modified: 2021-07-05 13:24:17 UTC
Created attachment 234724 [details] SVG file created with Adobe Illustrator I get this message in a terminal using wine but the error is identical on Windows: file:///Z:/home/johan/A.svg:3: parser error : Unfinished System or Public ID " or ' expected <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1 ^ file:///Z:/home/johan/A.svg:3: parser error : Space required after the Public Identifier <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1 ^ file:///Z:/home/johan/A.svg:3: parser error : SystemLiteral " or ' expected <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1 ^ file:///Z:/home/johan/A.svg:3: parser error : SYSTEM or PUBLIC, the URI is missing <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1 ^ file:///Z:/home/johan/A.svg:3: parser error : DOCTYPE improperly terminated <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1 ^ file:///Z:/home/johan/A.svg:3: parser error : Start tag expected, '<' not found <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1 ^ The problematic XML file is attached.
Hum, I can't reproduce this with the current version on Linux: thinkpad:~/XML -> ls -l A.svg -rw-rw-r--. 1 veillard veillard 1425 Jan 29 23:04 A.svg thinkpad:~/XML -> md5sum A.svg be3b223c647cac5526b606b9be530d68 A.svg thinkpad:~/XML -> xmllint --noout A.svg thinkpad:~/XML -> /usr/bin/xmllint --noout A.svg thinkpad:~/XML -> /usr/bin/xmllint --version /usr/bin/xmllint: using libxml version 20900 compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 FTP HTTP DTDValid HTML Legacy C14N Catalog XPath XPointer XInclude Iconv ISO8859X Unicode Regexps Automata Expr Schemas Schematron Modules Debug Zlib Lzma thinkpad:~/XML -> Could you confirm the same output with the same file on Linux, to make sure the file wasn't changed somehow by being attached or in the download ? Daniel
I can't reproduce this on Linux either, it seems to be Windows specific. Linux: johan@booken:~/Hämtningar$ ls -la A.svg -rw-rw-r-- 1 johan johan 1425 jan 25 17:34 A.svg be3b223c647cac5526b606b9be530d68 A.svg johan@booken:~/Hämtningar$ xmllint --noout A.svg johan@booken:~/Hämtningar$ xmllint --version xmllint: using libxml version 20800 compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 FTP HTTP DTDValid HTML Legacy C14N Catalog XPath XPointer XInclude Iconv ISO8859X Unicode Regexps Automata Expr Schemas Schematron Modules Debug Zlib Lzma Wine/Windows: johan@floden:~$ /usr/i686-w64-mingw32/sys-root/i686-w64-mingw32/bin/xmllint.exe --noout /home/johan/A.svg /home/johan/A.svg:3: parser error : Unfinished System or Public ID " or ' expected <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1 ^ /home/johan/A.svg:3: parser error : Space required after the Public Identifier <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1 ^ /home/johan/A.svg:3: parser error : SystemLiteral " or ' expected <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1 ^ /home/johan/A.svg:3: parser error : SYSTEM or PUBLIC, the URI is missing <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1 ^ /home/johan/A.svg:3: parser error : DOCTYPE improperly terminated <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1 ^ /home/johan/A.svg:3: parser error : Start tag expected, '<' not found <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1 ^ johan@floden:~$ /usr/i686-w64-mingw32/sys-root/i686-w64-mingw32/bin/xmllint.exe --version Z:\usr\i686-w64-mingw32\sys-root\i686-w64-mingw32\bin\xmllint.exe: using libxml version 20708 compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 FTP HTTP DTDValid HTML Legacy C14N Catalog XPath XPointer XInclude ISO8859X Unicode Regexps Automata Expr Schemas Schematron Modules Debug Zlib
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/libxml2/-/issues/ Thank you for your understanding and your help.