struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: Well-formed HTML support in struts 1.01+ !!
Date Wed, 12 Dec 2001 17:53:57 GMT


On Wed, 12 Dec 2001, Morten M. Christensen wrote:

> Date: Wed, 12 Dec 2001 12:28:57 +0100
> From: Morten M. Christensen <mmc@navigosystems.com>
> Reply-To: Struts Developers List <struts-dev@jakarta.apache.org>
> To: struts-dev@jakarta.apache.org
> Subject: Well-formed HTML support in struts 1.01+ !!
>
> At our company we have been using struts 1.0 since the release and very
> glad for it... Until recently, where we have shocked by the discovery
> that structs 1.0 breaks all out attempts at produce well-formed HTML!
>

Well-formed HTML and well-formed XHTML (which is really just an
application of XML) are two different things.

> Our situation is that we now need to output well-formed HTML (we will
> probably use XHTML), in order to do easy post processing in XSL/Java for
> various nice things like automated GUI testing (all extremely important
> and requires well-formed HTML / XHTML).
>

All of the Struts tags in 1.0 generate well-formed HTML tags, in
accordance with the W3C HTML Specification.

For XHTML, some recent work has been done in the HEAD branch (and
therefore available through the nightly builds) to give you the option to
create well-formed XHTML instead.  Simply do the following:

    <html:html xhtml="true">
      ...
    </html:html>

and the rendered tags will all be compatible with XML syntax, as XHTML
requires.


> At first we have tried to close all our struts tags (ex. <html:base /> -
> note the space needed for some old browsers) but to no avail. Struts
> just ignores our attempts at closing the tags.

This doesn't work because a Struts tag is really a JSP custom action call.
The actual HTML that is rendered is created by the tag itself.

>
> What can we do now? I would not like to either drop struts or drop our
> automated tests as well as other critial things that depends on
> well-formed HTML. I would therefore request that the struts developers
> find some way of at least minimal support for generating well formed
> HTML (and please do not suggest simply using TIDY or something like that
> - it does not work ; at least for us it does not).
>
> BTW: From searching the web I saw another posting about this from a
> "Matt Raible" (?), mentioning briefly some uncommitted code that could
> solve this (where, how ?). Would that be possible to just include that
> in 1.0.1 (it would need to be official so that we can count on it for
> the future).
>

See above.

> Sincerely,
> Morten Christensen,
> AArhus, Denmark
>


Craig



--
To unsubscribe, e-mail:   <mailto:struts-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-dev-help@jakarta.apache.org>


Mime
View raw message