Skip to content

Instantly share code, notes, and snippets.

@paulweb515
Created February 14, 2013 15:38
Show Gist options
  • Save paulweb515/4953601 to your computer and use it in GitHub Desktop.
Save paulweb515/4953601 to your computer and use it in GitHub Desktop.
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*">
<xsl:sort select="name()" />
</xsl:apply-templates>
<xsl:apply-templates select="node()">
<xsl:sort select="name()" />
<xsl:sort select="@*" />
</xsl:apply-templates>
</xsl:copy>
</xsl:template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment