GNOME Bugzilla – Bug 341392
Excluding namespace declarations of literal result elements
Last modified: 2021-07-05 10:59:41 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"/>
This is fixed in the (not yet enabled) refactored code paths.
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.