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 338214 - Incorrect scope for exclude-result-prefixes
Incorrect scope for exclude-result-prefixes
Status: RESOLVED OBSOLETE
Product: libxslt
Classification: Platform
Component: general
1.1.15
Other All
: Normal normal
: ---
Assigned To: kbuchcik
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2006-04-12 13:15 UTC by kbuchcik
Modified: 2021-07-05 11:00 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description kbuchcik 2006-04-12 13:15:42 UTC
The scope of an xsl:exclude-result-prefixes on literal result elements is incorrectly not restricted to the subtree, but to the whole tree in general.

7.1.1 Literal Result Elements:
"The designation of a namespace as an excluded namespace is effective within the subtree of the stylesheet rooted at the element bearing the exclude-result-prefixes or xsl:exclude-result-prefixes attribute"

The following example demonstrates than the ns-declaration on <boo> with the prefix "bar" is removed, although it is excluded not until deeper in the tree on <bar>.
(The fact that the resulting <foo> holds both ns-declarations is an other bug.)

"erp.xsl"
--------
<?xml version='1.0'?>
<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="/">
    <foo>
      <boo xmlns:foo="urn:test:foo" xmlns:bar="urn:test:bar"
          xsl:exclude-result-prefixes="foo">
        <bar xmlns:foo="urn:test:foo" xmlns:bar="urn:test:bar"
	  xsl:exclude-result-prefixes="bar">
          <zoo xmlns:foo="urn:test:foo" xmlns:bar="urn:test:bar"/>
        </bar>
      </boo>
    </foo>
  </xsl:template>
</xsl:stylesheet>

type ..\test.xml
<?xml version="1.0"?>
<foo>zoo</foo>

xsltproc erp.xsd ..\test.xml
<?xml version="1.0"?>
<foo xmlns:bar="urn:test:bar" xmlns:foo="urn:test:foo"><boo><bar><zoo/></bar></boo></foo>
Comment 1 kbuchcik 2006-06-19 15:06:43 UTC
Expected result:

<?xml version="1.0"?>
<foo><boo xmlns:bar="urn:test:bar"><bar><zoo/></bar></boo></foo>
Comment 2 kbuchcik 2006-08-10 14:05:01 UTC
This is fixed in the (not yet enabled) refactored code paths.
Comment 3 GNOME Infrastructure Team 2021-07-05 11:00:28 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/libxslt/-/issues/

Thank you for your understanding and your help.