NSResolver Re: Selectors API naming

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 UTC