[whatwg] Script, style and backwards compatibility

Ian Hickson ian at hixie.ch
Tue Jun 19 18:41:20 PDT 2007

(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 

   <div class="noscript">...</div>
     var n = document.getElementsByClassName('noscript');
     for (var i = 0; n < n.length; n += 1)

...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.   `._.-(,_..'--(,_..'`-.;.'

More information about the whatwg mailing list