W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2009

RE: XMLHttpRequest Comments from W3C Forms WG

From: Klotz, Leigh <Leigh.Klotz@xerox.com>
Date: Thu, 17 Dec 2009 10:31:50 -0800
Message-ID: <E254B0A7E0268949ABFE5EA97B7D0CF409717157@USA7061MS01.na.xerox.net>
To: "Jonas Sicking" <jonas@sicking.cc>
Cc: "Henri Sivonen" <hsivonen@iki.fi>, "Anne van Kesteren" <annevk@opera.com>, "WebApps WG" <public-webapps@w3.org>, "Forms WG" <public-forms@w3.org>
Jonas,

I apologize if you and other group members consider this to be a pedantic exercise, but it's a necessary part of making the specification reusable.
 
>  -----Original Message-----
>  From: Jonas Sicking [mailto:jonas@sicking.cc] 
>  Sent: Thursday, December 17, 2009 9:45 AM
>  To: Klotz, Leigh
>  Cc: Henri Sivonen; Anne van Kesteren; WebApps WG; Forms WG
>  Subject: Re: XMLHttpRequest Comments from W3C Forms WG
>  
>   ...
>  
>  I don't think I understand your suggested changes. As long as the concepts that XHR uses are only defined in the 
> HTML5 spec, XHR will always require that those things from the HTML5 spec are implemented when implementing XHR. 
> This doesn't seem to change even if the XHR spec is split into two.

XHR requires things; the things might come from HTML5, though any sufficient definition of them could come from somewhere else.
It's up to the implementor of the XHR spec to say where the things come from.
HTML5 implementors would obviously choose to provide the HTML5 definitions.
This could be done by splitting the XHR document in two, with one part called XHR saying "I need things" 
and another part called XHR for HTML5 saying "I have perfectly fine things here from HTML5 XHR to use."  
HTML5 implements would then be implementing XHR for HTML5, which is mete and just.

>  However I don't really understand what specifically you are suggesting should live in the two XHR specs, 
> so I could very well be misunderstanding you. Could you describe that in more detail?

It's in the previous trail on this topic, and Ian and Anne have also variously listed the items.

Please take the example of one dependency, that of origin and base from Anne's message of October 8, 2009.
Anne explains the strategy below: "If you reuse it you have to define the XMLHttpRequest origin and XMLHttpRequest base URL."

>   
>   From: Anne van Kesteren <annevk <at> opera.com>
>   Subject: Re: [XHR] LC comments from the XForms Working Group
>   Date: 2009-10-08 15:31:27 GMT 
>   
>   On Tue, 17 Jun 2008 05:24:48 +0200, Boris Zbarsky <bzbarsky <at> mit.edu> wrote:
>   > Anne van Kesteren wrote:
>   >> It would change the conformance criteria. I'm not sure that's a good  
>   >> idea. Especially since the use case put forward is mostly theoretical.
>   >>  Overall, I'm still not convinced this is a good idea.
>   >
>   > It doesn't seem necessarily that theoretical to me, for what it's  
>   > worth.  Anne, do you happen to have a more or less complete list of the  
>   > current dependencies of XHR on Window, buy chance?  I think that  
>   > information would be very helpful in seeing where things stand.
>   
>   To wrap this up, I changed XMLHttpRequest some time ago so it can be used  
>   in other contexts as well now. If you reuse it you have to define the  
>   XMLHttpRequest origin and XMLHttpRequest base URL.
>   
>   My apologies for being a bit stubborn on this earlier. It was mostly  
>   because I was hesitant reworking how everything was put together, but it  
>   turned out that had to happen anyway.
>   
>   Hopefully it can now be of use to the Forms WG.
>   
>   Kind regards,
>   
>   -- 
>   Anne van Kesteren
>   http://annevankesteren.nl/
>   

So, to be clear, here's how do complete the change for the specific dependency that Anne calls about above.
(This process is repeated for each dependency of XHR on HTML5.)

Cf. section http://www.w3.org/TR/2009/WD-XMLHttpRequest-20091119/#origin-and-base-url

   Each XMLHttpRequest object has an associated XMLHttpRequest origin and an XMLHttpRequest base URL.

   This specification defines their values when the global object is represented by the Window object. 
   When the XMLHttpRequest object used in other contexts their values will have to be defined as 
   appropriate for that context. That is considered to be out of scope for this specification.

This text still results in a normative reference to HTML5.  So change the XHR document to this:

   Each XMLHttpRequest object has an associated XMLHttpRequest origin and an XMLHttpRequest base URL.

   This specification does not defines their values; they MUST be defined by the host integration.
   For an example integration with [HTML5 informative reference] see [XHR For HTML5 informative reference]

Further, the actual definitions would be removed when the actually occur.

Then the new rec-track document XHR for HTML5 would say this:

   Each XMLHttpRequest object has an associated XMLHttpRequest origin and an XMLHttpRequest base URL.

   This specification defines their values when the global object is represented by the Window object. 
  
And then go on to cite contain the actual text of the definitions pulled out from XHR.

Leigh.
Received on Thursday, 17 December 2009 18:34:56 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:35 GMT