OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: Implementing user input in XSL

[ Lists Home | Date Index | Thread Index ]
  • From: tpassin@home.com
  • To: xml-dev@xml.org
  • Date: Tue, 15 Aug 2000 19:18:04 -0400

<EWDProductions@aol.com> wrote to ask -

> For example, I have a list of products, prices, reviews, and shipping
>  I want to be able to make a drop downlist that has each of the 4 options
> when one is selected, the list is reordered based on that value.  For
> example, if they chose reviews, it resorts the list based on the best
> to worse.
> What I've been able to come up with is a script that will load a different
> xsl file to format the xml.  1 file for each option.  Now that's not
> including reverse odering.  I'm on 6 files for one page and if I were to
> implement searches and reverse orders, I'd be well over twenty.
This kind of thing is best done on the client as much as possible.  This
means in javascript, usually.  The O'Reilly book by Jon Udell, Practical
Internet Groupware, discusses this kind of thing in pages 396 ff,
"Polymorphic HTML Widgets".  He produces code at the server using perl and
cgi methods, but you could use xslt for it.  Send the data and some special
variables either in hidden fields in forms, or as javascript variables.  The
client might still have to come back to the server, but not necessarily.

For another example, you could look at this url:


This page loads over 200K of javascript arrays into one frame.  When you
make a selection from one of two pick lists, the code selects and displays
the data subset in the other frame without ever talking to the server again.
Granted, 200K is a little extreme, especially for low-bandwidth modem
connections.  But once it's loaded, you're all set.

This particular page is done using Cold Fusion and a relational database,
but you could use XSLT with the data in xml format to do the same thing.


Tom Passin


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS