First, I have searched the forums and cannot find a similar thread. I am working on a team developing web applications with ROO and related technologies. I am new to JSP and ROO, so perhaps I'm missing something.
When using JSP templates to create Web forms in concert with ROO, I notice that the HTML sent to the useragent includes illegal values for input IDs. I.e, it is best to avoid underscores completely, but AFAIK it is outright illegal to begin an ID value with anything other than [A-Za-z].
When I try to validate using any of the HTML4+ or XHTML1+ doctypes, I get this:
Line 10, Column 13: value of attribute "FOR" invalid: "_" cannot start a name
It is possible that you violated the naming convention for this attribute. For example, id and name attributes must begin with a letter, not a digit.
I've spent several hours today reviewing best practices for HTML, XML, XHTML on ID and CLASS attributes to make sure I'm not going mad. Is "seems" that if IDs like "_firstName_id" are working, it must be browser forgiveness.
Is there a specific reason, other than to avoid ID collision, that the IDs are automagically generated with leading underscores? Is anyone running into validation problems with this convention?
Thanks in advance.