W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2007

[whatwg] Script, style and backwards compatibility

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 20 Jun 2007 01:41:20 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.0706200124010.10175@dhalsim.dreamhost.com>

(Thanks for forwarding forum feedback to the list. Feel free to forward my 
reply back to the forums, and please do continue to forward feedback from 
the forums, or blogs, or anywhere else, to the list!)

On Mon, 30 Apr 2007, Simon Pieters wrote:
> > 
> > From http://forums.whatwg.org/viewtopic.php?t=38
> 
> Make <noscript> allowed in XHTML5

Unfortunately the way <noscript> works makes it impractical in XHTML.

You can have similar effects, however, by just using script to remove the 
section:

   <div class="noscript">...</div>
   <script>
     var n = document.getElementsByClassName('noscript');
     for (var i = 0; n &lt; n.length; n += 1)
       n[i].parentNode.removeChild(n[i]);
   </script>

...or some such. (Untested.)


> and generally remove differences between HTML5 and XHTML5 where 
> possible.

Indeed, removing unnecessary differences is a goal (though it is not the 
most important goal, and so can be trumped; for example backwards 
compatibility would override it, as it does with <noscript>).


> This could thus also imply:
> 
> * Don't disallow lang="" in XHTML5

Having both xml:lang="" and lang="" would actually cause more 
round-tripping problems (if they were both allowed), since xml:lang can't 
be used in HTML. We can't drop xml:lang, though, since XML defines it.


> * Don't disallow <base href> in XHTML5.

This is mostly disallowed because generic XML processing wouldn't know 
about it, and so URIs in unrelated languages like SVG would change meaning 
based on whether the UA knew XHTML or not.


> * Don't disallow <meta charset> in XHTML5 (it doesn't do any good, but 
> doesn't harm either).

We could allow it if we required that there be an XML declaration that had 
the same encoding specified, but then that wouldn't be the same as HTML5, 
so we wouldn't have won anything.


On Mon, 30 Apr 2007, Simon Pieters wrote:
> Anne wrote:
> > 
> > xml:lang should be treated the same as xml:id imo (except that for now 
> > I suppose they have different handling if both the xml: and normal 
> > attribute specified).
> 
> Agreed.

We can't treat xml:lang like xml:id. An element can have multiple IDs, it 
can't have multiple languages.


In conclusion, while I agree with the principle of keeping XHTML and HTML 
as close to each other as possible, I don't think they're further apart 
than is actually necessary.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 19 June 2007 18:41:20 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:56 UTC