[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: sorting on attributes.

Subject: Re: sorting on attributes.
From: "Vasu Chakkera" <vasucv@xxxxxxxxxxx>
Date: Wed, 23 Oct 2002 16:39:49 +0100
xpath sort by attribute
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:  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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.