W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2012

Re: [selectors-api] NAMESPACE_ERR or SYNTAX_ERR when both applied

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Mon, 18 Jun 2012 11:06:10 +0200
Message-ID: <4FDEEF82.6060800@lachy.id.au>
To: Boris Zbarsky <bzbarsky@MIT.EDU>
CC: "public-webapps@w3.org" <public-webapps@w3.org>
On 2012-06-18 04:29, Boris Zbarsky wrote:
> Consider how this is parsed in a depth-first recursive descent parser:
>    a|b +,
> 1)  The identifier "a" is scanned.  This might be a tag name or a
>      namespace; look at the next token.
> 2)  The symbol '|' is scanned.  Great. "a" was a namespace.  Resolve it.
> And you're done.  You have an error and bail out.  You never even got to
> the '+'.

This is a good reason not to strictly define one having precedence over 
the other. That leaves 2 options: Leaving it explicitly undefined (only 
mildly better than the current situation) or using only syntax error.

Since it seems there are no objections to the latter option, and a few 
people in favour of that, I've tentatively updated both drafts to 
reflect this.

It now states:

   "If the group of selectors include namespace prefixes that need to be
    resolved, the implementation must raise a SYNTAX_ERR exception"

I also removed the note about non-namespace supporting implementations 
throwing a syntax error instead of a namespace error.


Lachlan Hunt - Opera Software
Received on Monday, 18 June 2012 09:06:41 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:41 UTC