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 339570 - Computation of cdata-section-elements in conjunction with the default namespace
Computation of cdata-section-elements in conjunction with the default namespace
Status: RESOLVED FIXED
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-24 13:55 UTC by kbuchcik
Modified: 2006-05-11 14:24 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description kbuchcik 2006-04-24 13:55:09 UTC
In xsltParseStylesheetOutput(), "cdata-section-elements": A QName which expanded using the default namespace, is incorrectly added twice to the hash: once with no namespace and once with the default namespace; thus the serialization will generate CDATA-sections for:
1) elements with the specified local-name in *no* namespace
2) elements with the specified local-name in the default namespace

Example:

"cdata-2.xsl"
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns="urn:test:foo" xmlns:foo="urn:test:foo">
  <xsl:output cdata-section-elements="foo"/>
  <xsl:template match="/" xmlns="">
    <foo>foo<foo:foo>zoo</foo:foo></foo>
  </xsl:template>  
</xsl:stylesheet>

xsltproc cdata-2.xsl cdata-2.xml
<?xml version="1.0"?>
<foo xmlns="" xmlns:foo="urn:test:foo"><![CDATA[foo]]><foo:foo><![CDATA[zoo]]></foo:foo></foo>

Expected result:
<?xml version="1.0"?>
<foo xmlns:foo="urn:test:foo">foo<foo:foo><![CDATA[zoo]]></foo:foo></foo>
Comment 1 kbuchcik 2006-05-11 14:24:39 UTC
Fixed in CVS, xslt.c, revision 1.127.
We now the the expected result as shown above.