Actually, that very specific error also gives me headache too, but it come directly from the official API. See UIViewRoot.createUniqueId() and UIViewRoot.UNIQUE_ID_PREFIX.
That being said, the spec does not forces the value of UNIQUE_ID_PREFIX (which is _id in the RI API) so I guess MyFaces could give it another, HTML 4.01 compliant value, and I sure hope so. http://java.sun.com/javaee/javaserverfaces/1.1_01/docs/api/javax/faces/component/UIViewRoot.html http://java.sun.com/javaee/javaserverfaces/1.1_01/docs/api/constant-values.html#javax.faces.component.UIViewRoot.UNIQUE_ID_PREFIX Regards, ~ Simon On 4/18/07, Rudi Steiner <[EMAIL PROTECTED]> wrote:
On 4/16/07, Mike Kienenberger <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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

