- From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
- Date: Mon, 18 Jun 2012 11:06:10 +0200
- 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.
http://dev.w3.org/2006/webapi/selectors-api/#resolving-namespaces
http://dev.w3.org/2006/webapi/selectors-api2/#resolving-namespaces
--
Lachlan Hunt - Opera Software
http://lachy.id.au/
http://www.opera.com/
Received on Monday, 18 June 2012 09:06:41 UTC