RE: [xsl] Embed JavaScript in XSL

Subject: RE: [xsl] Embed JavaScript in XSL
From: "Martinez, Brian" <brian.martinez@xxxxxxxx>
Date: Wed, 20 Nov 2002 11:20:23 -0700
> From: SAL ROSALES Jr. [mailto:salrosales@xxxxxxxxxxx]
> 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.martinez@xxxxxxxx |
| 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


Current Thread