hi santosh,

thanks for your reply.

i use the following to sort my records.
<xsl:for-each select="favouritecars/item" order-by="car">

by the way, is there anyway in XSLT that i can specify my how many records to return?  
sorry, but i am new to XSLT and XML, i notice that i can't add in a form tag(button or 
text) in the XSL document.....so how do i go about to do this?

i actually put response.setContentType("text/xml") in my jsp, so that an xml doc is 
output and transformed into html using xsl by IE itself, my question is, is the 
solution workable?  or is there any other solutions out there?

thanks and best regards,
cedric
A mailing list about Java Server Pages specification and
              reference <[EMAIL PROTECTED]> wrote:
>
> You can use XSL to sort XML nodes before processing
>
> Here's some sample code
>
> sort.xslt
>
> <table border="1">
> <xsl:for each select="servlet">
>
>
> <xsl:sort select="servlet_name" data_type="text"/>
>
> <tr>
> <td>
> <xsl:apply-templates>
> </td>
> </tr>
> </table>
>
>
> try this
> Santosh
>
>
>
>
>
>
> cedric sk chin <[EMAIL PROTECTED]> on 03/30/2001 10:23:20 AM
>
> Please respond to A mailing list about Java Server Pages specification and
>       reference <[EMAIL PROTECTED]>
>
> To:   [EMAIL PROTECTED]
> cc:    (bcc: Santosh Daryani/IT/Aon Consulting)
>
> Subject:  urgent, help on sorting records in xml?
>
>
>
> hi fellow developers,
>
> can anyone give me some ideas on how to sort records in xml?  perhaps a sample
> code would do, i need this urgently, i'm using jdom as my back-end.
>
> appreciate if anyone could shed some light on this........
>
> thanks for any help and suggestions.
>
> ced.
>
> for example in this xml file, how do i sort it by the servlet name:
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <web-app>
>     <servlet>
>         <servlet-name>
>             snoop
>         </servlet-name>
>         <servlet-class>
>             SnoopServlet
>         </servlet-class>
>     </servlet>
>
>     <servlet>
>     <servlet-name>
>         login
>     </servlet-name>
>         <servlet-class>
>         LoginServlet
>     </servlet-class>
>     </servlet>
>
>     <servlet>
>         <servlet-name>
>             file
>         </servlet-name>
>         <servlet-class>
>             ViewFile
>         </servlet-class>
>         </servlet>
>
>
> </web-app>
> __________________________________________________________________
> Get your own FREE, personal Netscape Webmail account today at
> http://webmail.netscape.com/
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
__________________________________________________________________
Get your own FREE, personal Netscape Webmail account today at 
http://webmail.netscape.com/

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to