You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Kevin Duffey <kd...@buymedia.com> on 2000/06/25 02:38:08 UTC

RE: Nightly builds?

Holy moly! You did do a lot!

Hey..if you want, I did some work on JavaScript validation routines. Here is
an example of how a field would be validated:

<form action... onsubmit="return submitForm(this, true)">

<input type="hidden" name="validate" value="required"><input type="text"
name="Name" value="">

<input type="hidden" name="validate" value="email"><input type="text"
name="Email" value="">

<input type="hidden" name="validate" value="required, phone,
image=Phone"><input type="text" name="PhoneArea" value="" size="3"
maxlength="3"><input type="text" name="PhonePrefix" value="" size="3"
maxlength="3"><input type="text" name="PhoneSuffix" value="" size="4"
maxlength="4">

As you can see..to validate a field, you simply put a hidden element with
the name set to "validate" before the field to be validated. My code
iterates through every element and if it finds one with the name set to
validate AND its hidden, it then grabs its value, and breaks it into tokens.
It then gets the next field name and value, then iterates over the number of
tokens, processing each one for validation on the value of the field AFTER
the validate element. I am using Regular Expressions in JavaScript to
evaluate each token, and also use some regular expressions in the validation
routines themselves. I found a good email validation expression that
conforms to the RFC spec for email addresses, for example. So far I have 10
types of validation:

required           - can not be empty upon submission
phone              - validates three fields (area, prefix and suffix..all
next to each other) that they are not empty, and digits only, no spaces,
etc.
alpha_only         - only a-z and A-Z, nothing else
no_spaces          - no spaces allowed (good for login names and passwords)
digits_only        - 0 - 9 only, nothing else
alpha_digits_only  - a-z, A-Z and 0-9 only..nothing else
min                - minimum number of characters must be present (no less)
max                - max number of characters allowed (nothing more)
image              - used to display an image using image roll-over so you
can place an image next to a field..and if its not valid, an image appears
next to it immediately..nice effect for immediate notice of invalid fields.
select             - validates a SELECT box. You specify the value that is
"default" and if it is that upon submission..it is NOT valid. Good way to
make sure they select an item in a list box or drop-down box.

I haven't added anything else yet, but you can use combos of the words in
the value=" " attribute of the "validate" input tag. At any rate..its geared
towards my site right now..but I am happy to donate it to you..and you can
figure out if you like it. I don't know exactly how you would use it in
Struts..maybe I can help out there if I get some spare time.



That XSLT thing looks kewl..although I still don't know exactly how it would
work. It seems more complex to create a style-sheet than it is to
graphically created pages and add JSP constructs where needed. I can't see a
front-end web guy using XSL much, and writing style sheets that transform
xml tags and dynamic content into html. What do you think? Is this the way
things are going..using XML output, XSLT to transform to HTML? I like the
idea of just plugging in a different XSL to the transform engine and getting
a different look to the site..I think that has big promise on the MySite
type of sites..to personalize the look of a site.

Take care.


Re: Nightly builds?

Posted by Eduardo Pelegri--Llopart <Ed...@eng.sun.com>.
We are very happy with Allaire's participation in the expert group, but
it is important to remember that they are only one of a several experts
in JSR053.  Several other vendors and individuals have also sent early
proposals.

	- eduard/o

Wong Kok Wai wrote:
> 
> Allaire's JRun tag lib ... In addition, they claim they've submit
> the tag lib to Sun for inclusion as the standard tag lib for JSP 1.2. So I guess
> the API should be pretty stable.

Re: Nightly builds?

Posted by Eduardo Pelegri--Llopart <Ed...@eng.sun.com>.
We are very happy with Allaire's participation in the expert group, but
it is important to remember that they are only one of a several experts
in JSR053.  Several other vendors and individuals have also sent early
proposals.

	- eduard/o

Wong Kok Wai wrote:
> 
> Allaire's JRun tag lib ... In addition, they claim they've submit
> the tag lib to Sun for inclusion as the standard tag lib for JSP 1.2. So I guess
> the API should be pretty stable.

Re: Nightly builds?

