xsl-list
[Top] [All Lists]

RE: Sorting Problem

2003-10-16 08:30:51
From: puja thakral [mailto:puja_thakral(_at_)yahoo(_dot_)com]
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:

http://www-106.ibm.com/developerworks/xml/library/x-xdpshpul.html?open&l=976
,t=gr

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:

http://www.w3.org/Style/XSL/ (W3 home page for XSL/XSLT)
http://www.dpawson.co.uk/xsl/xslfaq.html (XSL/XSLT FAQ, hosted by Dave
Pawson)
http://www.xslt.com/ (apparently under new management; still lots o' links)

hth,
b.

| brian martinez                           
brian(_dot_)martinez(_at_)cendant(_dot_)com |
| 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   http://www.cheaptickets.com/ |

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



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