- From: Jonas Sicking <jonas@sicking.cc>
- Date: Tue, 20 Oct 2009 00:27:42 -0700
- To: Tony Ross <tross@microsoft.com>
- Cc: Adrian Bateman <adrianba@microsoft.com>, "public-html@w3.org" <public-html@w3.org>
On Mon, Oct 19, 2009 at 11:14 PM, Tony Ross <tross@microsoft.com> wrote: > On Saturday, October 17, 2009 at 11:34 PM, Jonas Sicking wrote: >> On Sat, Oct 17, 2009 at 4:54 PM, Tony Ross <tross@microsoft.com> wrote: >> > I agree that XML Namespaces is more complex than simply using tag names >> > for identity, but I'm curious as to what specifically makes you think it is too >> > complex for the web. >> >> I've mentioned them before in this thread. But in short: >> >> The identifying name is a tuple rather than a string (arguably this could be >> fixed by changing DOM/CSS, but so far such proposals have not been made). > > I see this as an issue broader than HTML 5. Perhaps such a proposal would be a good idea for the next versions of the DOM/CSS standards. Should HTML markup support namespaces, it would certainly be able to benefit retroactively from such new APIs. Well, I agree that namespaces being messy in the DOM is a bigger problem than HTML. However HTML has so far skirted the issue by not using namespaces. I'm reluctant to add a feature that hinges on that we'll improve API elsewhere later, as that might never happen. I'm extra reluctant in this case since I don't really see how to solve it. >> The identifying name is different from what's being written in the markup. >> I.e. the user writes "foo:bar" in the markup, but the identifying name is { >> "somenamespaceURI", "bar" } > > Given the same user must have put xmlns:foo="somenamespaceURI" earlier in the markup, I don't find this to be such a stretch. Web developers seem to get along fine with indirection via variables in JavaScript. That is not my experience. My experience is that people simply copy the xmlns:foo attribute to the root element not really understanding what it means. >> Copy-paste of markup becomes more fragile >> since it's easy to loose the prefix-mapping in the process. > > Very true. I suspect copy-paste will fail more often for some developers, but I also suspect they will quickly notice that it didn't work as expected. A quick trip back to the original source should help rectify the problem. Even with complete ignorance of namespaces, trial and error will eventually cause them to bring in the prefix declaration. At this point they're likely to realize that the prefix declaration itself was important. Actually, I think it's quite probable that authors won't notice if they fail to author extension elements properly. Opening the page in a browser won't give any indication that namespace declarations are wrong since these elements are likely ones that the browser won't recognize and do anything with. I.e. these elements are essentially the type of hidden-metadata information that we've seen authors get wrong very often. / Jonas
Received on Tuesday, 20 October 2009 07:28:35 UTC