Posted by Wong Kok Wai <wo...@pacific.net.sg>.
Allaire's JRun tag lib supplies a FORM tag which also includes validation.
Similarly there is a tag for XSLT. Frankly, I've yet to try it. But the
documentation makes it looks pretty easy. In addition, they claim they've submit
the tag lib to Sun for inclusion as the standard tag lib for JSP 1.2. So I guess
the API should be pretty stable.

Kevin Duffey wrote:

> Holy moly! You did do a lot!
>
> Hey..if you want, I did some work on JavaScript validation routines. Here is
> an example of how a field would be validated:
>
> <form action... onsubmit="return submitForm(this, true)">
>


Re: Nightly builds?

Posted by Eduardo Pelegri--Llopart <Ed...@eng.sun.com>.
Right, some people are certainly using it that way.  Check, for example,
the Fusion product from Forte.

	- eduard/o

Kevin Duffey wrote:
> 
> I am interested in knowing if XSLT would make sense in a B2B "middle-man"
> situation transforming one companies output format into another companies
> input..so two separate companies could work together?
> 
> We got into this argument the other day at lunch and I assured a few that
> XSLT could be used to convert one format to another..that it wasn't just for
> UI output. I know its mostly used in xml -> html and wml type of
> applications now, but it could theoretically be used to convert one xml to
> another right?
> 
> > My personal guess at this moment is that we will see the use of XSLT for
> > those cases where the structure of the documents is fairly stable and it
> > makes sense to invest in writing the style-sheets (assuming no
> > performance issues, which I am less clear at the moment).
> >
> > So, for example, if you are publishing a book with a given DTD, it makes
> > a lot of sense to apply XSLT to it.  Similarly, if you have a clear DTD
> > for wireless data, it may make sense to have a few XSLT transformations
> > to generate content for XHTML basic, or WML, or compact HTML, or
> > whatever other devices take.
> >
> > On the other hand, JSPs are a good way to construct this content from a
> > number of different sources.
> >
> > The scenario followed by the team that created java.sun.com/javaone
> > seems quite typical.  They used two sets of JSP pages.  One set created
> > HTML content directly.  The other set created XML content, which it was
> > then manipulated in a number of different ways, including XSLT, to send
> > down to the client.
> >
> > The team used JSP 1.0, JavaBeans, and hand-coded the pages, but now that
> > JSP 1.1 support and graphical authoring tools are beginning to appear,
> > I'd use tag libraries and an authoring tool.
> >
> > Note that there are other places where XSLT can also make sense, like to
> > collect and sort data from some XML source, so it can be used within a
> > JSP page.
> >
> > Some of these scenarios were described in the architecture talk that
> > Danny and I gave at JavaOne
> > (http://jsp.java.sun.com/javaone/javaone2000/event.jsp?eventId=154
> > 5&trackId=3&eventType=TS)
> >
> > HOpe this helps,
> >
> >       - eduard/o
> >
> > Kevin Duffey wrote:
> >
> > > That XSLT thing looks kewl..although I still don't know exactly
> > how it would
> > > work. It seems more complex to create a style-sheet than it is to
> > > graphically created pages and add JSP constructs where needed.
> > I can't see a
> > > front-end web guy using XSL much, and writing style sheets that
> > transform
> > > xml tags and dynamic content into html. What do you think? Is
> > this the way
> > > things are going..using XML output, XSLT to transform to HTML?
> > I like the
> > > idea of just plugging in a different XSL to the transform
> > engine and getting
> > > a different look to the site..I think that has big promise on the MySite
> > > type of sites..to personalize the look of a site.
> > >
> > > Take care.
> >

Re: Nightly builds?

Posted by Eduardo Pelegri--Llopart <Ed...@eng.sun.com>.
Right, some people are certainly using it that way.  Check, for example,
the Fusion product from Forte.

	- eduard/o

Kevin Duffey wrote:
> 
> I am interested in knowing if XSLT would make sense in a B2B "middle-man"
> situation transforming one companies output format into another companies
> input..so two separate companies could work together?
> 
> We got into this argument the other day at lunch and I assured a few that
> XSLT could be used to convert one format to another..that it wasn't just for
> UI output. I know its mostly used in xml -> html and wml type of
> applications now, but it could theoretically be used to convert one xml to
> another right?
> 
> > My personal guess at this moment is that we will see the use of XSLT for
> > those cases where the structure of the documents is fairly stable and it
> > makes sense to invest in writing the style-sheets (assuming no
> > performance issues, which I am less clear at the moment).
> >
> > So, for example, if you are publishing a book with a given DTD, it makes
> > a lot of sense to apply XSLT to it.  Similarly, if you have a clear DTD
> > for wireless data, it may make sense to have a few XSLT transformations
> > to generate content for XHTML basic, or WML, or compact HTML, or
> > whatever other devices take.
> >
> > On the other hand, JSPs are a good way to construct this content from a
> > number of different sources.
> >
> > The scenario followed by the team that created java.sun.com/javaone
> > seems quite typical.  They used two sets of JSP pages.  One set created
> > HTML content directly.  The other set created XML content, which it was
> > then manipulated in a number of different ways, including XSLT, to send
> > down to the client.
> >
> > The team used JSP 1.0, JavaBeans, and hand-coded the pages, but now that
> > JSP 1.1 support and graphical authoring tools are beginning to appear,
> > I'd use tag libraries and an authoring tool.
> >
> > Note that there are other places where XSLT can also make sense, like to
> > collect and sort data from some XML source, so it can be used within a
> > JSP page.
> >
> > Some of these scenarios were described in the architecture talk that
> > Danny and I gave at JavaOne
> > (http://jsp.java.sun.com/javaone/javaone2000/event.jsp?eventId=154
> > 5&trackId=3&eventType=TS)
> >
> > HOpe this helps,
> >
> >       - eduard/o
> >
> > Kevin Duffey wrote:
> >
> > > That XSLT thing looks kewl..although I still don't know exactly
> > how it would
> > > work. It seems more complex to create a style-sheet than it is to
> > > graphically created pages and add JSP constructs where needed.
> > I can't see a
> > > front-end web guy using XSL much, and writing style sheets that
> > transform
> > > xml tags and dynamic content into html. What do you think? Is
> > this the way
> > > things are going..using XML output, XSLT to transform to HTML?
> > I like the
> > > idea of just plugging in a different XSL to the transform
> > engine and getting
> > > a different look to the site..I think that has big promise on the MySite
> > > type of sites..to personalize the look of a site.
> > >
> > > Take care.
> >

RE: Nightly builds?

Posted by Kevin Duffey <kd...@buymedia.com>.
I am interested in knowing if XSLT would make sense in a B2B "middle-man"
situation transforming one companies output format into another companies
input..so two separate companies could work together?

We got into this argument the other day at lunch and I assured a few that
XSLT could be used to convert one format to another..that it wasn't just for
UI output. I know its mostly used in xml -> html and wml type of
applications now, but it could theoretically be used to convert one xml to
another right?


> My personal guess at this moment is that we will see the use of XSLT for
> those cases where the structure of the documents is fairly stable and it
> makes sense to invest in writing the style-sheets (assuming no
> performance issues, which I am less clear at the moment).
>
> So, for example, if you are publishing a book with a given DTD, it makes
> a lot of sense to apply XSLT to it.  Similarly, if you have a clear DTD
> for wireless data, it may make sense to have a few XSLT transformations
> to generate content for XHTML basic, or WML, or compact HTML, or
> whatever other devices take.
>
> On the other hand, JSPs are a good way to construct this content from a
> number of different sources.
>
> The scenario followed by the team that created java.sun.com/javaone
> seems quite typical.  They used two sets of JSP pages.  One set created
> HTML content directly.  The other set created XML content, which it was
> then manipulated in a number of different ways, including XSLT, to send
> down to the client.
>
> The team used JSP 1.0, JavaBeans, and hand-coded the pages, but now that
> JSP 1.1 support and graphical authoring tools are beginning to appear,
> I'd use tag libraries and an authoring tool.
>
> Note that there are other places where XSLT can also make sense, like to
> collect and sort data from some XML source, so it can be used within a
> JSP page.
>
> Some of these scenarios were described in the architecture talk that
> Danny and I gave at JavaOne
> (http://jsp.java.sun.com/javaone/javaone2000/event.jsp?eventId=154
> 5&trackId=3&eventType=TS)
>
> HOpe this helps,
>
> 	- eduard/o
>
> Kevin Duffey wrote:
>
> > That XSLT thing looks kewl..although I still don't know exactly
> how it would
> > work. It seems more complex to create a style-sheet than it is to
> > graphically created pages and add JSP constructs where needed.
> I can't see a
> > front-end web guy using XSL much, and writing style sheets that
> transform
> > xml tags and dynamic content into html. What do you think? Is
> this the way
> > things are going..using XML output, XSLT to transform to HTML?
> I like the
> > idea of just plugging in a different XSL to the transform
> engine and getting
> > a different look to the site..I think that has big promise on the MySite
> > type of sites..to personalize the look of a site.
> >
> > Take care.
>


