This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 16312 - use of undocumented 'switch' convention for rule formulation is ambiguous
Summary: use of undocumented 'switch' convention for rule formulation is ambiguous
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: XHR (show other bugs)
Version: unspecified
Hardware: All Windows 3.1
: P2 normal
Target Milestone: ---
Assignee: Anne
QA Contact: public-webapps-bugzilla
URL: http://dvcs.w3.org/hg/xhr/raw-file/8d...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-11 05:18 UTC by Glenn Adams
Modified: 2013-11-11 02:01 UTC (History)
5 users (show)

See Also:


Attachments

Description Glenn Adams 2012-03-11 05:18:26 UTC
some, but not all of the rule formulations in XHR are based on an undocumented 'switch' convention, that, without further explanation, allows ambiguous interpretation:

for example, in 4.7.7 appears the following:

↪ Once the whole response entity body has been received
↪ If there is no response entity body and the state is LOADING
↪ If there is no response entity body and the synchronous flag is set

        Switch to the DONE state.

if I rephrase this as:

↪ If A
↪ If B
↪ If C

        Then X

then which of the following is meant by the above convention?

#1

If A && B && C then X then break from switch

#2

If A && B && C then X then fall through to next rule

#3

If A || B || C then X then break from switch

#4

If A || B || C then X then fall through to next rule

any of these are possible interpretations given the lack of an explanation of this convention

[i note that this convention also appears in HTML5 drafts and is also not documented there either]
Comment 1 Anne 2012-03-26 17:27:12 UTC
Maybe get it changed first in HTML?
Comment 2 Glenn Adams 2012-03-26 22:23:13 UTC
(In reply to comment #1)
> Maybe get it changed first in HTML?

that would work for me (i.e., define in HTML then put a reference in XHR to that definition);

btw, which of #1 through #4 is the intended interpretation? i still do now know how it is intended to be interpreted...
Comment 3 Anne 2012-03-27 07:37:02 UTC
It's #3, which is consistent with how <dl> is defined, but that is probably not quite enough.
Comment 4 Anne 2012-03-27 07:37:26 UTC
Ian, any ideas?
Comment 5 Hallvord R. M. Steen 2013-11-07 14:31:44 UTC
I think this is now a pretty common convention and sufficiently clear that it needs no further explanation. If it needs explanation, that explanation doesn't belong in XHR as it's a convention shared by lots of specs.
Comment 6 Anne 2013-11-07 14:39:18 UTC
So I don't like you closing these bugs. Should we get a separate WHATWG XMLHttpRequest component? There's an outstanding question in comment 4 and there's indeed room for confusion, even though we use the pattern a lot.
Comment 7 Hallvord R. M. Steen 2013-11-07 20:51:51 UTC
No problem - I won't resolve more bugs (unless by prior agreement with you). I think the basic point still stands - why should this convention be defined in the XHR spec when used by lots of others too? - so perhaps we should move this bug to another component or something. (Do we have a "meta-spec" about spec markup?)
Comment 8 Glenn Adams 2013-11-07 21:41:50 UTC
(In reply to Hallvord R. M. Steen from comment #7)
> No problem - I won't resolve more bugs (unless by prior agreement with you).
> I think the basic point still stands - why should this convention be defined
> in the XHR spec when used by lots of others too? - so perhaps we should move
> this bug to another component or something. (Do we have a "meta-spec" about
> spec markup?)

I agree that it would be better to document this convention in the HTML spec and refer to that definition from XHR.
Comment 9 Hallvord R. M. Steen 2013-11-08 10:16:40 UTC
Isn't the last part of 
http://www.whatwg.org/specs/web-apps/current-work/multipage/introduction.html#typographic-conventions
sufficiently clear?

Shall we add a new paragraph to section 3 Terminology saying 

"This specification uses the same typographic conventions as [HTML5]."? 

That should be sufficient to close this bug - if Anne agrees this time ;)
Comment 10 Anne 2013-11-09 01:51:00 UTC
Glenn, is that clear enough?
Comment 11 Glenn Adams 2013-11-09 14:47:24 UTC
(In reply to Anne from comment #10)
> Glenn, is that clear enough?

Yes, Thanks.
Comment 12 Arthur Barstow 2013-11-10 04:01:02 UTC
So, there's agreement to s/WebAppsWG/HTMLWG/ and s/XHR/HTML5/?
Comment 13 Glenn Adams 2013-11-10 06:44:05 UTC
(In reply to Art Barstow from comment #12)
> So, there's agreement to s/WebAppsWG/HTMLWG/ and s/XHR/HTML5/?

I will open a new bug against HTML5, rather than relabeling this bug. The action on this bug is to reference HTML5 conventions.