W3C home > Mailing lists > Public > public-webapi@w3.org > December 2006

NSResolver Re: Selectors API naming

From: Charles McCathieNevile <chaals@opera.com>
Date: Tue, 19 Dec 2006 21:58:44 +0100
To: "Dave Massy" <Dave.Massy@microsoft.com>, "Web API public" <public-webapi@w3.org>
Cc: "Chris Wilson" <chris.wilson@microsoft.com>, "Anne van Kesteren" <annevk@opera.com>, "Tina Duff" <tinad@microsoft.com>
Message-ID: <op.tktq7603wxe0ny@widsith.local>

On Tue, 19 Dec 2006 21:35:17 +0100, Dave Massy <Dave.Massy@microsoft.com>  
wrote:

> It'd be great to have more detail and scenario on NSResolver. It appears  
> to allow elements within the document to have different prefixes than  
> things in the style sheet. For example if we map html as the prefix for  
> XHTML in our document then we’d write it like:
> 	<html:table><html:tr><html:td></html:td></html:tr></html:table>
> But then we can write a selector such as:
> 	“h|table > h|tr > h|td”
> With a NSResolver that maps h to the same namespace as the html in the  
> primary document. This seems potentially confusing.

Hmm. This seems blindingly obvious to me, as something that if anyone ever  
forces me to hand-code I automatically do. This is how namespaces work in  
general. Admittedly, if you are sharing code snippets amongst people who  
have no shared understanding and are not really aware of what namespace  
prefixes provide (a shorthand for a simple URI-based disambiguation  
scheme), then using this feature can be confusing. I don't see that as a  
reason to disallow the use case of simplifying my half of some code, since  
there is no obvious technical problem here.

cheers

Chaals

-- 
   Charles McCathieNevile, Opera Software: Standards Group
   hablo español  -  je parle français  -  jeg lærer norsk
chaals@opera.com          Try Opera 9 now! http://opera.com
Received on Tuesday, 19 December 2006 20:59:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:18:56 GMT