RE: [xsl] <xsl:sort> and <xsl:copy-of> in conjunction with one an other

Subject: RE: [xsl] <xsl:sort> and <xsl:copy-of> in conjunction with one an other
From: "Stanger, Jan" <jan.stanger@xxxxxxxx>
Date: Wed, 29 Jan 2003 13:41:56 -0500
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>

This message is for the named person's use only. It may contain sensitive and private proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you are not the intended recipient, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. CREDIT SUISSE GROUP and each legal entity in the CREDIT SUISSE FIRST BOSTON or CREDIT SUISSE ASSET MANAGEMENT business units of CREDIT SUISSE FIRST BOSTON reserve the right to monitor all e-mail communications through its networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of any such entity.
Unless otherwise stated, any pricing information given in this message is indicative  only, is subject to change and does not constitute an offer to deal at any price quoted. Any reference to the terms of executed transactions should be treated as  preliminary only and subject to our formal written confirmation.



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


Current Thread