The function functx:remove-attributes adds automatically an empty @xmlns to the node and I would like to prevent this behavior. Example xml:
<mei meiversion="3.0.0" xmlns="http://www.music-encoding.org/ns/mei">
<note accid.ges="f" doxml.id="d28e18935" dur="8" oct="4" pname="e" tstamp="1.75" xml:id="note_112296"/>
</mei>
XSLT excerpt:
<xsl:copy-of select="functx:remove-attributes(., $attributes2remove)" />
Current (false) XML output:
<note accid.ges="f" doxml.id="d28e18935" dur="8" oct="4" pname="e" tstamp="1.75" xml:id="note_112296" xmlns=""/>
In the function body, I think you want to use
xsl:copy
instead ofxsl:element
:https://xsltfiddle.liberty-development.net/ejivJrP