Re: some technical thoughts about incremental improvements to forms

Dave Raggett wrote:
>> IE's DOM is often significantly broken.  Well-formedness errors are 
>> not fatal for pseudo-XML, they're treated similarly to the way such 
>> errors are treated in HTML.
>>
>> With badly nested elements, it produces a DOM where a node doesn't 
>> even appear in its parent's childNodes list.
> 
> When people generate malformed markup they are putting themselves at the 
> mercy of the browser's error handling behavior (Caveat scriptor)

That is a major interoperability concern of browsers these days, since 
incompatible DOMs can result a page that is built for, tested, and 
relying on bugs in one particular browser to be completely broken in 
another.

IMHO, while it is meant to be the author's problem, authors that fail to 
fix these problems make it the users' problem (when the site doesn't 
work in their browser), which in turn makes it the browser vendors' problem.

>>>        <h:bind id="b1" name="fred"/>
>>
>> It doesn't have to have been bound to a namespace for IE to treat it 
>> as pseudo-XML
> 
> My tests showed that the prefix has to be bound to a namespace URI
> for IE to allow CSS selectors to take effect on that element.

See the IE's DOM view in this test case.
http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E%0D%0A%3Cbody%3E%0D%0A%3Cp%3E%3Cfoo%3Aa/%3Etest%0D%0A%3Cp%3E%3Cfoo%3Ab%3Etest%3C/foo%3Ab%3E

> I don't see why browsers should ignore the /> syntax as that only 
> makes it harder to deploy mixed markup documents.

Because that's XML syntax and HTML is not designed to contain embedded 
XML.  This is true whether you consider HTML to be an application of 
SGML (where <x/> has a completely different meaning) or the tag soup it 
really is today.

It's already confusing enough for authors as to why they can use <br />, 
but can't use <p /> and have it work as expected in text/html.  Copying 
IEs approach of only recognising it for elements with namespace prefixes 
is unacceptable because HTML has no concept of namespaces and many 
people (particularly Hixie) consider namespaces too complicated to use. 
  Finally, using the <xml> element approach is not so good because it 
appears to insert a new Document node in place of the <xml> element, and 
that just seems wrong to me.

Besides that, there is no point introducing XML syntax into HTML.  As I 
said before, transitioning to XML through HTML is not the right 
approach.  If such a transition is to occur, it absolutely, positively, 
*must* (without a doubt) do so as *real XML* when browsers sufficiently 
support the languages!

-- 
Lachlan Hunt
http://lachy.id.au/

Received on Tuesday, 5 September 2006 17:06:27 UTC