IDs [was: Re: [whatwg] Re: WEB_FORMS 2.0 comment, repetition model, using reserved macro scripting syntax]

Anne van Kesteren fora at annevankesteren.nl
Sat Aug 28 10:58:24 PDT 2004


>>> In any case, "[" and "]" are now valid in IDs according to the
>>> WF2 SGML declaration, apparently:
>>> 
>>> http://syntax.whatwg.org/sgml/html5core+wf2/pre1/declaration
>>> 
>>> Doesn't help in XML, but in XML DTDs aren't needed at all anyway,
>>> so the point is largely moot.
>> 
>> Maybe xml-editor at w3.org could be mailed to address this issue? If
>> they accept it as a valid issue 'xs:ID' will eventually change,
>> right?
> 
> What exactly would the issue be? "Not enough characters are valid in
> IDs"? I suppose someone could raise that, but I doubt that changing
> XML syntax (this would require revving XML) will be very popular.

It probably has to be changed, otherwise it might be rejected be the 
browser. Example[1]:

   <html id="[test]">
    <style>html{background:red}#[test]{background:lime}</style>

Now I see this I'm not even sure if it is backwards compatible enough.


[1]<data:text/html;charset=utf-8,%3Chtml%20id%3D%22%5Btest%5D%22%3E%3Cstyle%3Ehtml%7Bbackground%3Ared%7D%23%5Btest%5D%7Bbackground%3Alime%7D%3C%2Fstyle%3E>


-- 
  Anne van Kesteren
  <http://annevankesteren.nl/>




More information about the whatwg mailing list