List,

First, a brief introduction. I'm a long time follower of the Stripes
project, coming to Stripes after *significant* disenchantment with JSF
and Struts. I've been an advocate for Stripes in my organization for
some time and have "won." We are moving to Stripes in our next
generation of applications.

My primary joy with Stripes has been in how the *engineers* and
*developers* of the library made the View a first-class citizen in the
MVC pattern. This is not the case of Struts and JSF (more so in the
latter!).

Yet, with development of our applications to HTML standards, making sure
our HTML is valid and clients are always in "Standards Mode" I
discovered that Stripes makes a gross assumption about the View: the
DOCTYPE of the response will be "XHTML 1.0 Transitional."

Without reciting the history of XHTML, its Transitional and Strict DTDs,
and why HTML 4.01 is just the better choice, I think Stripes has made
terribly bad assumption. And even though this is not explicitly
documented, it is assumed anywhere that Stripes closes an "empty
element" with " />". Stripes should not be making assumptions about the
DOCTYPE. Let's understand why this assumption is bad.

There are ten (10) empty elements defined by HTML 4.01:

BASE, META, BR, AREA, LINK, IMG, PARAM, HR, INPUT, COL

Stripes defines a tag for INPUT (and its various types). Some code
diving in v1.5.1 shows that input tags are terminated in the XHTML
fashion through the writeSingletonTag method of HtmlTagSupport.

With nine (9) other elements wholly in the domain of the Web/HTML
developer using, hopefully, best practices to create validating code to
the HTML DTD, particularly HTML 4.01, Stripes throws a curve ball. The
"Am I XHTML or HTML?" schizophenic response is full of warnings and
errors for elements provided by Stripes.

I commented on STS-556 to this effect (please see and read the links
provided by the commenters on why XHTML is just "Invalid HTML 4.01!").
Bottomline, Stripes should not make an assumption about the DOCTYPE
being used by the developer. Instead Stripes should provide a facility
for the Web Tier developer to choose the DOCTYPE to validate against
though best practices.

I'm working on a patch for v1.5.1 that will leverage a controller
parameter as an XHTML switch and branch in the HtmlTagSupport to use a
possibly overloaded version of writeSingletonTag, or new method yet
defined, that correctly terminates INPUT elements for the DOCTYPE. The
patch will default to HTML termination, making XHTML "opt-in."

I look forward to the debate and resolution of this topic, both as a
Stripes user and HTML/JavaScript/CSS guru.

Regards,
Tim


Barclays             www.barclaycardus.com

This e-mail and any files transmitted with it may contain confidential and/or 
proprietary information. It is intended solely for the use of the individual or 
entity who is the intended recipient. Unauthorized use of this information is 
prohibited. If you have received this in error, please contact the sender by 
replying to this message and delete this material from any system it may be on.



------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to