xsl-list
[Top] [All Lists]

RE: Embed JavaScript in XSL

2002-11-20 11:20:23
From: SAL ROSALES Jr. [mailto:salrosales(_at_)prodigy(_dot_)net]
Sent: Wednesday, November 20, 2002 10:12 AM
Subject: Re: [xsl] Embed JavaScript in XSL


In regards to the Javascript question, other XSL
developers have also advised me to stick with XSL. I
would love to do this but one thing that jumps to mind
is, how do you guys perform user input validation on a
form?

We perform most input validation in the app server, after the user submits
the form; if any of the validation actions fail, the error message is
inserted into the input XML, and the stylesheet redisplays the form with the
message and the offending input field highlighted.  We standardize the
format of the error messages so that a single template can be used for the
transformation.

I dislike relying solely on client-side validation because the
implementations are rarely portable, and displaying error messages in a
meaningful way usually involves a lot of cumbersome DHTML, unless you use
those annoying alert() dialogs.  Building validation into the back-end, and
using XSLT to transform error messages into a consistent format, reduces
maintenance and minimizes user confusion.

b.

| brian martinez                              
brian(_dot_)martinez(_at_)trip(_dot_)com |
| senior gui programmer                                  303.708.7248 |
| trip network, inc.                                 fax 303.790.9350 |
| 6436 s. racine cir.                             englewood, co 80111 |
| http://www.cheaptickets.com/                   http://www.trip.com/ |

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



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