[Bug 11910] New: @id values in polyglot markup should be XML-valid (or not?)

http://www.w3.org/Bugs/Public/show_bug.cgi?id=11910

           Summary: @id values in polyglot markup should be XML-valid  (or
                    not?)
           Product: HTML WG
           Version: unspecified
          Platform: PC
               URL: http://dev.w3.org/html5/html-xhtml-author-guide/html-x
                    html-authoring-guide.html#attributes
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTML/XHTML Compatibility Authoring Guide (ed: Eliot
                    Graff)
        AssignedTo: eliotgra@microsoft.com
        ReportedBy: xn--mlform-iua@xn--mlform-iua.no
         QAContact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-wg-issue-tracking@w3.org,
                    public-html@w3.org, eliotgra@microsoft.com
        Depends on: 11909


In a halleluia, people have realized that HTML5 permits any character as @id
value:

http://twitter.com/#!/codepo8/status/30212174852923392
http://www.456bereastreet.com/archive/201011/html5_allows_almost_any_value_for_the_id_attribute_use_wisely/
http://mathiasbynens.be/notes/html5-id-class

However, in XML, the value of an @id, has the validity constratints that it
must meet XML's name production, which amongst other things means that the
first character cannot be a number. It is not a well-formedness issue, it
doesn't cause yellow-screen-of death. 

See http://www.w3.org/TR/REC-xml/#id 

Even HTML5 has validity constraints: space characters are not permitted
(line-feeds, tabs, space, carriage returs). And even in HTML5, this is
primariliy a validity issue - at least CSS selectors works flawlessly even if
the @id has space within itself.

But space is not a problem per XML's validity rules. In XML then both 
line-feeds, tabs, space and CR are not anymore invalid inside @id than in any
other attribute: you can use all of them, as long as you escape line-feeds,
tabs and CRs and as long as XML-validity is not an issue.

OPTIONS:
 1) Disallow space in @id because it is HTML5's validity rules that matters.
      But  ignore the XML validity rules.
 2) Same as 1) but say that authors SHOULD also be XML-valid
 3) same as 2) but say that authors MUST be XML-valid

Being silent is not an option. This bug depnes on bug 11909 - which is about
the principles of Polyglot Markup.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Friday, 28 January 2011 13:28:15 UTC