xsl-list
[Top] [All Lists]

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

2003-01-29 14:53:40
I'm not the most experienced with xslt, but I still can't see anything wrong.  
I ran your xml model against the following xslt, and things worked fine with 
the sorting.  Hope you're able to figure it out.

Andy

XSLT Sample-
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";> 
        <xsl:template match="/">                
                <xsl:variable name="sortby0" select="'Description'"/>           
                <xsl:variable name="sortby1" select="'Quantity'"/>      
                <xsl:variable name="sortdatatype0" select="'text'"/>
                <xsl:variable name="sortdatatype1" select="'number'"/>  
                <xsl:variable name="sortorder0" select="'descending'"/>         
                <xsl:variable name="sortorder1" select="'ascending'"/>          
                
                <rows>        
                        <xsl:for-each select="DataSet/DataRow">            
                                <xsl:sort select="column[(_at_)name=$sortby0]" 
data-type="{$sortdatatype0}" order="{$sortorder0}" />
                                <xsl:sort select="column[(_at_)name=$sortby1]" 
data-type="{$sortdatatype1}" order="{$sortorder1}" />
                                <!-- Finally copy each DataRow node to output 
XML -->            
                                <xsl:copy-of select="." />        
                        </xsl:for-each>        
                </rows> 
        </xsl:template>
</xsl:stylesheet>

-----Original Message-----
From: Stanger, Jan [mailto:jan(_dot_)stanger(_at_)csfb(_dot_)com]
Sent: Wednesday, January 29, 2003 3:11 PM
To: 'xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com'
Subject: RE: [xsl] <xsl:sort> and <xsl:copy-of> in conjunction with one
an other


Andy,

my email from yesterday gives you an idea of how the XML looks like and also 
includes the entire XSL:

http://www.biglist.com/lists/xsl-list/archives/200301/msg01287.html

If you want, I can send a bigger XML sample document to your personal email.

Thanks for your help!
Jan

-----Original Message-----
From: Andy J. Cupp [mailto:acupp(_at_)fmr-systems(_dot_)com]
Sent: Wednesday, January 29, 2003 2:37 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] <xsl:sort> and <xsl:copy-of> in conjunction with one
an other


Hi Jan,
        I looked over your xslt and nothing seems to be wrong there.  Could you 
post a sample of your xml?

Thanks,
Andy

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


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



<Prev in Thread] Current Thread [Next in Thread>