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

Re: Implementing user input in XSL

  • From: tpassin@h...
  • To: xml-dev@x...
  • Date: Tue, 15 Aug 2000 19:18:04 -0400

xslt javascript example
<EWDProductions@a...> wrote to ask -

>
> For example, I have a list of products, prices, reviews, and shipping
prices.
>  I want to be able to make a drop downlist that has each of the 4 options
and
> 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
reviews
> 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:

http://osdacces.nesdis.noaa.gov:8081/satprod/instruments/instrframeset.cfm?i
nstr=-1

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.

Cheers,

Tom Passin





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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.