Re: [xml] v2.9.2 regression when using absolute paths without file: scheme in catalog?
On Fri, Mar 27, 2015 at 09:58:59AM +0100, Matthias Pigulla wrote: > Sorry for submitting a semi-finished message :( > > > What I wanted to say was - can anyone tell me whether this is a regression > in 2.9.2 or should I look for help in other places (which)? > > Thanks a lot > Matthias Hi Matthias, someone else reported catalog issues (but on Windows when switching to 2.9.2). I guess one would have to bissect to find the guilty commit, that would help understanding if it's really intended or a broken side effect, thanks Daniel -- Daniel Veillard | Open Source and Standards, Red Hat veill...@redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | virtualization library http://libvirt.org/ ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml
Re: [xml] v2.9.2 regression when using absolute paths without file: scheme in catalog?
Sorry for submitting a semi-finished message :( What I wanted to say was - can anyone tell me whether this is a regression in 2.9.2 or should I look for help in other places (which)? Thanks a lot Matthias ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml
Re: [xml] v2.9.2 regression when using absolute paths without file: scheme in catalog?
Dear everyone, I’d like to bring up my posting from December 2014 again. https://mail.gnome.org/archives/xml/2014-December/msg0.htmlup a possible regression in 2.9.2 Am 09.12.14 11:26 schrieb Matthias Pigulla unter m...@webfactory.de: Hi folks, I am using MacPorts (https://www.macports.org/) and suspecting a regression in libxml2 2.9.1 - 2.9.2. Something with regard to handling absolute file paths in XML catalogs and/or mapping them to the file: URI scheme has changed. In more detail: When trying to parse a simple XHTML 1.0 strict file with PHP and resolving externals, from the underlying libxml2 I get the error: failed to load external entity file:/opt/local/share/xml/html/4/xhtml1-strict.dtd³ Basically, that¹s the path given by my catalog file (maintained by another MacPorts package) ?xml version=1.0? !DOCTYPE catalog PUBLIC -//OASIS//DTD Entity Resolution XML Catalog V1.0//EN http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd; catalog xmlns=urn:oasis:names:tc:entity:xmlns:xml:catalog public publicId=-//W3C//DTD XHTML 1.0 Strict//EN uri=/opt/local/share/xml/html/4/xhtml1-strict.dtd / public publicId=-//W3C//DTD XHTML 1.0 Transitional//EN uri=/opt/local/share/xml/html/4/xhtml1-transitional.dtd / public publicId=-//W3C//DTD XHTML 1.0 Frameset//EN uri=/opt/local/share/xml/html/4/xhtml1-frameset.dtd / public publicId=-//W3C//ENTITIES Latin 1 for XHTML//EN uri=/opt/local/share/xml/html/4/xhtml-lat1.ent / public publicId=-//W3C//ENTITIES Special for XHTML//EN uri=/opt/local/share/xml/html/4/xhtml-special.ent / public publicId=-//W3C//ENTITIES Symbols for XHTML//EN uri=/opt/local/share/xml/html/4/xhtml-symbol.ent / rewriteSystem systemIdStartString=http://www.w3.org/TR/xhtml1/DTD/; rewritePrefix=/opt/local/share/xml/html/4/ / rewriteSystem systemIdStartString=http://www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/; rewritePrefix=/opt/local/share/xml/html/4/ / /catalog Note that the URIs are given as absolute paths without a scheme name. Using dtruss, I figured out that libxml2 2.9.2 actually tries to stat64(file:/opt/Š³) and fails. The same occurs when running xmllint, however I don¹t get the error message to surface there (maybe wrong switches?). But xmllint also shows the difference: With libxml2 2.9.1: $ xmllint --version xmllint: using libxml version 20901 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 $ sudo dtruss -t stat64 xmllint --nonet --loaddtd --load-trace --noout --noent test.xml 21 | grep opt/local/share Loaded URL=file:///opt/local/share/xml/html/4/xhtml-lat1.ent ID=-//W3C//ENTITIES Latin 1 for XHTML//EN Loaded URL=file:///opt/local/share/xml/html/4/xhtml-symbol.ent ID=-//W3C//ENTITIES Symbols for XHTML//EN Loaded URL=file:///opt/local/share/xml/html/4/xhtml-special.ent ID=-//W3C//ENTITIES Special for XHTML//EN stat64(/opt/local/share/xml/html/4/xhtml1-strict.dtd\0, 0x7FFF5CBD1948, 0x0)= 0 0 stat64(/opt/local/share/xml/html/4/xhtml-lat1.ent\0, 0x7FFF5CBD18F8, 0x0)= 0 0 stat64(/opt/local/share/xml/html/4/xhtml-symbol.ent\0, 0x7FFF5CBD18F8, 0x0)= 0 0 stat64(/opt/local/share/xml/html/4/xhtml-special.ent\0, 0x7FFF5CBD18F8, 0x0)= 0 0 (repeated lines omitted) With libxml2 2.9.2: $ xmllint --version xmllint: using libxml version 20902 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 $ sudo dtruss -t stat64 xmllint --nonet --loaddtd --load-trace --noout --noent test.xml 21 | grep opt/local/share Loaded URL=file:/opt/local/share/xml/html/4/xhtml-lat1.ent ID=-//W3C//ENTITIES Latin 1 for XHTML//EN Loaded URL=file:/opt/local/share/xml/html/4/xhtml-symbol.ent ID=-//W3C//ENTITIES Symbols for XHTML//EN Loaded URL=file:/opt/local/share/xml/html/4/xhtml-special.ent ID=-//W3C//ENTITIES Special for XHTML//EN stat64(file:/opt/local/share/xml/html/4/xhtml1-strict.dtd\0, 0x7FFF51174958, 0x2)= -1 Err#2 stat64(/opt/local/share/xml/html/4/xhtml1-strict.dtd\0, 0x7FFF51174858, 0x0)= 0 0 stat64(file:/opt/local/share/xml/html/4/xhtml-lat1.ent\0, 0x7FFF511748F8, 0x2)= -1 Err#2 stat64(/opt/local/share/xml/html/4/xhtml-lat1.ent\0, 0x7FFF51174728, 0x0)= 0 0 stat64(file:/opt/local/share/xml/html/4/xhtml-symbol.ent\0, 0x7FFF511748F8, 0x2)= -1 Err#2 stat64(/opt/local/share/xml/html/4/xhtml-symbol.ent\0, 0x7FFF51174728, 0x0)= 0 0 stat64(file:/opt/local/share/xml/html/4/xhtml-special.ent\0, 0x7FFF511748F8, 0x2)= -1 Err#2 stat64(/opt/local/share/xml/html/4/xhtml-special.ent\0, 0x7FFF51174728, 0x0)= 0 0 Question: Is that a regression in 2.9.2 that needs to be addressed? Or is the way the
[xml] v2.9.2 regression when using absolute paths without file: scheme in catalog?
Hi folks, I am using MacPorts (https://www.macports.org/) and suspecting a regression in libxml2 2.9.1 - 2.9.2. Something with regard to handling absolute file paths in XML catalogs and/or mapping them to the file: URI scheme has changed. In more detail: When trying to parse a simple XHTML 1.0 strict file with PHP and resolving externals, from the underlying libxml2 I get the error: failed to load external entity file:/opt/local/share/xml/html/4/xhtml1-strict.dtd³ Basically, that¹s the path given by my catalog file (maintained by another MacPorts package) ?xml version=1.0? !DOCTYPE catalog PUBLIC -//OASIS//DTD Entity Resolution XML Catalog V1.0//EN http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd; catalog xmlns=urn:oasis:names:tc:entity:xmlns:xml:catalog public publicId=-//W3C//DTD XHTML 1.0 Strict//EN uri=/opt/local/share/xml/html/4/xhtml1-strict.dtd / public publicId=-//W3C//DTD XHTML 1.0 Transitional//EN uri=/opt/local/share/xml/html/4/xhtml1-transitional.dtd / public publicId=-//W3C//DTD XHTML 1.0 Frameset//EN uri=/opt/local/share/xml/html/4/xhtml1-frameset.dtd / public publicId=-//W3C//ENTITIES Latin 1 for XHTML//EN uri=/opt/local/share/xml/html/4/xhtml-lat1.ent / public publicId=-//W3C//ENTITIES Special for XHTML//EN uri=/opt/local/share/xml/html/4/xhtml-special.ent / public publicId=-//W3C//ENTITIES Symbols for XHTML//EN uri=/opt/local/share/xml/html/4/xhtml-symbol.ent / rewriteSystem systemIdStartString=http://www.w3.org/TR/xhtml1/DTD/; rewritePrefix=/opt/local/share/xml/html/4/ / rewriteSystem systemIdStartString=http://www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/; rewritePrefix=/opt/local/share/xml/html/4/ / /catalog Note that the URIs are given as absolute paths without a scheme name. Using dtruss, I figured out that libxml2 2.9.2 actually tries to stat64(file:/opt/Š³) and fails. The same occurs when running xmllint, however I don¹t get the error message to surface there (maybe wrong switches?). But xmllint also shows the difference: With libxml2 2.9.1: $ xmllint --version xmllint: using libxml version 20901 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 $ sudo dtruss -t stat64 xmllint --nonet --loaddtd --load-trace --noout --noent test.xml 21 | grep opt/local/share Loaded URL=file:///opt/local/share/xml/html/4/xhtml-lat1.ent ID=-//W3C//ENTITIES Latin 1 for XHTML//EN Loaded URL=file:///opt/local/share/xml/html/4/xhtml-symbol.ent ID=-//W3C//ENTITIES Symbols for XHTML//EN Loaded URL=file:///opt/local/share/xml/html/4/xhtml-special.ent ID=-//W3C//ENTITIES Special for XHTML//EN stat64(/opt/local/share/xml/html/4/xhtml1-strict.dtd\0, 0x7FFF5CBD1948, 0x0) = 0 0 stat64(/opt/local/share/xml/html/4/xhtml-lat1.ent\0, 0x7FFF5CBD18F8, 0x0) = 0 0 stat64(/opt/local/share/xml/html/4/xhtml-symbol.ent\0, 0x7FFF5CBD18F8, 0x0) = 0 0 stat64(/opt/local/share/xml/html/4/xhtml-special.ent\0, 0x7FFF5CBD18F8, 0x0) = 0 0 (repeated lines omitted) With libxml2 2.9.2: $ xmllint --version xmllint: using libxml version 20902 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 $ sudo dtruss -t stat64 xmllint --nonet --loaddtd --load-trace --noout --noent test.xml 21 | grep opt/local/share Loaded URL=file:/opt/local/share/xml/html/4/xhtml-lat1.ent ID=-//W3C//ENTITIES Latin 1 for XHTML//EN Loaded URL=file:/opt/local/share/xml/html/4/xhtml-symbol.ent ID=-//W3C//ENTITIES Symbols for XHTML//EN Loaded URL=file:/opt/local/share/xml/html/4/xhtml-special.ent ID=-//W3C//ENTITIES Special for XHTML//EN stat64(file:/opt/local/share/xml/html/4/xhtml1-strict.dtd\0, 0x7FFF51174958, 0x2) = -1 Err#2 stat64(/opt/local/share/xml/html/4/xhtml1-strict.dtd\0, 0x7FFF51174858, 0x0) = 0 0 stat64(file:/opt/local/share/xml/html/4/xhtml-lat1.ent\0, 0x7FFF511748F8, 0x2) = -1 Err#2 stat64(/opt/local/share/xml/html/4/xhtml-lat1.ent\0, 0x7FFF51174728, 0x0) = 0 0 stat64(file:/opt/local/share/xml/html/4/xhtml-symbol.ent\0, 0x7FFF511748F8, 0x2) = -1 Err#2 stat64(/opt/local/share/xml/html/4/xhtml-symbol.ent\0, 0x7FFF51174728, 0x0) = 0 0 stat64(file:/opt/local/share/xml/html/4/xhtml-special.ent\0, 0x7FFF511748F8, 0x2) = -1 Err#2 stat64(/opt/local/share/xml/html/4/xhtml-special.ent\0, 0x7FFF51174728, 0x0) = 0 0 Question: Is that a regression in 2.9.2 that needs to be addressed? Or is the way the relevant MacPorts package creates the catalog file (absolute paths, omitting file: scheme) wrong and just happened to work in the past? Thanks Matthias ___ xml mailing list, project page
Re: [xml] v2.9.2 regression when using absolute paths without file: scheme in catalog?
Following up myself: Even when I replace all file references in the XML catalog with proper file:///... ones, v2.9.2 still gets errors back from stat64: $ sudo dtruss -t stat64 xmllint --loaddtd --load-trace --noout --noent test.xml 21 | grep Err stat64(/AppleInternal\0, 0x7FFF5B199918, 0x0) = -1 Err#2 stat64(http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\0;, 0x7FFF5B198A38, 0x8) = -1 Err#2 stat64(http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\0;, 0x7FFF5B198968, 0x8) = -1 Err#2 stat64(file:/opt/local/share/xml/html/4/xhtml-lat1.ent\0, 0x7FFF5B198908, 0x2) = -1 Err#2 stat64(file:/opt/local/share/xml/html/4/xhtml-lat1.ent\0, 0x7FFF5B198838, 0x2) = -1 Err#2 stat64(file:/opt/local/share/xml/html/4/xhtml-symbol.ent\0, 0x7FFF5B198908, 0x2) = -1 Err#2 stat64(file:/opt/local/share/xml/html/4/xhtml-symbol.ent\0, 0x7FFF5B198838, 0x2) = -1 Err#2 stat64(file:/opt/local/share/xml/html/4/xhtml-special.ent\0, 0x7FFF5B198908, 0x2) = -1 Err#2 stat64(file:/opt/local/share/xml/html/4/xhtml-special.ent\0, 0x7FFF5B198838, 0x2) = -1 Err#2 Note that this is file:/opt/local/ although all my catalog entries say file:///opt/local/..., so some internal mangling must have occurred before this. Best regards Matthias ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml