myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rudi Steiner" <rudi.stei...@googlemail.com>
Subject Re: XHTML Strict
Date Wed, 18 Apr 2007 09:24:30 GMT
On 4/16/07, Mike Kienenberger <mkienenb@gmail.com> wrote:
> From the JSF 1.1 spec:
> =============================
> 8.5 Standard HTML RenderKit
> Implementation
> To ensure application portability, all JSF implementations are
> required to include
> support for a RenderKit, and the associated Renderers, that meet the
> requirements defined in this section, to generate textual markup that
> is compatible
> with HTML 4.01.
> =============================
>
> However, if there are changes we can make to MyFaces Core that will
> improve xhtml support while still meeting the above requirement, we
> can make them.
>
>
> On 4/16/07, Rudi Steiner <rudi.steiner@googlemail.com> wrote:
> > Hi all,
> >
> > making some investigations on XHTML-comfomance fo myFaces (without
> > Tomahawk) I found out, that the output of the basic components, like
> > <h:form/>, <h:commandButton/> and so on render valid XHTML but just
> > transitional (<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
> > Transitional//EN"
> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">).
> >
> > The problem is, that our customer requires XHTML-Strict (<!DOCTYPE
> > html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">).
> >
> > Running the XHTML-output of a standard form against the validator of
> > the W3C. I get some errormessages.
> >
> > The first one ist, that there is no name-attribute in the defined DTD
> > for the form-element, but the <h:form/>-tag renders it:
> >
> > <form id="_idJsp2" name="_idJsp2" method="post" action=
> >
> > The second error is, that the hidden fields inserted by the
> > JSF-implementation into the form are not enclosed in a div-Element. If
> > I but my input-Elements inside the form in a <t:div/>, this elements
> > are enclosed in a <div> and don't produce any errors, but the hidden
> > fields inserted by myfaces are rendered after the closing </div>-Tag.
> >
> > Has anyone an idea? Isn't it required by the JSF-Spec to render
> > XHTML-Strict to be a standard conform implementation?
> >
> >
> > Best regards,
> > Rudi
> >
>

Hello Mike,

I tested the generated output of a <h:form/> with the following doctype

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

with the validator at http://validator.w3.org/. The validator
generates a lot of errors, for example this one:
Line 20 column 11: value of attribute "ID" invalid: "_" cannot start a name.
	<form id="_idJsp4" name="_idJsp4" method="post" action="/Pro/createPerson.jsf"

Changeing the Doctype of the same markup to

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

the markup passes validation.

Does this mean, that myFaces is not Spec-conform, given that the spec
says HTML 4.01 must be generated?

Best regards,
Rudi

Mime
View raw message