GNOME Bugzilla – Bug 341325
Namespace aliasing and resulting namespace prefixes
Last modified: 2021-07-05 11:00:09 UTC
If using xsl:namespace-alis, the XSLT 1.0 processors Saxon 6.5.3, Xalan and Libxslt will use the prefix specified in @stylesheet-prefix for the result. Example: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:axsl="http://www.w3.org/1999/XSL/Transform-alias" exclude-result-prefixes="axsl xsl"> <xsl:namespace-alias stylesheet-prefix="axsl" result-prefix="xsl"/> <xsl:template match="/"> <axsl:stylesheet version="1.0"/> </xsl:template> </xsl:stylesheet> Result: <axsl:stylesheet version="1.0" xmlns:axsl="http://www.w3.org/1999/XSL/Transform"/> Since MSXML 4, MSXML .NET and XSLT 2.0 processors like Saxon 8.1.1 will process this correctly, we should consider fixing this, or provide a way for the user - via a processor-option - to specify if such a "strict" processing is needed.
In the refactored code this will produce: <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"/>
Mark this bug as fixed when the refactored code paths are enabled.
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.