RE: Nightly builds?

Posted by Kevin Duffey <kd...@buymedia.com>.
I am interested in knowing if XSLT would make sense in a B2B "middle-man"
situation transforming one companies output format into another companies
input..so two separate companies could work together?

We got into this argument the other day at lunch and I assured a few that
XSLT could be used to convert one format to another..that it wasn't just for
UI output. I know its mostly used in xml -> html and wml type of
applications now, but it could theoretically be used to convert one xml to
another right?


> My personal guess at this moment is that we will see the use of XSLT for
> those cases where the structure of the documents is fairly stable and it
> makes sense to invest in writing the style-sheets (assuming no
> performance issues, which I am less clear at the moment).
>
> So, for example, if you are publishing a book with a given DTD, it makes
> a lot of sense to apply XSLT to it.  Similarly, if you have a clear DTD
> for wireless data, it may make sense to have a few XSLT transformations
> to generate content for XHTML basic, or WML, or compact HTML, or
> whatever other devices take.
>
> On the other hand, JSPs are a good way to construct this content from a
> number of different sources.
>
> The scenario followed by the team that created java.sun.com/javaone
> seems quite typical.  They used two sets of JSP pages.  One set created
> HTML content directly.  The other set created XML content, which it was
> then manipulated in a number of different ways, including XSLT, to send
> down to the client.
>
> The team used JSP 1.0, JavaBeans, and hand-coded the pages, but now that
> JSP 1.1 support and graphical authoring tools are beginning to appear,
> I'd use tag libraries and an authoring tool.
>
> Note that there are other places where XSLT can also make sense, like to
> collect and sort data from some XML source, so it can be used within a
> JSP page.
>
> Some of these scenarios were described in the architecture talk that
> Danny and I gave at JavaOne
> (http://jsp.java.sun.com/javaone/javaone2000/event.jsp?eventId=154
> 5&trackId=3&eventType=TS)
>
> HOpe this helps,
>
> 	- eduard/o
>
> Kevin Duffey wrote:
>
> > That XSLT thing looks kewl..although I still don't know exactly
> how it would
> > work. It seems more complex to create a style-sheet than it is to
> > graphically created pages and add JSP constructs where needed.
> I can't see a
> > front-end web guy using XSL much, and writing style sheets that
> transform
> > xml tags and dynamic content into html. What do you think? Is
> this the way
> > things are going..using XML output, XSLT to transform to HTML?
> I like the
> > idea of just plugging in a different XSL to the transform
> engine and getting
> > a different look to the site..I think that has big promise on the MySite
> > type of sites..to personalize the look of a site.
> >
> > Take care.
>


Re: Nightly builds?

Posted by Eduardo Pelegri--Llopart <Ed...@eng.sun.com>.
My personal guess at this moment is that we will see the use of XSLT for
those cases where the structure of the documents is fairly stable and it
makes sense to invest in writing the style-sheets (assuming no
performance issues, which I am less clear at the moment).

So, for example, if you are publishing a book with a given DTD, it makes
a lot of sense to apply XSLT to it.  Similarly, if you have a clear DTD
for wireless data, it may make sense to have a few XSLT transformations
to generate content for XHTML basic, or WML, or compact HTML, or
whatever other devices take.

On the other hand, JSPs are a good way to construct this content from a
number of different sources.

