IE can render xhtml perfectly
No, it can't. It asks users if they want to download XHTML documents. That
can hardly be described as rendering at all.
otherwise we wouldn't be having the welcome surge of web standards
compliance
We are experiencing a surge of authors jumping on the XHTML bandwagon with
no apparent idea that true XHTML is not viable at this time, mainly due to
the lack of support from Microsoft.
There is just as much non-semantic, bloated rubbish being pumped out now as
there always has been. The only difference is that now it might be written
in XHTML, and might pass automated validation. That doesn't necessarily
make it either standards-compliant, or truly valid.
and besides xhtml is just clean html anyway.
Nonsense. My HTML markup is just as 'clean' as anyone else's XHTML. More so
in some cases. HTML authors don't /have/ to quote all attributes, or use
optional opening and closing tags, but there's no reason why they can't.
Yes, XML enforces these things, but so can just a touch of personal
discipline (or a custom DTD, if that is too much to ask).
Maybe I misunderstand your point can you elaborate?
The vast majority of XHTML documents - the result of your 'surge' - are
transmitted incorrectly as HTML. Either the Content-Type header, or a META
element, will indicate text/html instead of application/xhtml+xml. User
agents dutifully respect what they're told and parse the markup as really
badly written HTML, not XHTML. This is why IE is seen to parse it, when in
reality, it doesn't at all; it just performs a lot of error correction.
A Google search will tell you all of this. Searching for application/xhtm
+xml will also probably raise some useful discussions.
If I put the same xhtml into the page manually it renders perfectly,
when I put it through innerHTML IE deliberately alters the markup prior
to rendering.
I would expect all user agents to perform some form of normalisation on
markup before attempting to run it through a parser. It might do things
like collapse white space, add or strip quotes, etc. Anything to make life
easier for the parser.
Surely IE uses the same engine to display the original
xhtml I send from the server as it does to render innerHTML?
IE doesn't understand XHTML so when it performs the preprocessing above, it
does things contrary to XML syntax rules.
Sounds like innerHTML is useless to me
Didn't Martin say that?
and many web developers who need to use xhtml.
I doubt that many Web developers /need/ to use XHTML at all.
Mike