W3C home > Mailing lists > Public > public-html@w3.org > October 2009

Re: ISSUE-41/ACTION-97 decentralized-extensibility

From: Maciej Stachowiak <mjs@apple.com>
Date: Tue, 06 Oct 2009 03:21:50 -0700
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>
Message-id: <94CF5CEE-2401-4508-9FD5-9EB89482CC54@apple.com>
To: Julian Reschke <julian.reschke@gmx.de>

On Oct 6, 2009, at 2:59 AM, Julian Reschke wrote:

> Maciej Stachowiak wrote:
>> ...
>>>> I got the impression that at least some RDFa advocates thought it  
>>>> was acceptable and desirable to base semantics on nodeName (or  
>>>> indeed how an attribute was spelled in the source text) instead  
>>>> of on the {namespaceURI, localName} ordered pair. And indeed,  
>>>> that is how a number of RDFa implementations seem to work in  
>>>> practice. I'm not sure how much of the seeming confusion in the  
>>>> discussion was genuine and how much was the result of trying to  
>>>> justify a hacky solution.
>>>
>>> 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).

> It's only relevant if script code on a single page combines both L1  
> and L2 function calls. Don't do it. It hurts.

That indeed causes even worse problems.

> 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?

>
>>> It has nothing to do with not understanding how namespaces work.  
>>> Otherwise those implementations wouldn't pass tests, right?
>> The RDFa text/html tests are written to expect checks of nodeName  
>> rather than namespaceURI/localName. The implementations do  checks  
>> of nodeName rather than namespaceURI/localName. That is why the  
>> tests pass. A test case that used script to insert {null}xmlns:foo  
>> into an XML document would give results that show the mapping in  
>> effect, in JS-based implementations (I haven't tested, but I'm  
>> pretty sure, given how they are coded). A test that resulted in  
>> {null}xmlns:foo and {http://www.w3.org/2000/xmlns/}foo attributes  
>> on the same element would give unpredictable results.
>> I think this shows either a failure to understand namespaces on the  
>> part of the test writers and implementors, or a deliberate decision  
>> to go against the Namespaces in XML model.
>
> No, it's a deliberate decision to do a best-effort in absence of DOM  
> Level 2 support.

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.

Regards,
Maciej
Received on Tuesday, 6 October 2009 10:22:27 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:50 GMT