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

Re: ACTION-87: Selectors API

From: Ian Hickson <ian@hixie.ch>
Date: Thu, 23 Mar 2006 22:31:22 +0000 (UTC)
To: Anne van Kesteren <annevk@opera.com>
Cc: "Web APIs WG (public)" <public-webapi@w3.org>
Message-ID: <Pine.LNX.4.62.0603232121380.315@dhalsim.dreamhost.com>

On Thu, 23 Mar 2006, Anne van Kesteren wrote:
> New draft:
> http://dev.w3.org/cvsweb/~checkout~/2006/webapi/selectors-api/draft/selectors-api.htm

Looking good.

As you note in your reply, the following paragraph:

: Both match and matchAll take a group of selectors (selectors) as defined 
: in [Selectors] as first argument and an XPathNSResolver (nsresolver) as 
: second. The nsresolver argument can be null when there are no prefixes 
: to be expanded. As described in the [DOM3XPath] specification 
: applications have to construct an object implementing the 
: XPathNSResolver interface themselves. In ECMAScript bindings a special 
: Function can be passed as argument instead. How namespace prefixes 
: within selectors using nsresolver are resolved is defined in 
: [DOM3XPath].

...is basically empty. Given that this is the only section that describes 
how to handle the nsresolver argument, I think this should be addressed.

> > I don't think "In ECMAScript bindings the nsresolver argument in both 
> > match and matchAll must be an optional argument." as a requirement 
> > makes sense. I think it would be better to phrase it as something like 
> > "In ECMAScript, if the nsresolver argument in an invocation of match() 
> > or matchAll() is omitted, UAs must handle the invocation as if the 
> > nsresolver argument was null." or something.
> I tried the "or something" part. Let me know how it turned out :-)

Seems reasonable, although there is a bit of a leap between the concept of 
languages supporting method overloading and the concept of the argument 
being omitted. (Also, note that technically ECMAScript doesn't support 
method overloading.)

> > If you really want to not use the term NodeList, I recommend defining 
> > StaticNodeList as:
> > 
> >    typedef StaticNodeList NodeList;
> > 
> > ...rather than duplicating the interface definition.
> Used your suggestion. Will remove the open issue after you checked it.

Seems fine. It was Maciej's idea originally.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Thursday, 23 March 2006 22:31:38 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:20 UTC