After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 324081 - Entire file is parsed for XIncludes, even when XPointer only asks for part, leading to errors
Entire file is parsed for XIncludes, even when XPointer only asks for part, l...
Status: RESOLVED OBSOLETE
Product: libxml2
Classification: Platform
Component: xinclude
2.4.16
Other Linux
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
: 344240 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-12-14 15:42 UTC by Thomas Thurman
Modified: 2021-07-05 13:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Demonstration of the problem (6.03 KB, application/x-gzip)
2005-12-14 15:43 UTC, Thomas Thurman
Details

Description Thomas Thurman 2005-12-14 15:42:11 UTC
When part of a file is included via XInclude and XPointer, the recursion
detection triggers if that file contains an xi:include to a file which is
currently being processed, even if that xi:include is not within the section
being included.

For example, say we have two files, yellow.xml and orange.xml. Both contain a
<title> section, containing CDATA, and an <other_colours> section, containing
the value of the title of the other. This <other_colours> value is included by
using an xinclude with xpointer pointing at the <title> section of the other
file. libxml2 will fail to parse either of the files, because they reference one
another and this is detected as a loop, even though no loop actually exists.

Section 4.2.7 of the XInclude specification says:

  When recursively processing an xi:include element, it is a fatal error to
  process another xi:include element with an include location and xpointer
  attribute value that have already been processed in the inclusion chain.

This rule does not apply in the current case, since although the include
location is the same, the xpointer attribute value is different.
Comment 1 Thomas Thurman 2005-12-14 15:43:46 UTC
Created attachment 55990 [details]
Demonstration of the problem

Demonstration of the problem (using the perl binding)
Comment 2 Nick Wellnhofer 2020-08-17 21:50:22 UTC
*** Bug 344240 has been marked as a duplicate of this bug. ***
Comment 3 GNOME Infrastructure Team 2021-07-05 13:27:01 UTC
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.