XSLT output on 2025.5.0.3845 - some namespaces are added to ROOT element

I was trying simple XSL transformation.

I was expecting it will work as in 2025.5.0.3830.

Instead I’ve got namespaces in ROOT element.

Transformation to test:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
	xmlns:AS="http://schema.advantages.cz/AsapFunctions"
	xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="AS date"
	xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"
	xmlns:vOKO="http://www.pds.eu/vOKO/v0200"
	xmlns:ns2="http://sitewell.cz/lpis/schemas/LPI_GDP01A"
	xmlns:GE="http://xsl.origam.com/geo">

	<xsl:template match="ROOT">
		<ROOT>
			<BBB>
				<xsl:attribute name="XXX"><xsl:value-of select="'aaa'"/></xsl:attribute>
			</BBB>
		</ROOT>
	</xsl:template>
</xsl:stylesheet>

Result is:

<?xml version="1.0" encoding="utf-8"?>
<ROOT xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:vOKO="http://www.pds.eu/vOKO/v0200" xmlns:ns2="http://sitewell.cz/lpis/schemas/LPI_GDP01A" xmlns:GE="http://xsl.origam.com/geo">
  <BBB XXX="aaa" />
</ROOT>

Try to extend exclude-result-prefixes attribute of the stylesheet the following way:

exclude-result-prefixes="AS date vOKO ns2 GE SOAP"

The result is actually correct. Unless you include namespaces in exclude-result-prefixes as @urbanekv suggests, they’re going to be present in the output.

For more info see XSL Transformations (XSLT), section 7.1.1.

Than you @urbanekv, it worked. It is interesting that it works in previous version of origam without exclude.