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

RE: <xsl:sort> and <xsl:copy-of> in conjunction with o

Subject: RE: <xsl:sort> and <xsl:copy-of> in conjunction with one an other
From: "Andy J. Cupp" <acupp@xxxxxxxxxxxxxxx>
Date: Wed, 29 Jan 2003 13:36:43 -0600
xsl copy of example
Hi Jan,
	I looked over your xslt and nothing seems to be wrong there.  Could you post a sample of your xml?

Thanks,
Andy

-----Original Message-----
From: Stanger, Jan [mailto:jan.stanger@xxxxxxxx]
Sent: Wednesday, January 29, 2003 12:42 PM
To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
Subject: RE:  <xsl:sort> and <xsl:copy-of> in conjunction with one
an other


I am still somewhat puzzled by below section of my code. I am trying to sort all DataRow nodes by up to five columns. Now the output actually looks unchanged from the input XML, as if the sorting would not have taken place at all. Is there anything obvious that I am missing? I have studied the online XSLT FAQ that I have been made aware of yesterday, but none of the sorting examples have helped me in this particular case.

I have checked all below variables (sortby, sortdatatype etc.) and they do contain correct values. Could it be that the copy-of instruction actually uses the original XML tree as opposed to the 'indexed' version of it after the sort?

Any help is appreciated.
Jan

-----Original Message-----

        <!-- Actual sorting of data rows -->            
        <xsl:for-each select="DataRow">
            <xsl:sort select="column[@name=$sortby0]" data-type="{$sortdatatype0}" order="{$sortorder0}" />
            <xsl:sort select="column[@name=$sortby1]" data-type="{$sortdatatype1}" order="{$sortorder1}" />
            <xsl:sort select="column[@name=$sortby2]" data-type="{$sortdatatype2}" order="{$sortorder2}" />
            <xsl:sort select="column[@name=$sortby3]" data-type="{$sortdatatype3}" order="{$sortorder3}" />
            <xsl:sort select="column[@name=$sortby4]" data-type="{$sortdatatype4}" order="{$sortorder4}" />
            <!-- Finally copy each DataRow node to output XML -->                
            <xsl:copy-of select="." />            
        </xsl:for-each>



 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.