Re: [xsl] sorting on attributes.

Subject: Re: [xsl] sorting on attributes.
From: "Vasu Chakkera" <vasucv@xxxxxxxxxxx>
Date: Wed, 23 Oct 2002 16:39:49 +0100
Hi Shree,
Try
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:output method="text" omit-xml-declaration="yes"/>
<xsl:template match="/">
<xsl:for-each select="name/@*">
<xsl:sort order="ascending" select="name()" data-type="text"/>
<xsl:value-of select="name()"/><xsl:text>=</xsl:text><xsl:value-of
select="."/>
<xsl:text>&#xa;</xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
HTH
Vasu
----- Original Message -----
From: <shreekumar_veeramani@xxxxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Wednesday, October 23, 2002 4:31 PM
Subject: [xsl] sorting on attributes.


>
> is there a way to sort on the attributes of an element.
>
>
> example :
>
> <name lastname="shr" firstname="kum" age="26" address="40 port">
>
> output:
>
> name
>      address = 40 port
>      age = 26
>      firstname = kum
>      lastname = shr
>
>
> Shree
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread