GNOME Bugzilla – Bug 439822
xsi namespace prefix becomes xsi1
Last modified: 2021-07-05 11:01:26 UTC
Please describe the problem: When creating an attribute by copying the value of the attribute xmlns:xsi (or xsi:schemaLocation, etc.), the result becomes xmlns:xsi1 (or xsi1:schemaLocation, etc.). Steps to reproduce: 1. Add an XML document like <?xml-stylesheet type="text/xsl" href="test.xsl"?> <TEI xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.tei-c.org/ns/1.0 tei_minimal.xsd"> </TEI> 2. Add such a template to a stylesheet: <xsl:stylesheet xmlns:html="http://www.w3.org/1999/xhtml" xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" exclude-result-prefixes="tei html" version="1.0"> <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="no" standalone="no" indent="yes" media-type="application/xml"/> <xsl:template match="/"> <xsl:apply-templates/> </xsl:template> <xsl:template match="*"> <xsl:element name="{name()}"> <xsl:for-each select="@*"> <xsl:attribute name="{name()}"> <xsl:value-of select="."/> </xsl:attribute> </xsl:for-each> <xsl:apply-templates/> </xsl:element> </xsl:template> </xsl:stylesheet> 3. Transform Actual results: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <TEI xmlns:xsi1="http://www.w3.org/2001/XMLSchema-instance" xsi1:schemaLocation="http://www.tei-c.org/ns/1.0 tei_minimal.xsd"> </TEI> Expected results: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <TEI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.tei-c.org/ns/1.0 tei_minimal.xsd"> </TEI> Does this happen every time? Yes Other information:
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.