Was this question not already answered today?
<xsl:template match="/*">
<xsl:for-each select="*">
<xsl:sort select="name()"/>
<xsl:value-of select="name()"/> <xsl:text/>
<xsl:for-each select="@*">
<xsl:sort select="name()"/>
<xsl:text/> - <xsl:value-of select="name()"/> <xsl:text/>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
Regards,
Joerg
shreekumar_veeramani(_at_)freddiemac(_dot_)com wrote:
Hi,
How do i sort on elements and within elements i have to sort on attributes.
Shree
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list