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

Re: sorting related issue

Subject: Re: sorting related issue
From: "Sanjay Pandey/Towers Perrin" <pandeys@xxxxxxxxxx>
Date: Fri, 14 Dec 2001 11:46:41 -0500
sanjay pandey

Hi List,

I tried the following

     <xsl:variable name="sortedErrorMessage">
          <xsl:for-each select="/ErrorMessages/ErrorMessage">
               <xsl:sort select="Name" order="ascending" />
               <xsl:sort select="Type" order="ascending" />
                    <xsl:value-of select="Name" />
                    <xsl:value-of select="Type" />
                    <xsl:value-of select="Details" />
          </xsl:for-each>
     </xsl:variable>

I can view the value of variable and that is correctly set
     <xsl:template match="/">
          <xsl:value-of select="$sortedErrorMessage"/>
     </xsl:template>

and then if I add
     <xsl:for-each select="msxsl:node-set($sortedErrorMessage)/Name">
          <xsl:value-of select="."/>
     </xsl:for-each>

the XSL does not proceed further. Is that an MSXML environment issue?

Thanks,
Sanjay


                                                                                                                                
                                                                                                                                
                                                      To:     xsl-list@xxxxxxxxxxxxxxxxxxxxxx                                   
                    Sanjay Pandey/Towers              cc:     (bcc: Sanjay Pandey/Towers Perrin)                                
                    Perrin@TP                         Subject:      sorting related issue                                  
                    Sent by:                                                                                                    
                    owner-xsl-list@xxxxxxxxxxxx                                                                                 
                    rytech.com                                                                                                  
                                                                                                                                
                                                                                                                                
                    12/14/2001 09:00 AM                                                                                         
                    Please respond to xsl-list                                                                                  
                                                                                                                                
                                                                                                                                





Hi List,

My XML looks something like below

<ErrorMessages>
     <ErrorMessage>
          <name>a</name>
          <type>1</type>
          <details>abcd</details>
     </ErrorMessage>
     .
     .
     .
     <ErrorMessage>
          .
          .
          .
     </ErrorMessage>
</ErrorMessages>

I would like to sort my XML on <name> and <type> on the Client side and do
things like do not display "name" if the next "ErrorMessage" record also
has the same "name".

I tried checking using "preceding-sibling" but that uses the "document
order". I am sure this is a trivial issue, but I need some clue / pointers
/ direction.

I am using MSXML3 on the Client side (IE browser only).

Any response would be highly appreciated.

Thanks,
Sanjay



 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.