The scenario followed by the team that created java.sun.com/javaone
seems quite typical.  They used two sets of JSP pages.  One set created
HTML content directly.  The other set created XML content, which it was
then manipulated in a number of different ways, including XSLT, to send
down to the client.

The team used JSP 1.0, JavaBeans, and hand-coded the pages, but now that
JSP 1.1 support and graphical authoring tools are beginning to appear,
I'd use tag libraries and an authoring tool.

Note that there are other places where XSLT can also make sense, like to
collect and sort data from some XML source, so it can be used within a
JSP page.

Some of these scenarios were described in the architecture talk that
Danny and I gave at JavaOne
(http://jsp.java.sun.com/javaone/javaone2000/event.jsp?eventId=1545&trackId=3&eventType=TS)

HOpe this helps,

	- eduard/o

Kevin Duffey wrote:

> That XSLT thing looks kewl..although I still don't know exactly how it would
> work. It seems more complex to create a style-sheet than it is to
> graphically created pages and add JSP constructs where needed. I can't see a
> front-end web guy using XSL much, and writing style sheets that transform
> xml tags and dynamic content into html. What do you think? Is this the way
> things are going..using XML output, XSLT to transform to HTML? I like the
> idea of just plugging in a different XSL to the transform engine and getting
> a different look to the site..I think that has big promise on the MySite
> type of sites..to personalize the look of a site.
> 
> Take care.

Re: Nightly builds?

Posted by Eduardo Pelegri--Llopart <Ed...@eng.sun.com>.
My personal guess at this moment is that we will see the use of XSLT for
those cases where the structure of the documents is fairly stable and it
makes sense to invest in writing the style-sheets (assuming no
performance issues, which I am less clear at the moment).

So, for example, if you are publishing a book with a given DTD, it makes
a lot of sense to apply XSLT to it.  Similarly, if you have a clear DTD
for wireless data, it may make sense to have a few XSLT transformations
to generate content for XHTML basic, or WML, or compact HTML, or
whatever other devices take.

On the other hand, JSPs are a good way to construct this content from a
number of different sources.

The scenario followed by the team that created java.sun.com/javaone
seems quite typical.  They used two sets of JSP pages.  One set created
HTML content directly.  The other set created XML content, which it was
then manipulated in a number of different ways, including XSLT, to send
down to the client.

The team used JSP 1.0, JavaBeans, and hand-coded the pages, but now that
JSP 1.1 support and graphical authoring tools are beginning to appear,
I'd use tag libraries and an authoring tool.

Note that there are other places where XSLT can also make sense, like to
collect and sort data from some XML source, so it can be used within a
JSP page.

Some of these scenarios were described in the architecture talk that
Danny and I gave at JavaOne
(http://jsp.java.sun.com/javaone/javaone2000/event.jsp?eventId=1545&trackId=3&eventType=TS)

HOpe this helps,

	- eduard/o

Kevin Duffey wrote:

> That XSLT thing looks kewl..although I still don't know exactly how it would
> work. It seems more complex to create a style-sheet than it is to
> graphically created pages and add JSP constructs where needed. I can't see a
> front-end web guy using XSL much, and writing style sheets that transform
> xml tags and dynamic content into html. What do you think? Is this the way
> things are going..using XML output, XSLT to transform to HTML? I like the
> idea of just plugging in a different XSL to the transform engine and getting
> a different look to the site..I think that has big promise on the MySite
> type of sites..to personalize the look of a site.
> 
> Take care.

Re: Nightly builds?

Posted by Wong Kok Wai <wo...@pacific.net.sg>.
Allaire's JRun tag lib supplies a FORM tag which also includes validation.
Similarly there is a tag for XSLT. Frankly, I've yet to try it. But the
documentation makes it looks pretty easy. In addition, they claim they've submit
the tag lib to Sun for inclusion as the standard tag lib for JSP 1.2. So I guess
the API should be pretty stable.

Kevin Duffey wrote:

> Holy moly! You did do a lot!
>
> Hey..if you want, I did some work on JavaScript validation routines. Here is
> an example of how a field would be validated:
>
> <form action... onsubmit="return submitForm(this, true)">
>