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 341392 - Excluding namespace declarations of literal result elements
Excluding namespace declarations of literal result elements
Status: RESOLVED OBSOLETE
Product: libxslt
Classification: Platform
Component: general
git master
Other All
: Normal enhancement
: ---
Assigned To: kbuchcik
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2006-05-11 10:10 UTC by kbuchcik
Modified: 2021-07-05 10:59 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description kbuchcik 2006-05-11 10:10:24 UTC
The following scenarios produce incorrect results:

Scenario A
----------
<?xml version='1.0'?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"    
  xmlns:ext="urn:test:ext"  
  extension-element-prefixes="ext">   

  <xsl:variable name="bar">
    <bar xmlns:ext="urn:test:ext"/>
  </xsl:variable>

  <xsl:template match="/">    
    <foo>
      <xsl:copy-of select="$bar"/>
    </foo>
  </xsl:template>

</xsl:stylesheet>

Expected result for XSLT 1.0/2.0 processors:
<foo><bar/></foo>

Current result of Libxslt:
<foo><bar xmlns:ext="urn:test:ext"/></foo>

Scenario B
----------
<?xml version='1.0'?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"    
  xmlns:ext-literal="urn:test:ext"
  xmlns:ext-target="urn:test:ext"  
  extension-element-prefixes="ext-target">
  
  <xsl:namespace-alias stylesheet-prefix="ext-literal" result-prefix="ext-target"/>

  <xsl:template match="/">    
    <foo xmlns:ext="urn:test:ext"/>	
  </xsl:template>

</xsl:stylesheet>

Expected result for XSLT 1.0 processors:
<foo/>

Expected result for XSLT 2.0 processors:
<foo xmlns:ext="urn:test:ext" xmlns:ext-literal="urn:test:ext"
     xmlns:ext-target="urn:test:ext"/>

Current result of Libxslt:
<foo xmlns:ext="urn:test:ext" xmlns:ext-literal="urn:test:ext"/>
Comment 1 kbuchcik 2006-08-10 14:06:46 UTC
This is fixed in the (not yet enabled) refactored code paths.
Comment 2 GNOME Infrastructure Team 2021-07-05 10:59:41 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.