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

Re: generic sort based on attribute names

Subject: Re: generic sort based on attribute names
From: "Joris Gillis" <roac@xxxxxxxxxx>
Date: Tue, 25 Jan 2005 18:04:06 +0100
sort in c
Tempore 01:45:12, die 01/25/2005 AD, hinc in xsl-list@xxxxxxxxxxxxxxxxxxxxxx scripsit Chaitanya Desai <cdesai@xxxxxxxxxxx>:

Can u please explain how the node-set function could help in this
context?
Sure...

In stead of the the clumsy 'substring()' approach, you could use a result tree fragment, given that you have got an extension function that can convert it to a node-set.

e.g.
<xsl:sort select="xx:node-set($sortkey)//e[position()=count(current()/preceding-sibling::e)]"/>


with this template:
<xsl:template match="e" mode="sortkey">
<e>
<xsl:apply-templates select="@*" mode="sortkey">
<xsl:sort select="." data-type="string"/>
</xsl:apply-templates>
</e>
</xsl:template>

(not tested)


regards,
--
Joris Gillis (http://www.ticalc.org/cgi-bin/acct-view.cgi?userid=38041)
"CB&CB9CB;CB.CB:CB?CB?CB= CB5CB9CB=CB1CB9 CB<CB1CB;CB;CB?CB= CB7 Cb CB9CB;CECB;CB1CB;CB?CB=" - CE!CB;CB5CECB2CB?Cb&CB;CB?Cb


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.