[ http://mc4j.org/jira/browse/STS-339?page=comments#action_10598 ] 
            
Ben Gunter commented on STS-339:
--------------------------------

I agree that it is incorrect that the IDs start with a digit, but based on what 
I'm reading a leading underscore wouldn't be backward compatible with HTML 4. 
Maybe I'm confused. If I am, please point me in the right direction so I can 
get this right. Here's what I see...

XHTML spec section 4.10 says, "In XML, fragment identifiers are of type ID, and 
there can only be a single attribute of type ID per element. Therefore, in 
XHTML 1.0 the id attribute is defined to be of type ID."

http://www.w3.org/TR/xhtml1/#h-4.10

XHTML spec section C.8 says, "Note that the collection of legal values in XML 
1.0 Section 2.3, production 5 is much larger than that permitted to be used in 
the ID and NAME types defined in HTML 4. When defining fragment identifiers to 
be backward-compatible, only strings matching the pattern 
[A-Za-z][A-Za-z0-9:_.-]* should be used. See Section 6.2 of [HTML4] for more 
information."

http://www.w3.org/TR/xhtml1/#C_8

And finally, HTML 4 spec section 6.2 says, "ID and NAME tokens must begin with 
a letter ([A-Za-z]) and may be followed by any number of letters, digits 
([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".")."

http://www.w3.org/TR/html4/types.html#h-6.2

We should follow the suggestions in the spec to maintain backward 
compatibility. So I'm thinking something like "stripes:0123456789" will work. 
If no one objects, this is the pattern I'm going to use.

> Incorrect XHTML ID attridute
> ----------------------------
>
>                 Key: STS-339
>                 URL: http://mc4j.org/jira/browse/STS-339
>             Project: Stripes
>          Issue Type: Bug
>          Components: Tag Library
>    Affects Versions: Release 1.4.2
>            Reporter: Philip Savkin
>         Assigned To: Tim Fennell
>            Priority: Minor
>         Attachments: InputTagSupport.patch.txt
>
>
> Stripes generates incorrect XHTML ID attributes for form tags. According to 
> specification the ID attribute must not start with a digit or '-' sign. As a 
> result, W3C Validator Service reports incorrect XHTML. My proposal is to 
> begin those synthetic ID's with an underscore character. Patch attached.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://mc4j.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to