Я пытаюсь отсортировать все элементы, а затем атрибуты, которые я заработал, однако я не могу понять, как убрать пустые атрибуты
Вот сортировка XSLT
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates >
<xsl:sort select="local-name()"/>
</xsl:apply-templates>
</xsl:copy>
</xsl:template>
<xsl:template match="*[*]">
<xsl:copy>
<xsl:apply-templates select="@*" >
<xsl:sort select="local-name()" />
</xsl:apply-templates>
<xsl:apply-templates select="*" >
<xsl:sort select="local-name()"/>
</xsl:apply-templates>
</xsl:copy>
</xsl:template>
Спасибо за любую помощь