W3C home > Mailing lists > Public > www-tag@w3.org > May 2008

Re: Implementing aria: -- examples and methodology

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Thu, 29 May 2008 20:58:22 +0200
To: ht@inf.ed.ac.uk (Henry S. Thompson)
Cc: <www-tag@w3.org>
Message-ID: <7tot34dju2p1ohu0vnjjnpifaed0li3hrn@hive.bjoern.hoehrmann.de>

* Henry S. Thompson wrote:
>> As it is defined, a node created using .setAttribute('x:y', 'example')
>> has neither namespace name nor local name. What is the XPath syntax to
>> select an attribute that has neither namespace name nor local name?
>The DOM specifications are, unfortunately, underspecified in this
>area, and not surprisingly the consequence is that different browsers
>do different things. . .

The setAttribute call above creates a node that cannot exist in the
XML Information Set or the XPath data model because it is incorrect
with respect to the Namespaces in XML Recommendations. I'm unsure how
clarifications in the DOM specifications can help answer my question.

If you believe there is something underspecified there, you should
explicitly call that out so the specifications can be updated, or so
we can realize that we are simply reading the DOM specifications very

Again, please do realize and mention alongside your proposal that what
you advocate results in the creation of documents that are incorrect
with respect to namespaces and authors will thus run into trouble doing
anything that relies on namespace correctness -- your selector hack is
just one of many authors would need.

>I'm not sure what you mean here.  We can't change DOM Level 1, or IE
>6, for example.  So either you publish pages which simply don't work
>with IE 6, or you work around the differences.

A new version of DOM Core can easily specify additional or modified re-
quirements for Node.setAttribute implementations, for example. All new
versions and revisions of DOM Core made some such changes. To give a
naïve example, it could introduce a Document.xmlns attribute that, if

  document.xmlns = {
    'aria': ...,
    'svg': ...,

set properly will be used to resolve prefixes in .createElement, .set-
Attribute, .selectNodes, ..., making them behave like the NS versions.
Your proposal would then work equally well while avoiding the namespace
problems in a manner that is compatible with downlevel clients. I am not
suggesting anything like this, I was just saying you have the namespace
problems if you don't also propose changes like this one.
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Thursday, 29 May 2008 18:59:10 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:56:22 UTC