W3C home > Mailing lists > Public > www-forms@w3.org > December 2008

Re: xf:submission/@serialization="none" and GET request URLs

From: Aaron Reed <aaronr@us.ibm.com>
Date: Fri, 12 Dec 2008 10:51:35 -0600
To: www-forms@w3.org
Message-ID: <ghu51i$v2d$1@ger.gmane.org>

The idea behind testing to see if the separator was present, if I had to 
guess, was to handle the case where the @action already contained a '?'. 
  For example action="http://my.server.com/servlet?method=foo".  Then we 
would append a separator instead of a '?' and the instance data could 
still be added.

--Aaron

John Boyer wrote:
> 
> Hi Philip,
> 
> Although it is not written correctly in 11.9.1, I would also have 
> thought it reasonably obvious that putting the question mark was part of 
> the "get" serialization of tag value pairs such that if you asked for no 
> serialization you would get neither the tag value pairs nor the thing 
> which separates them from the rest of the URL.  
> 
> I am also pretty sure the discussion of serialization="none" 
> specifically included the statement that in this case the URL would be 
> unaltered, so I think it is a spec error in 11.9.1.
> 
> Indeed, if one looks at the second example, it is clear that a spurious 
> question mark showing up at the end of the URL in the file: case would 
> be problematic.
> 
> I also find the text for attaching the question mark to be a bit bizarre 
> because it says that if the URL already contains a question mark then 
> the separator symbol will be appended.  Do you (or does anyone else) 
> happen to know what the possible purpose of that would be?  Since it is 
> a separator for the tag-value pairs, why put one first? And it surely 
> seems hacky to do it only if the URL already ends in question mark, right?
> 
> So, we'll put these issues onto next week's telecon agenda.
> 
> Thanks,
> John M. Boyer, Ph.D.
> STSM, Interactive Documents and Web 2.0 Applications
> Chair, W3C Forms Working Group
> Workplace, Portal and Collaboration Software
> IBM Victoria Software Lab
> E-Mail: boyerj@ca.ibm.com  
> 
> Blog: http://www.ibm.com/developerworks/blogs/page/JohnBoyer
> Blog RSS feed: 
> http://www.ibm.com/developerworks/blogs/rss/JohnBoyer?flavor=rssdw
> 
> 
> 
> 
> From: 	"Philip Fennell" <Philip.Fennell@bbc.co.uk>
> To: 	<www-forms@w3.org>
> Date: 	12/10/2008 06:36 AM
> Subject: 	xf:submission/@serialization="none" and GET request URLs
> 
> 
> ------------------------------------------------------------------------
> 
> 
> 
> 
> Hello,
> 
> I recently encountered a problem with an AtomPub server; when it was
> sent a request of the form:
> 
> <http://localhost:8080/?>
> 
> the response should have been the AtomPub Service document. Instead it
> returned an HTTP 400 status code because it didn't like the trailing ?
> (question mark) character.
> 
> The ? got there because the Mozilla XForms plug-in put it on the end of
> the GET request that was generated by an xf:submission:
> 
> 
> <xf:submission id="retrieveService" mediatype="application/xml"
>    encoding="UTF-8" method="get"
>    replace="instance" instance="service">
>  <xf:resource value="'http://localhost:8080/'"/>
>  <xf:header>
>    <xf:name>Accept</xf:name>
>    <xf:value>application/atomsvc+xml</xf:value>
>  </xf:header>
> </xf:submission>
> 
> <xf:instance id="service"/>
> 
> 
> as per section 11.9.1 of the XForms 1.1 recommendation.
> 
> However, with nothing to serialize I was wondering whether the trailing
> '?' was actually necessary.
> 
> I then had a look at the serialization attribute of xf:submission and it
> occurred to me that an additional condition could be added to the URI
> construction rules which stated that if serialization="none" then the ?
> (question mark) was not to be appended to the URL as there was nothing
> to serialize. This would clarify the construction of request URLs and
> hopefully prevent the problem I described.
> 
> 
> 
> Regards
> 
> Philip Fennell
>  >XML Developer (The Forge)
>  >
>  >BBC Future Media & Technology
>  >Media Village, 201 Wood Lane London W12 7TP
>  >BC4 C4, Broadcast Centre
>  >
>  >T:                 0208 0085318
>  >
> 
> http://www.bbc.co.uk/
> This e-mail (and any attachments) is confidential and may contain 
> personal views which are not the views of the BBC unless specifically 
> stated.
> If you have received it in error, please delete it from your system.
> Do not use, copy or disclose the information in any way nor act in 
> reliance on it and notify the sender immediately.
> Please note that the BBC monitors e-mails sent or received.
> Further communication will signify your consent to this.
>                                                                         
>            
> 
> 
> 
Received on Friday, 12 December 2008 16:58:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:15 GMT