- From: Julian Reschke <julian.reschke@gmx.de>
- Date: Tue, 06 Oct 2009 12:33:12 +0200
- To: Maciej Stachowiak <mjs@apple.com>
- CC: Jonas Sicking <jonas@sicking.cc>, Sam Ruby <rubys@intertwingly.net>, Henri Sivonen <hsivonen@iki.fi>, Adrian Bateman <adrianba@microsoft.com>, HTML WG <public-html@w3.org>, Tony Ross <tross@microsoft.com>, Brendan Eich <brendan@mozilla.org>
Maciej Stachowiak wrote:
> ...
>>>> Using nodeName + prefix mappings obtained separately instead of
>>>> namespaceURI/localName is a workaround for environments where DOM L2
>>>> either isn't there (IE), or doesn't work as desired (HTML5 for now).
>>> Prefix mapping obtained separately how? There's no obtaining of a
>>> prefix mapping involved when you look at nodeName in order to treat
>>> {null}xmlns:foo as {http://www.w3.org/2000/xmlns/}foo.
>>
>> We had this discussion before :-)
>>
>> It doesn't make a difference for the results of parsing an XHTML or
>> HTML document.
>
> It does make a difference. XHTML documents will produce one attribute,
> and HTML documents the other (as currently specified).
That's why you have to use L1, or consider both case using L2, as far as
I can tell.
> ...
>> It appears to me that whenever people complain over here about the
>> complexity of XML namespaces, they really *mean* the complexity of how
>> to deal with them in the DOM, in particular as long as you can't rely
>> on consistent DOM Level 2 support. I agree that this is a pain, but
>> that's a problem of that particular API, not XML namespaces in general.
>
> Can you name an API that makes them less painful to work with?
I assume XOM is better, but haven't looked at it closely. In past
projects I wrapped Java DOM with my own convenience code, dealing with
DOM's problems.
XSLT (not really an API though) makes things easy as well.
> ...
> None of those implementations attempt to use DOM Level 2 even when it is
> present. If they did, they would fail all the text/html test cases. The
> text/html test cases are written such that you fail if you use a
> namespace-aware API instead of a namespace-unaware one.
> ...
But the reason for this is the incompatibility between HTML and XHTML in
HTML5; something this very discussion is about.
BR, Julian
Received on Tuesday, 6 October 2009 10:33:51 UTC