RE: [xsl] Sorting Problem

Subject: RE: [xsl] Sorting Problem
From: "Martinez, Brian" <brian.martinez@xxxxxxxxxxx>
Date: Thu, 16 Oct 2003 09:30:51 -0600
> From: puja thakral [mailto:puja_thakral@xxxxxxxxx]
> Sent: Thursday, October 16, 2003 9:07 AM
> Subject: [xsl] Sorting Problem
> Hi everyone,
> I'm also having sorting problems.I'm using
> <xsl:for-each select="dataroot/GrantNet">
> <xsl:sort select="@fldCatID"/>
> </xsl:for-each>
> this code to sort my items by fldCatID but it doesn't
> seems to work.

Most likely, @fldCatID is not present in your current context (it needs to
be an attribute of the GrantNet node), but without seeing any sample XML
this is purely a guess.

> I also have one more question.I'm still learning
> xml/xsl.What is the difference between using
> <xsl:for-each select> and <xsl:template match>
> I tried using both of them but some functions seem to
> work in one and not in another.Can someone pls clarify
> the basic question.

This article explains it better than I ever could:

>I'm sorry if u find this question
> too dumb but there is noone working on this in my
> office whom I can ask?Also I could not find a
> convincing answer by searching on Google.

No question is too dumb (OK, maybe a few . . .), but with all due respect,
you can't have looked very hard.  Just typing 'xslt' in Google returns a
staggering number of results.  But here's a few links to start: (W3 home page for XSL/XSLT) (XSL/XSLT FAQ, hosted by Dave
Pawson) (apparently under new management; still lots o' links)


| brian martinez                           brian.martinez@xxxxxxxxxxx |
| lead gui programmer                                    303.357.3548 |
| cheap tickets, part of trip network                fax 303.357.3380 |
| 6560 greenwood plaza blvd., suite 400           englewood, co 80111 |
| cendant travel distribution services |

 XSL-List info and archive:

Current Thread