GNOME Bugzilla – Bug 621284
xinclude error on '#'ed filesystem folders (linux only).
Last modified: 2021-07-05 13:20:52 UTC
hi, i've accidentally discovered that xinclude processing doesn't work on directory structure with '#'ed folders. please unpack attachment on linux and check: % xmllint --xinclude 'good/foo.xml' <?xml version="1.0" encoding="ascii"?> <a xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xi="http://www.w3.org/2001/XInclude"> <b><xv5/></b> </a> % xmllint --xinclude 'b#d/foo.xml' warning: failed to load external entity "bar.xml" b#d/foo.xml:3: element include: XInclude error : could not load bar.xml#xpointer(//b), and no fallback was found <?xml version="1.0" encoding="ascii"?> <a xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xi="http://www.w3.org/2001/XInclude"> <xi:include href="bar.xml#xpointer(//b)"/> </a> tested on libxml2 v2.7.7 and v2.6.26.
Created attachment 163376 [details] testcase.
still present on the latest v2.7.8.
still present on the latest v2.9.1..
I think it is not a bug.The '?'and '#' characters have a specific use in the URI, as referring to the document RFC 3986 (https://www.ietf.org/rfc/rfc3986), The path is terminated by the first question mark ("?") or number sign ("#") character, or by the end of the URI. So the directory name 'b#d' cannot contains the character '#' or '?' .
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.