Setting the accept header with mediatype, for a request generated by an xf:send on an xf:submission doesn't work.

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Setting the accept header with mediatype, for a request generated by an xf:send on an xf:submission doesn't work.

Philip Fennell-2
I know this is an old chestnut (for me at any rate) but when will using
the following xf:model in the Mozilla XForms extension:

<xf:model>
  <xf:action ev:event="xforms-ready">
    <xf:send submission="loadEquivalences"/>
  </xf:action>
                       
  <xf:submission action="../equivalences" encoding="utf-8"
id="loadEquivalences"
      mediatype="application/sparql-results+xml" method="get"
      replace="instance"/>
                       
  <xf:instance id="equivalencesData">
    <data xmlns=""/>
  </xf:instance>
</xf:model>

result in an HTTP accept header of 'application/sparql-results+xml'

instead of
'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/pla
in;q=0.8,image/png,*/*;q=0.5,application/rdf+xml;q=0.93,text/rdf+n3;q=0.
5'

Unless there is some other cunning way of setting the accept header for
an HTTP request I will not be able to use the Mozilla XForms plug-in to
talk to RESTful web services where server-side content negotiation is
used to return an appropriate response.



Regards

Philip Fennell

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.
                                       
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Reply | Threaded
Open this post in threaded view
|

Re: Setting the accept header with mediatype, for a request generated by an xf:send on an xf:submission doesn't work.

Aaron Reed

Hi Philip,

Sounds like something that you should bring up with the working group.
They are always on the lookout for good 'real world' scenarios that
xforms doesn't handle.  If it has already been implemented elsewhere
there is no reason we couldn't do it, too, if there is someone willing
to contribute the work.

--Aaron

Philip Fennell wrote:

> I know this is an old chestnut (for me at any rate) but when will using
> the following xf:model in the Mozilla XForms extension:
>
> <xf:model>
>   <xf:action ev:event="xforms-ready">
>     <xf:send submission="loadEquivalences"/>
>   </xf:action>
>
>   <xf:submission action="../equivalences" encoding="utf-8"
> id="loadEquivalences"
>       mediatype="application/sparql-results+xml" method="get"
>       replace="instance"/>
>
>   <xf:instance id="equivalencesData">
>     <data xmlns=""/>
>   </xf:instance>
> </xf:model>
>
> result in an HTTP accept header of 'application/sparql-results+xml'
>
> instead of
> 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/pla
> in;q=0.8,image/png,*/*;q=0.5,application/rdf+xml;q=0.93,text/rdf+n3;q=0.
> 5'
>
> Unless there is some other cunning way of setting the accept header for
> an HTTP request I will not be able to use the Mozilla XForms plug-in to
> talk to RESTful web services where server-side content negotiation is
> used to return an appropriate response.
>
>
>
> Regards
>
> Philip Fennell
>
> 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.
>
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Reply | Threaded
Open this post in threaded view
|

RE: Setting the accept header with mediatype, for a request generatedby an xf:send on an xf:submission doesn't work.

Klotz, Leigh
I think it's an outstanding bug and Mozilla should be asking for
application/xml,text/xml with submit replace='instance' instead of what
it's currently asking for.  

For XForms 1.1, you get control over the submission headers via the
submission/header element.

Although one might argue that the XForms REC should allow
submission/@mediatype on method="get" to specify the requested
representation rather than the serialized mediatype (which makes no
sense on GET), that change wouldn't provide a way to set the accept
header on POST or other HTTP verbs that do support serialization.

So, let's take this to the WG but my guess is that the answer will be
(1) Mozilla XForms XPI should ask for "application/xml,text/xml" for
XForms 1.0, and (2) for XForms 1.1, use submission/header.  The message
will probably will result in some discussion and clarifications in
XForms 1.2.

Leigh.
 

-----Original Message-----
From: dev-tech-xforms-bounces+leigh.klotz=[hidden email]
[mailto:dev-tech-xforms-bounces+leigh.klotz=[hidden email]]
On Behalf Of Aaron Reed
Sent: Thursday, July 10, 2008 10:38 AM
To: [hidden email]
Subject: Re: Setting the accept header with mediatype, for a request
generatedby an xf:send on an xf:submission doesn't work.


Hi Philip,

Sounds like something that you should bring up with the working group.
They are always on the lookout for good 'real world' scenarios that
xforms doesn't handle.  If it has already been implemented elsewhere
there is no reason we couldn't do it, too, if there is someone willing
to contribute the work.

--Aaron

Philip Fennell wrote:

> I know this is an old chestnut (for me at any rate) but when will
> using the following xf:model in the Mozilla XForms extension:
>
> <xf:model>
>   <xf:action ev:event="xforms-ready">
>     <xf:send submission="loadEquivalences"/>
>   </xf:action>
>
>   <xf:submission action="../equivalences" encoding="utf-8"
> id="loadEquivalences"
>       mediatype="application/sparql-results+xml" method="get"
>       replace="instance"/>
>
>   <xf:instance id="equivalencesData">
>     <data xmlns=""/>
>   </xf:instance>
> </xf:model>
>
> result in an HTTP accept header of 'application/sparql-results+xml'
>
> instead of
> 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/p
> la
>
in;q=0.8,image/png,*/*;q=0.5,application/rdf+xml;q=0.93,text/rdf+n3;q=0.

> 5'
>
> Unless there is some other cunning way of setting the accept header
> for an HTTP request I will not be able to use the Mozilla XForms
> plug-in to talk to RESTful web services where server-side content
> negotiation is used to return an appropriate response.
>
>
>
> Regards
>
> Philip Fennell
>
> 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.
>
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Reply | Threaded
Open this post in threaded view
|

RE: Setting the accept header with mediatype, for a request generatedby an xf:send on an xf:submission doesn't work.

Philip Fennell-2
Aaron and Leigh,

>So, let's take this to the WG

This issue was raised on the [hidden email] mailing list in September
2007 <http://lists.w3.org/Archives/Public/www-forms/2007Sep/0006.html>
and, as you can see from the thread, members of the WG have discussed
this very issue already.

> For XForms 1.1, you get control over the submission headers via the
submission/header element.

If I read the spec. right, I can uses this method to set the 'Accept'
header for a request. If so, I believe this is really what I'm after;
unfortunately the header, name and value elements are not currently
supported in the Mozilla XForms plug-in. From recent postings Aaron, it
appears you're rather busy at present, but do you know if those elements
(header, name, value) are going to be implemented anytime soon?

In my current work I can get around the problem because the XHTML
representation of the resource in loading uses RDFa to annotate the
response with the same data as would have been available in the
'application/sparql-results+xml' response.


Regards

Philip Fennell
>XSLT Developer (Content Management Culture)
>
>BBC Future Media & Technology
>Media Village, 201 Wood Lane London W12 7TP
>BC4 C4, Broadcast Centre
>
>T: 0208 0085318
>

-----Original Message-----
From: dev-tech-xforms-bounces+philip.fennell=[hidden email]
[mailto:dev-tech-xforms-bounces+philip.fennell=[hidden email]
rg] On Behalf Of Klotz, Leigh
Sent: 10 July 2008 21:26
To: Aaron Reed; [hidden email]
Subject: RE: Setting the accept header with mediatype,for a request
generatedby an xf:send on an xf:submission doesn't work.

I think it's an outstanding bug and Mozilla should be asking for
application/xml,text/xml with submit replace='instance' instead of what
it's currently asking for.  

For XForms 1.1, you get control over the submission headers via the
submission/header element.

Although one might argue that the XForms REC should allow
submission/@mediatype on method="get" to specify the requested
representation rather than the serialized mediatype (which makes no
sense on GET), that change wouldn't provide a way to set the accept
header on POST or other HTTP verbs that do support serialization.

So, let's take this to the WG but my guess is that the answer will be
(1) Mozilla XForms XPI should ask for "application/xml,text/xml" for
XForms 1.0, and (2) for XForms 1.1, use submission/header.  The message
will probably will result in some discussion and clarifications in
XForms 1.2.

Leigh.
 

-----Original Message-----
From: dev-tech-xforms-bounces+leigh.klotz=[hidden email]
[mailto:dev-tech-xforms-bounces+leigh.klotz=[hidden email]]
On Behalf Of Aaron Reed
Sent: Thursday, July 10, 2008 10:38 AM
To: [hidden email]
Subject: Re: Setting the accept header with mediatype, for a request
generatedby an xf:send on an xf:submission doesn't work.


Hi Philip,

Sounds like something that you should bring up with the working group.
They are always on the lookout for good 'real world' scenarios that
xforms doesn't handle.  If it has already been implemented elsewhere
there is no reason we couldn't do it, too, if there is someone willing
to contribute the work.

--Aaron

Philip Fennell wrote:

> I know this is an old chestnut (for me at any rate) but when will
> using the following xf:model in the Mozilla XForms extension:
>
> <xf:model>
>   <xf:action ev:event="xforms-ready">
>     <xf:send submission="loadEquivalences"/>
>   </xf:action>
>
>   <xf:submission action="../equivalences" encoding="utf-8"
> id="loadEquivalences"
>       mediatype="application/sparql-results+xml" method="get"
>       replace="instance"/>
>
>   <xf:instance id="equivalencesData">
>     <data xmlns=""/>
>   </xf:instance>
> </xf:model>
>
> result in an HTTP accept header of 'application/sparql-results+xml'
>
> instead of
> 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/p
> la
>
in;q=0.8,image/png,*/*;q=0.5,application/rdf+xml;q=0.93,text/rdf+n3;q=0.

> 5'
>
> Unless there is some other cunning way of setting the accept header
> for an HTTP request I will not be able to use the Mozilla XForms
> plug-in to talk to RESTful web services where server-side content
> negotiation is used to return an appropriate response.
>
>
>
> Regards
>
> Philip Fennell
>
> 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.
>
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms

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.
                                       
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Reply | Threaded
Open this post in threaded view
|

RE: Setting the accept header with mediatype, for a request generatedby an xf:send on an xf:submission doesn't work.

Klotz, Leigh
The followups are all in the next month:
http://lists.w3.org/Archives/Public/www-forms/2007Oct/0017.html

It looks like the agreement was there that the header element in XForms
1.1 will work for submission, but not for instance/@src.  So, a message
to the WG might be to see what the plans are in XForms 1.2 for
instance/@src and headers; clearly there's something missing there.

Again, I still think Mozilla XForms XPI is wrong to use the generic
browser Accept header on instance and submission; it should be asking
only for XML types.  (XForms 1.1 can deal with non-XML return, but then
again, it has the ability to set headers as well, v.i.)

In XForms 1.1 submission/header will let you specify something else, but
it's not clear whether Mozilla XForms XPI will get that feature or not
any time soon.

Leigh.

-----Original Message-----
From: dev-tech-xforms-bounces+leigh.klotz=[hidden email]
[mailto:dev-tech-xforms-bounces+leigh.klotz=[hidden email]]
On Behalf Of Philip Fennell
Sent: Friday, July 11, 2008 6:13 AM
To: [hidden email]
Subject: RE: Setting the accept header with mediatype,for a request
generatedby an xf:send on an xf:submission doesn't work.

Aaron and Leigh,

>So, let's take this to the WG

This issue was raised on the [hidden email] mailing list in September
2007 <http://lists.w3.org/Archives/Public/www-forms/2007Sep/0006.html>
and, as you can see from the thread, members of the WG have discussed
this very issue already.

> For XForms 1.1, you get control over the submission headers via the
submission/header element.

If I read the spec. right, I can uses this method to set the 'Accept'
header for a request. If so, I believe this is really what I'm after;
unfortunately the header, name and value elements are not currently
supported in the Mozilla XForms plug-in. From recent postings Aaron, it
appears you're rather busy at present, but do you know if those elements
(header, name, value) are going to be implemented anytime soon?

In my current work I can get around the problem because the XHTML
representation of the resource in loading uses RDFa to annotate the
response with the same data as would have been available in the
'application/sparql-results+xml' response.


Regards

Philip Fennell
>XSLT Developer (Content Management Culture)
>
>BBC Future Media & Technology
>Media Village, 201 Wood Lane London W12 7TP
>BC4 C4, Broadcast Centre
>
>T: 0208 0085318
>

-----Original Message-----
From: dev-tech-xforms-bounces+philip.fennell=[hidden email]
[mailto:dev-tech-xforms-bounces+philip.fennell=[hidden email]
rg] On Behalf Of Klotz, Leigh
Sent: 10 July 2008 21:26
To: Aaron Reed; [hidden email]
Subject: RE: Setting the accept header with mediatype,for a request
generatedby an xf:send on an xf:submission doesn't work.

I think it's an outstanding bug and Mozilla should be asking for
application/xml,text/xml with submit replace='instance' instead of what
it's currently asking for.  

For XForms 1.1, you get control over the submission headers via the
submission/header element.

Although one might argue that the XForms REC should allow
submission/@mediatype on method="get" to specify the requested
representation rather than the serialized mediatype (which makes no
sense on GET), that change wouldn't provide a way to set the accept
header on POST or other HTTP verbs that do support serialization.

So, let's take this to the WG but my guess is that the answer will be
(1) Mozilla XForms XPI should ask for "application/xml,text/xml" for
XForms 1.0, and (2) for XForms 1.1, use submission/header.  The message
will probably will result in some discussion and clarifications in
XForms 1.2.

Leigh.
 

-----Original Message-----
From: dev-tech-xforms-bounces+leigh.klotz=[hidden email]
[mailto:dev-tech-xforms-bounces+leigh.klotz=[hidden email]]
On Behalf Of Aaron Reed
Sent: Thursday, July 10, 2008 10:38 AM
To: [hidden email]
Subject: Re: Setting the accept header with mediatype, for a request
generatedby an xf:send on an xf:submission doesn't work.


Hi Philip,

Sounds like something that you should bring up with the working group.
They are always on the lookout for good 'real world' scenarios that
xforms doesn't handle.  If it has already been implemented elsewhere
there is no reason we couldn't do it, too, if there is someone willing
to contribute the work.

--Aaron

Philip Fennell wrote:

> I know this is an old chestnut (for me at any rate) but when will
> using the following xf:model in the Mozilla XForms extension:
>
> <xf:model>
>   <xf:action ev:event="xforms-ready">
>     <xf:send submission="loadEquivalences"/>
>   </xf:action>
>
>   <xf:submission action="../equivalences" encoding="utf-8"
> id="loadEquivalences"
>       mediatype="application/sparql-results+xml" method="get"
>       replace="instance"/>
>
>   <xf:instance id="equivalencesData">
>     <data xmlns=""/>
>   </xf:instance>
> </xf:model>
>
> result in an HTTP accept header of 'application/sparql-results+xml'
>
> instead of
> 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/p
> la
>
in;q=0.8,image/png,*/*;q=0.5,application/rdf+xml;q=0.93,text/rdf+n3;q=0.

> 5'
>
> Unless there is some other cunning way of setting the accept header
> for an HTTP request I will not be able to use the Mozilla XForms
> plug-in to talk to RESTful web services where server-side content
> negotiation is used to return an appropriate response.
>
>
>
> Regards
>
> Philip Fennell
>
> 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.
>
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms

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.
                                       
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Reply | Threaded
Open this post in threaded view
|

RE: Setting the accept header with mediatype, for a request generatedby an xf:send on an xf:submission doesn't work.

Philip Fennell-2
Leigh

> Again, I still think Mozilla XForms XPI is wrong to use the
> generic browser Accept header on instance and submission;
> it should be asking only for XML types.

I heartily agree with you, and the last time I looked/inquired, both
FormsPlayer and PicoForms took an even more lax approach and sent */* as
their accept header.

When I queried the PicoForms developers they said they'd done this
specifically because some web servers don't do the right thing (or words
to that effect).

It seems to be a common problem.




Regards

Philip Fennell
>XSLT Developer (Content Management Culture)
>
>BBC Future Media & Technology
>Media Village, 201 Wood Lane London W12 7TP
>BC4 C4, Broadcast Centre
>
>T: 0208 0085318
>

-----Original Message-----
From: dev-tech-xforms-bounces+philip.fennell=[hidden email]
[mailto:dev-tech-xforms-bounces+philip.fennell=[hidden email]
rg] On Behalf Of Klotz, Leigh
Sent: 11 July 2008 17:48
To: Philip Fennell; [hidden email]
Subject: RE: Setting the accept header with mediatype,for a request
generatedby an xf:send on an xf:submission doesn't work.

The followups are all in the next month:
http://lists.w3.org/Archives/Public/www-forms/2007Oct/0017.html

It looks like the agreement was there that the header element in XForms
1.1 will work for submission, but not for instance/@src.  So, a message
to the WG might be to see what the plans are in XForms 1.2 for
instance/@src and headers; clearly there's something missing there.

Again, I still think Mozilla XForms XPI is wrong to use the generic
browser Accept header on instance and submission; it should be asking
only for XML types.  (XForms 1.1 can deal with non-XML return, but then
again, it has the ability to set headers as well, v.i.)

In XForms 1.1 submission/header will let you specify something else, but
it's not clear whether Mozilla XForms XPI will get that feature or not
any time soon.

Leigh.

-----Original Message-----
From: dev-tech-xforms-bounces+leigh.klotz=[hidden email]
[mailto:dev-tech-xforms-bounces+leigh.klotz=[hidden email]]
On Behalf Of Philip Fennell
Sent: Friday, July 11, 2008 6:13 AM
To: [hidden email]
Subject: RE: Setting the accept header with mediatype,for a request
generatedby an xf:send on an xf:submission doesn't work.

Aaron and Leigh,

>So, let's take this to the WG

This issue was raised on the [hidden email] mailing list in September
2007 <http://lists.w3.org/Archives/Public/www-forms/2007Sep/0006.html>
and, as you can see from the thread, members of the WG have discussed
this very issue already.

> For XForms 1.1, you get control over the submission headers via the
submission/header element.

If I read the spec. right, I can uses this method to set the 'Accept'
header for a request. If so, I believe this is really what I'm after;
unfortunately the header, name and value elements are not currently
supported in the Mozilla XForms plug-in. From recent postings Aaron, it
appears you're rather busy at present, but do you know if those elements
(header, name, value) are going to be implemented anytime soon?

In my current work I can get around the problem because the XHTML
representation of the resource in loading uses RDFa to annotate the
response with the same data as would have been available in the
'application/sparql-results+xml' response.


Regards

Philip Fennell
>XSLT Developer (Content Management Culture)
>
>BBC Future Media & Technology
>Media Village, 201 Wood Lane London W12 7TP
>BC4 C4, Broadcast Centre
>
>T: 0208 0085318
>

-----Original Message-----
From: dev-tech-xforms-bounces+philip.fennell=[hidden email]
[mailto:dev-tech-xforms-bounces+philip.fennell=[hidden email]
rg] On Behalf Of Klotz, Leigh
Sent: 10 July 2008 21:26
To: Aaron Reed; [hidden email]
Subject: RE: Setting the accept header with mediatype,for a request
generatedby an xf:send on an xf:submission doesn't work.

I think it's an outstanding bug and Mozilla should be asking for
application/xml,text/xml with submit replace='instance' instead of what
it's currently asking for.  

For XForms 1.1, you get control over the submission headers via the
submission/header element.

Although one might argue that the XForms REC should allow
submission/@mediatype on method="get" to specify the requested
representation rather than the serialized mediatype (which makes no
sense on GET), that change wouldn't provide a way to set the accept
header on POST or other HTTP verbs that do support serialization.

So, let's take this to the WG but my guess is that the answer will be
(1) Mozilla XForms XPI should ask for "application/xml,text/xml" for
XForms 1.0, and (2) for XForms 1.1, use submission/header.  The message
will probably will result in some discussion and clarifications in
XForms 1.2.

Leigh.
 

-----Original Message-----
From: dev-tech-xforms-bounces+leigh.klotz=[hidden email]
[mailto:dev-tech-xforms-bounces+leigh.klotz=[hidden email]]
On Behalf Of Aaron Reed
Sent: Thursday, July 10, 2008 10:38 AM
To: [hidden email]
Subject: Re: Setting the accept header with mediatype, for a request
generatedby an xf:send on an xf:submission doesn't work.


Hi Philip,

Sounds like something that you should bring up with the working group.
They are always on the lookout for good 'real world' scenarios that
xforms doesn't handle.  If it has already been implemented elsewhere
there is no reason we couldn't do it, too, if there is someone willing
to contribute the work.

--Aaron

Philip Fennell wrote:

> I know this is an old chestnut (for me at any rate) but when will
> using the following xf:model in the Mozilla XForms extension:
>
> <xf:model>
>   <xf:action ev:event="xforms-ready">
>     <xf:send submission="loadEquivalences"/>
>   </xf:action>
>
>   <xf:submission action="../equivalences" encoding="utf-8"
> id="loadEquivalences"
>       mediatype="application/sparql-results+xml" method="get"
>       replace="instance"/>
>
>   <xf:instance id="equivalencesData">
>     <data xmlns=""/>
>   </xf:instance>
> </xf:model>
>
> result in an HTTP accept header of 'application/sparql-results+xml'
>
> instead of
> 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/p
> la
>
in;q=0.8,image/png,*/*;q=0.5,application/rdf+xml;q=0.93,text/rdf+n3;q=0.

> 5'
>
> Unless there is some other cunning way of setting the accept header
> for an HTTP request I will not be able to use the Mozilla XForms
> plug-in to talk to RESTful web services where server-side content
> negotiation is used to return an appropriate response.
>
>
>
> Regards
>
> Philip Fennell
>
> 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.
>
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms

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.
                                       
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms

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.
                                       
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Reply | Threaded
Open this post in threaded view
|

RE: Setting the accept header with mediatype, for a request generatedby an xf:send on an xf:submission doesn't work.

Klotz, Leigh
Looks like XForms 1.1 submission/header is the thing, though that
doesn't help you now.
Leigh.

-----Original Message-----
From: Philip Fennell [mailto:[hidden email]]
Sent: Monday, July 14, 2008 7:53 AM
To: Klotz, Leigh; [hidden email]
Subject: RE: Setting the accept header with mediatype,for a request
generatedby an xf:send on an xf:submission doesn't work.

Leigh

> Again, I still think Mozilla XForms XPI is wrong to use the generic
> browser Accept header on instance and submission; it should be asking
> only for XML types.

I heartily agree with you, and the last time I looked/inquired, both
FormsPlayer and PicoForms took an even more lax approach and sent */* as
their accept header.

When I queried the PicoForms developers they said they'd done this
specifically because some web servers don't do the right thing (or words
to that effect).

It seems to be a common problem.




Regards

Philip Fennell
>XSLT Developer (Content Management Culture)
>
>BBC Future Media & Technology
>Media Village, 201 Wood Lane London W12 7TP
>BC4 C4, Broadcast Centre
>
>T: 0208 0085318
>

-----Original Message-----
From: dev-tech-xforms-bounces+philip.fennell=[hidden email]
[mailto:dev-tech-xforms-bounces+philip.fennell=[hidden email]
rg] On Behalf Of Klotz, Leigh
Sent: 11 July 2008 17:48
To: Philip Fennell; [hidden email]
Subject: RE: Setting the accept header with mediatype,for a request
generatedby an xf:send on an xf:submission doesn't work.

The followups are all in the next month:
http://lists.w3.org/Archives/Public/www-forms/2007Oct/0017.html

It looks like the agreement was there that the header element in XForms
1.1 will work for submission, but not for instance/@src.  So, a message
to the WG might be to see what the plans are in XForms 1.2 for
instance/@src and headers; clearly there's something missing there.

Again, I still think Mozilla XForms XPI is wrong to use the generic
browser Accept header on instance and submission; it should be asking
only for XML types.  (XForms 1.1 can deal with non-XML return, but then
again, it has the ability to set headers as well, v.i.)

In XForms 1.1 submission/header will let you specify something else, but
it's not clear whether Mozilla XForms XPI will get that feature or not
any time soon.

Leigh.

-----Original Message-----
From: dev-tech-xforms-bounces+leigh.klotz=[hidden email]
[mailto:dev-tech-xforms-bounces+leigh.klotz=[hidden email]]
On Behalf Of Philip Fennell
Sent: Friday, July 11, 2008 6:13 AM
To: [hidden email]
Subject: RE: Setting the accept header with mediatype,for a request
generatedby an xf:send on an xf:submission doesn't work.

Aaron and Leigh,

>So, let's take this to the WG

This issue was raised on the [hidden email] mailing list in September
2007 <http://lists.w3.org/Archives/Public/www-forms/2007Sep/0006.html>
and, as you can see from the thread, members of the WG have discussed
this very issue already.

> For XForms 1.1, you get control over the submission headers via the
submission/header element.

If I read the spec. right, I can uses this method to set the 'Accept'
header for a request. If so, I believe this is really what I'm after;
unfortunately the header, name and value elements are not currently
supported in the Mozilla XForms plug-in. From recent postings Aaron, it
appears you're rather busy at present, but do you know if those elements
(header, name, value) are going to be implemented anytime soon?

In my current work I can get around the problem because the XHTML
representation of the resource in loading uses RDFa to annotate the
response with the same data as would have been available in the
'application/sparql-results+xml' response.


Regards

Philip Fennell
>XSLT Developer (Content Management Culture)
>
>BBC Future Media & Technology
>Media Village, 201 Wood Lane London W12 7TP
>BC4 C4, Broadcast Centre
>
>T: 0208 0085318
>

-----Original Message-----
From: dev-tech-xforms-bounces+philip.fennell=[hidden email]
[mailto:dev-tech-xforms-bounces+philip.fennell=[hidden email]
rg] On Behalf Of Klotz, Leigh
Sent: 10 July 2008 21:26
To: Aaron Reed; [hidden email]
Subject: RE: Setting the accept header with mediatype,for a request
generatedby an xf:send on an xf:submission doesn't work.

I think it's an outstanding bug and Mozilla should be asking for
application/xml,text/xml with submit replace='instance' instead of what
it's currently asking for.  

For XForms 1.1, you get control over the submission headers via the
submission/header element.

Although one might argue that the XForms REC should allow
submission/@mediatype on method="get" to specify the requested
representation rather than the serialized mediatype (which makes no
sense on GET), that change wouldn't provide a way to set the accept
header on POST or other HTTP verbs that do support serialization.

So, let's take this to the WG but my guess is that the answer will be
(1) Mozilla XForms XPI should ask for "application/xml,text/xml" for
XForms 1.0, and (2) for XForms 1.1, use submission/header.  The message
will probably will result in some discussion and clarifications in
XForms 1.2.

Leigh.
 

-----Original Message-----
From: dev-tech-xforms-bounces+leigh.klotz=[hidden email]
[mailto:dev-tech-xforms-bounces+leigh.klotz=[hidden email]]
On Behalf Of Aaron Reed
Sent: Thursday, July 10, 2008 10:38 AM
To: [hidden email]
Subject: Re: Setting the accept header with mediatype, for a request
generatedby an xf:send on an xf:submission doesn't work.


Hi Philip,

Sounds like something that you should bring up with the working group.
They are always on the lookout for good 'real world' scenarios that
xforms doesn't handle.  If it has already been implemented elsewhere
there is no reason we couldn't do it, too, if there is someone willing
to contribute the work.

--Aaron

Philip Fennell wrote:

> I know this is an old chestnut (for me at any rate) but when will
> using the following xf:model in the Mozilla XForms extension:
>
> <xf:model>
>   <xf:action ev:event="xforms-ready">
>     <xf:send submission="loadEquivalences"/>
>   </xf:action>
>
>   <xf:submission action="../equivalences" encoding="utf-8"
> id="loadEquivalences"
>       mediatype="application/sparql-results+xml" method="get"
>       replace="instance"/>
>
>   <xf:instance id="equivalencesData">
>     <data xmlns=""/>
>   </xf:instance>
> </xf:model>
>
> result in an HTTP accept header of 'application/sparql-results+xml'
>
> instead of
> 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/p
> la
>
in;q=0.8,image/png,*/*;q=0.5,application/rdf+xml;q=0.93,text/rdf+n3;q=0.

> 5'
>
> Unless there is some other cunning way of setting the accept header
> for an HTTP request I will not be able to use the Mozilla XForms
> plug-in to talk to RESTful web services where server-side content
> negotiation is used to return an appropriate response.
>
>
>
> Regards
>
> Philip Fennell
>
> 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.
>
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms

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.
                                       
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms

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.
                                       
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Reply | Threaded
Open this post in threaded view
|

Re: Setting the accept header with mediatype, for a request generatedby an xf:send on an xf:submission doesn't work.

Aaron Reed
In reply to this post by Philip Fennell-2
Hey Philip,

I implemented xf:header in xf:submission.  Please verify that this works
for you when https://bugzilla.mozilla.org/show_bug.cgi?id=446368 is
checked in.

--Aaron
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Reply | Threaded
Open this post in threaded view
|

RE: Setting the accept header with mediatype, for a request generatedby an xf:send on an xf:submission doesn't work.

Philip Fennell-2
Aaron,

> I implemented xf:header in xf:submission.  

Thanks.

> Please verify that this works for you when
> https://bugzilla.mozilla.org/show_bug.cgi?id=446368 
> is checked in.

Will do.
 


Regards

Philip Fennell

-----Original Message-----
From: dev-tech-xforms-bounces+philip.fennell=[hidden email]
[mailto:dev-tech-xforms-bounces+philip.fennell=[hidden email]
rg] On Behalf Of aaron reed
Sent: 22 July 2008 07:36
To: [hidden email]
Subject: Re: Setting the accept header with mediatype,for a request
generatedby an xf:send on an xf:submission doesn't work.

Hey Philip,

I implemented xf:header in xf:submission.  Please verify that this works
for you when https://bugzilla.mozilla.org/show_bug.cgi?id=446368 is
checked in.

--Aaron
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms

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.
                                       
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Reply | Threaded
Open this post in threaded view
|

RE: Setting the accept header with mediatype, for a request generatedby an xf:send on an xf:submission doesn't work.

Philip Fennell-2
Aaron,

I hope I haven't jumped the gun here, but I've seen that this bug is
'Resolved Fixed' and have taken the latest nightly builds of Firefox 2
and XForms plugin:

<ftp://ftp.mozilla.org/pub/firefox/nightly/latest-mozilla1.8/firefox-2.0
.0.17pre.en-US.win32.zip>
<ftp://ftp.mozilla.org/pub/firefox/nightly/latest-mozilla1.8/windows-xpi
/xforms.xpi>

This morning at about 10:00 BST

I tried a submission using the following XForms fragment:

<xf:model>
    <xf:action ev:event="xforms-ready">
        <xf:send submission="loadEquivalences"/>
    </xf:action>

    <xf:submission action="../request.xml" encoding="utf-8"
id="loadEquivalences"
            ref="instance('equivalencesList')"
            method="get"
            replace="instance">
        <xf:header>
            <xf:name>Accept</xf:name>
            <xf:value>application/sparql-results+xml</xf:value>
        </xf:header>
    </xf:submission>

    <xf:instance id="equivalencesList">
        <data xmlns=""/>
    </xf:instance>
</xf:model>


The XForm is being served from Apache Cocoon and the action URI returns
an XML serialisation of the HTTP request (this uses Cocoon's request
generator). The response looks like this:


<?xml version="1.0" encoding="ISO-8859-1"?>
<h:request xmlns:h="http://apache.org/cocoon/request/2.0"
target="/SemWebCVBlock/request.xml" sitemap="request.xml" source="">
    <h:requestHeaders>
        <h:header name="Host">localhost:8888</h:header>
        <h:header name="User-Agent">Mozilla/5.0 (Windows; U; Windows NT
5.1; en-US; rv:1.8.1.17pre) Gecko/20080723
BonEcho/2.0.0.17pre</h:header>
        <h:header
name="Accept">text/xml,application/xml,application/xhtml+xml,text/html;q
=0.9,text/plain;q=0.8,image/png,*/*;q=0.5,application/rdf+xml;q=0.93,tex
t/rdf+n3;q=0.5</h:header>
        <h:header name="Accept-Language">en-us,en;q=0.5</h:header>
        <h:header name="Accept-Encoding">gzip,deflate</h:header>
        <h:header name="Accept-Charset">UTF-8,*</h:header>
        <h:header name="Keep-Alive">300</h:header>
        <h:header name="Connection">keep-alive</h:header>
        <h:header
name="Referer">http://localhost:8888/SemWebCVBlock/uis/equivalences.xhtm
l</h:header>
    </h:requestHeaders>
    <h:requestParameters/>
    <h:configurationParameters/>
    <h:remoteUser/>
</h:request>


If I send the same request directly from Firefox, from the Navigation
Toolbar, and using the 'Modify Headers' add-on to set the same Accept
header as was used in the xf:submission, I get this, which is what I
believe I'm expecting from the XForms plug-in:


<?xml version="1.0" encoding="ISO-8859-1"?>
<h:request xmlns:h="http://apache.org/cocoon/request/2.0"
target="/SemWebCVBlock/request.xml" sitemap="request.xml" source="">
    <h:requestHeaders>
        <h:header name="Host">localhost:8888</h:header>
        <h:header name="User-Agent">Mozilla/5.0 (Windows; U; Windows NT
5.1; en-US; rv:1.8.1.17pre) Gecko/20080723
BonEcho/2.0.0.17pre</h:header>
        <h:header
name="Accept">application/sparql-results+xml</h:header>
        <h:header name="Accept-Language">en-us,en;q=0.5</h:header>
        <h:header name="Accept-Encoding">gzip,deflate</h:header>
        <h:header name="Accept-Charset">UTF-8,*</h:header>
        <h:header name="Keep-Alive">300</h:header>
        <h:header name="Connection">keep-alive</h:header>
        <h:header name="Cache-Control">max-age=0</h:header>
    </h:requestHeaders>
    <h:requestParameters/>
    <h:configurationParameters/>
    <h:remoteUser/>
</h:request>


Should this last example be what I'm expecting and therefore there's
something wrong or have I gone and gotten a nightly build to soon?


Regards

Philip Fennell
>XSLT Developer (Content Management Culture)
>
>BBC Future Media & Technology
>Media Village, 201 Wood Lane London W12 7TP
>BC4 C4, Broadcast Centre
>
>T: 0208 0085318
>

-----Original Message-----
From: dev-tech-xforms-bounces+philip.fennell=[hidden email]
[mailto:dev-tech-xforms-bounces+philip.fennell=[hidden email]
rg] On Behalf Of Philip Fennell
Sent: 22 July 2008 08:28
To: aaron reed; [hidden email]
Subject: RE: Setting the accept header with mediatype,for a request
generatedby an xf:send on an xf:submission doesn't work.

Aaron,

> I implemented xf:header in xf:submission.  

Thanks.

> Please verify that this works for you when
> https://bugzilla.mozilla.org/show_bug.cgi?id=446368
> is checked in.

Will do.
 


Regards

Philip Fennell

-----Original Message-----
From: dev-tech-xforms-bounces+philip.fennell=[hidden email]
[mailto:dev-tech-xforms-bounces+philip.fennell=[hidden email]
rg] On Behalf Of aaron reed
Sent: 22 July 2008 07:36
To: [hidden email]
Subject: Re: Setting the accept header with mediatype,for a request
generatedby an xf:send on an xf:submission doesn't work.

Hey Philip,

I implemented xf:header in xf:submission.  Please verify that this works
for you when https://bugzilla.mozilla.org/show_bug.cgi?id=446368 is
checked in.

--Aaron
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms

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.
                                       
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms

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.
                                       
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Reply | Threaded
Open this post in threaded view
|

Re: Setting the accept header with mediatype, for a request generatedby an xf:send on an xf:submission doesn't work.

Aaron Reed
In reply to this post by Philip Fennell-2
Hi Philip,

Bugs that have xf-to-branch-* on the whiteboard status means that it is
still waiting to go into FF2.  You should be able to test it using FF3,
though.  Philip Wagner has been nice enough to post nightlies for that
level of code.  Use a separate profile, though, or you'll end up
screwing up the state of things that you have installed for FF2.

I'll try to have it checked into FF2 by Monday.

--Aaron

Philip Fennell wrote:

> Aaron,
>
> I hope I haven't jumped the gun here, but I've seen that this bug is
> 'Resolved Fixed' and have taken the latest nightly builds of Firefox 2
> and XForms plugin:
>
> <ftp://ftp.mozilla.org/pub/firefox/nightly/latest-mozilla1.8/firefox-2.0
> .0.17pre.en-US.win32.zip>
> <ftp://ftp.mozilla.org/pub/firefox/nightly/latest-mozilla1.8/windows-xpi
> /xforms.xpi>
>
> This morning at about 10:00 BST
>
> I tried a submission using the following XForms fragment:
>
> <xf:model>
>     <xf:action ev:event="xforms-ready">
>         <xf:send submission="loadEquivalences"/>
>     </xf:action>
>
>     <xf:submission action="../request.xml" encoding="utf-8"
> id="loadEquivalences"
>             ref="instance('equivalencesList')"
>             method="get"
>             replace="instance">
>         <xf:header>
>             <xf:name>Accept</xf:name>
>             <xf:value>application/sparql-results+xml</xf:value>
>         </xf:header>
>     </xf:submission>
>
>     <xf:instance id="equivalencesList">
>         <data xmlns=""/>
>     </xf:instance>
> </xf:model>
>
>
> The XForm is being served from Apache Cocoon and the action URI returns
> an XML serialisation of the HTTP request (this uses Cocoon's request
> generator). The response looks like this:
>
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <h:request xmlns:h="http://apache.org/cocoon/request/2.0"
> target="/SemWebCVBlock/request.xml" sitemap="request.xml" source="">
>     <h:requestHeaders>
>         <h:header name="Host">localhost:8888</h:header>
>         <h:header name="User-Agent">Mozilla/5.0 (Windows; U; Windows NT
> 5.1; en-US; rv:1.8.1.17pre) Gecko/20080723
> BonEcho/2.0.0.17pre</h:header>
>         <h:header
> name="Accept">text/xml,application/xml,application/xhtml+xml,text/html;q
> =0.9,text/plain;q=0.8,image/png,*/*;q=0.5,application/rdf+xml;q=0.93,tex
> t/rdf+n3;q=0.5</h:header>
>         <h:header name="Accept-Language">en-us,en;q=0.5</h:header>
>         <h:header name="Accept-Encoding">gzip,deflate</h:header>
>         <h:header name="Accept-Charset">UTF-8,*</h:header>
>         <h:header name="Keep-Alive">300</h:header>
>         <h:header name="Connection">keep-alive</h:header>
>         <h:header
> name="Referer">http://localhost:8888/SemWebCVBlock/uis/equivalences.xhtm
> l</h:header>
>     </h:requestHeaders>
>     <h:requestParameters/>
>     <h:configurationParameters/>
>     <h:remoteUser/>
> </h:request>
>
>
> If I send the same request directly from Firefox, from the Navigation
> Toolbar, and using the 'Modify Headers' add-on to set the same Accept
> header as was used in the xf:submission, I get this, which is what I
> believe I'm expecting from the XForms plug-in:
>
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <h:request xmlns:h="http://apache.org/cocoon/request/2.0"
> target="/SemWebCVBlock/request.xml" sitemap="request.xml" source="">
>     <h:requestHeaders>
>         <h:header name="Host">localhost:8888</h:header>
>         <h:header name="User-Agent">Mozilla/5.0 (Windows; U; Windows NT
> 5.1; en-US; rv:1.8.1.17pre) Gecko/20080723
> BonEcho/2.0.0.17pre</h:header>
>         <h:header
> name="Accept">application/sparql-results+xml</h:header>
>         <h:header name="Accept-Language">en-us,en;q=0.5</h:header>
>         <h:header name="Accept-Encoding">gzip,deflate</h:header>
>         <h:header name="Accept-Charset">UTF-8,*</h:header>
>         <h:header name="Keep-Alive">300</h:header>
>         <h:header name="Connection">keep-alive</h:header>
>         <h:header name="Cache-Control">max-age=0</h:header>
>     </h:requestHeaders>
>     <h:requestParameters/>
>     <h:configurationParameters/>
>     <h:remoteUser/>
> </h:request>
>
>
> Should this last example be what I'm expecting and therefore there's
> something wrong or have I gone and gotten a nightly build to soon?
>
>
> Regards
>
> Philip Fennell
>> XSLT Developer (Content Management Culture)
>>
>> BBC Future Media & Technology
>> Media Village, 201 Wood Lane London W12 7TP
>> BC4 C4, Broadcast Centre
>>
>> T: 0208 0085318
>>
>
> -----Original Message-----
> From: dev-tech-xforms-bounces+philip.fennell=[hidden email]
> [mailto:dev-tech-xforms-bounces+philip.fennell=[hidden email]
> rg] On Behalf Of Philip Fennell
> Sent: 22 July 2008 08:28
> To: aaron reed; [hidden email]
> Subject: RE: Setting the accept header with mediatype,for a request
> generatedby an xf:send on an xf:submission doesn't work.
>
> Aaron,
>
>> I implemented xf:header in xf:submission.  
>
> Thanks.
>
>> Please verify that this works for you when
>> https://bugzilla.mozilla.org/show_bug.cgi?id=446368
>> is checked in.
>
> Will do.
>  
>
>
> Regards
>
> Philip Fennell
>
> -----Original Message-----
> From: dev-tech-xforms-bounces+philip.fennell=[hidden email]
> [mailto:dev-tech-xforms-bounces+philip.fennell=[hidden email]
> rg] On Behalf Of aaron reed
> Sent: 22 July 2008 07:36
> To: [hidden email]
> Subject: Re: Setting the accept header with mediatype,for a request
> generatedby an xf:send on an xf:submission doesn't work.
>
> Hey Philip,
>
> I implemented xf:header in xf:submission.  Please verify that this works
> for you when https://bugzilla.mozilla.org/show_bug.cgi?id=446368 is
> checked in.
>
> --Aaron
> _______________________________________________
> dev-tech-xforms mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-tech-xforms
>
> 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.
>
> _______________________________________________
> dev-tech-xforms mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-tech-xforms
>
> 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.
>
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Reply | Threaded
Open this post in threaded view
|

RE: Setting the accept header with mediatype, for a request generatedby an xf:send on an xf:submission doesn't work.

Philip Fennell-2
Aaron,

> I'll try to have it checked into FF2 by Monday.

You did, I've checked it for the Accept header and it works a treat.
Thanks!

Because it adds to rather than replaces the existing Accept header I
need to ensure my Cocoon HTTP Header selector is testing for the
specific media-types first and then worry about the more general cases.

I would have imagined that the action of the <xf:header> would have
overwritten an existing header but as I see from the comments in
Bugzilla that headers that only a single value gets overwritten and
those that accept multiple values get appended.

>From my RESTful XForms perspective, I'd like to see the Accept header be
overwritten so that when I ask for 'application/sparql-results+xml' I'm
only asking for that.

If I understand the HTTP spec correctly, and please feel free to correct
me if I don't, then:

text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plai
n;q=0.8,image/png,*/*;q=0.5,application/rdf+xml;q=0.93,text/rdf+n3;q=0.5
, application/sparql-results+xml

will treat 'text/xml,application/xml,application/xhtml+xml' as the
preferred media-types along with 'application/sparql-results+xml' so
that there is no distinction between them other than the order in which
they occur. It is then down to the server-side code to order its logic
so that when I'm looking for SPARQL result representations that that is
what I get.

In saying all that I'm not going to argue the toss over this one, I'm
just truly happy that it's work :-)



Regards

Philip Fennell
>XSLT Developer (Content Management Culture)
>
>BBC Future Media & Technology
>Media Village, 201 Wood Lane London W12 7TP
>BC4 C4, Broadcast Centre
>
>T: 0208 0085318
>

-----Original Message-----
From: dev-tech-xforms-bounces+philip.fennell=[hidden email]
[mailto:dev-tech-xforms-bounces+philip.fennell=[hidden email]
rg] On Behalf Of Aaron Reed
Sent: 24 July 2008 19:24
To: [hidden email]
Subject: Re: Setting the accept header with mediatype,for a request
generatedby an xf:send on an xf:submission doesn't work.

Hi Philip,

Bugs that have xf-to-branch-* on the whiteboard status means that it is
still waiting to go into FF2.  You should be able to test it using FF3,
though.  Philip Wagner has been nice enough to post nightlies for that
level of code.  Use a separate profile, though, or you'll end up
screwing up the state of things that you have installed for FF2.

I'll try to have it checked into FF2 by Monday.

--Aaron

Philip Fennell wrote:
> Aaron,
>
> I hope I haven't jumped the gun here, but I've seen that this bug is
> 'Resolved Fixed' and have taken the latest nightly builds of Firefox 2

> and XForms plugin:
>
> <ftp://ftp.mozilla.org/pub/firefox/nightly/latest-mozilla1.8/firefox-2
> .0
> .0.17pre.en-US.win32.zip>
> <ftp://ftp.mozilla.org/pub/firefox/nightly/latest-mozilla1.8/windows-x
> pi
> /xforms.xpi>
>
> This morning at about 10:00 BST
>
> I tried a submission using the following XForms fragment:
>
> <xf:model>
>     <xf:action ev:event="xforms-ready">
>         <xf:send submission="loadEquivalences"/>
>     </xf:action>
>
>     <xf:submission action="../request.xml" encoding="utf-8"
> id="loadEquivalences"
>             ref="instance('equivalencesList')"
>             method="get"
>             replace="instance">
>         <xf:header>
>             <xf:name>Accept</xf:name>
>             <xf:value>application/sparql-results+xml</xf:value>
>         </xf:header>
>     </xf:submission>
>
>     <xf:instance id="equivalencesList">
>         <data xmlns=""/>
>     </xf:instance>
> </xf:model>
>
>
> The XForm is being served from Apache Cocoon and the action URI
> returns an XML serialisation of the HTTP request (this uses Cocoon's
> request generator). The response looks like this:
>
>
> <?xml version="1.0" encoding="ISO-8859-1"?> <h:request
> xmlns:h="http://apache.org/cocoon/request/2.0"
> target="/SemWebCVBlock/request.xml" sitemap="request.xml" source="">
>     <h:requestHeaders>
>         <h:header name="Host">localhost:8888</h:header>
>         <h:header name="User-Agent">Mozilla/5.0 (Windows; U; Windows
> NT 5.1; en-US; rv:1.8.1.17pre) Gecko/20080723
> BonEcho/2.0.0.17pre</h:header>
>         <h:header
> name="Accept">text/xml,application/xml,application/xhtml+xml,text/html
> ;q
> =0.9,text/plain;q=0.8,image/png,*/*;q=0.5,application/rdf+xml;q=0.93,t
> ex
> t/rdf+n3;q=0.5</h:header>
>         <h:header name="Accept-Language">en-us,en;q=0.5</h:header>
>         <h:header name="Accept-Encoding">gzip,deflate</h:header>
>         <h:header name="Accept-Charset">UTF-8,*</h:header>
>         <h:header name="Keep-Alive">300</h:header>
>         <h:header name="Connection">keep-alive</h:header>
>         <h:header
> name="Referer">http://localhost:8888/SemWebCVBlock/uis/equivalences.xh
> tm
> l</h:header>
>     </h:requestHeaders>
>     <h:requestParameters/>
>     <h:configurationParameters/>
>     <h:remoteUser/>
> </h:request>
>
>
> If I send the same request directly from Firefox, from the Navigation
> Toolbar, and using the 'Modify Headers' add-on to set the same Accept
> header as was used in the xf:submission, I get this, which is what I
> believe I'm expecting from the XForms plug-in:
>
>
> <?xml version="1.0" encoding="ISO-8859-1"?> <h:request
> xmlns:h="http://apache.org/cocoon/request/2.0"
> target="/SemWebCVBlock/request.xml" sitemap="request.xml" source="">
>     <h:requestHeaders>
>         <h:header name="Host">localhost:8888</h:header>
>         <h:header name="User-Agent">Mozilla/5.0 (Windows; U; Windows
> NT 5.1; en-US; rv:1.8.1.17pre) Gecko/20080723
> BonEcho/2.0.0.17pre</h:header>
>         <h:header
> name="Accept">application/sparql-results+xml</h:header>
>         <h:header name="Accept-Language">en-us,en;q=0.5</h:header>
>         <h:header name="Accept-Encoding">gzip,deflate</h:header>
>         <h:header name="Accept-Charset">UTF-8,*</h:header>
>         <h:header name="Keep-Alive">300</h:header>
>         <h:header name="Connection">keep-alive</h:header>
>         <h:header name="Cache-Control">max-age=0</h:header>
>     </h:requestHeaders>
>     <h:requestParameters/>
>     <h:configurationParameters/>
>     <h:remoteUser/>
> </h:request>
>
>
> Should this last example be what I'm expecting and therefore there's
> something wrong or have I gone and gotten a nightly build to soon?
>
>
> Regards
>
> Philip Fennell
>> XSLT Developer (Content Management Culture)
>>
>> BBC Future Media & Technology
>> Media Village, 201 Wood Lane London W12 7TP
>> BC4 C4, Broadcast Centre
>>
>> T: 0208 0085318
>>
>
> -----Original Message-----
> From:
> dev-tech-xforms-bounces+philip.fennell=[hidden email]
> [mailto:dev-tech-xforms-bounces+philip.fennell=[hidden email]
> .o
> rg] On Behalf Of Philip Fennell
> Sent: 22 July 2008 08:28
> To: aaron reed; [hidden email]
> Subject: RE: Setting the accept header with mediatype,for a request
> generatedby an xf:send on an xf:submission doesn't work.
>
> Aaron,
>
>> I implemented xf:header in xf:submission.  
>
> Thanks.
>
>> Please verify that this works for you when
>> https://bugzilla.mozilla.org/show_bug.cgi?id=446368
>> is checked in.
>
> Will do.
>  
>
>
> Regards
>
> Philip Fennell
>
> -----Original Message-----
> From:
> dev-tech-xforms-bounces+philip.fennell=[hidden email]
> [mailto:dev-tech-xforms-bounces+philip.fennell=[hidden email]
> .o
> rg] On Behalf Of aaron reed
> Sent: 22 July 2008 07:36
> To: [hidden email]
> Subject: Re: Setting the accept header with mediatype,for a request
> generatedby an xf:send on an xf:submission doesn't work.
>
> Hey Philip,
>
> I implemented xf:header in xf:submission.  Please verify that this
> works for you when https://bugzilla.mozilla.org/show_bug.cgi?id=446368

> is checked in.
>
> --Aaron
> _______________________________________________
> dev-tech-xforms mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-tech-xforms
>
> 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.
>
> _______________________________________________
> dev-tech-xforms mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-tech-xforms
>
> 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.
>
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms

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.
                                       
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Reply | Threaded
Open this post in threaded view
|

Re: Setting the accept header with mediatype, for a request generatedby an xf:send on an xf:submission doesn't work.

Aaron Reed
In reply to this post by Aaron Reed
Hi Philip,

Sounds like you have a usecase for the XForms working group to consider.
  Maybe they could put an attribute on the xf:header that says to
replace rather than append.

--Aaron

Philip Fennell wrote:

> Aaron,
>
>> I'll try to have it checked into FF2 by Monday.
>
> You did, I've checked it for the Accept header and it works a treat.
> Thanks!
>
> Because it adds to rather than replaces the existing Accept header I
> need to ensure my Cocoon HTTP Header selector is testing for the
> specific media-types first and then worry about the more general cases.
>
> I would have imagined that the action of the <xf:header> would have
> overwritten an existing header but as I see from the comments in
> Bugzilla that headers that only a single value gets overwritten and
> those that accept multiple values get appended.
>
>>From my RESTful XForms perspective, I'd like to see the Accept header be
> overwritten so that when I ask for 'application/sparql-results+xml' I'm
> only asking for that.
>
> If I understand the HTTP spec correctly, and please feel free to correct
> me if I don't, then:
>
> text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plai
> n;q=0.8,image/png,*/*;q=0.5,application/rdf+xml;q=0.93,text/rdf+n3;q=0.5
> , application/sparql-results+xml
>
> will treat 'text/xml,application/xml,application/xhtml+xml' as the
> preferred media-types along with 'application/sparql-results+xml' so
> that there is no distinction between them other than the order in which
> they occur. It is then down to the server-side code to order its logic
> so that when I'm looking for SPARQL result representations that that is
> what I get.
>
> In saying all that I'm not going to argue the toss over this one, I'm
> just truly happy that it's work :-)
>
>
>
> Regards
>
> Philip Fennell
>> XSLT Developer (Content Management Culture)
>>
>> BBC Future Media & Technology
>> Media Village, 201 Wood Lane London W12 7TP
>> BC4 C4, Broadcast Centre
>>
>> T: 0208 0085318
>>
>
> -----Original Message-----
> From: dev-tech-xforms-bounces+philip.fennell=[hidden email]
> [mailto:dev-tech-xforms-bounces+philip.fennell=[hidden email]
> rg] On Behalf Of Aaron Reed
> Sent: 24 July 2008 19:24
> To: [hidden email]
> Subject: Re: Setting the accept header with mediatype,for a request
> generatedby an xf:send on an xf:submission doesn't work.
>
> Hi Philip,
>
> Bugs that have xf-to-branch-* on the whiteboard status means that it is
> still waiting to go into FF2.  You should be able to test it using FF3,
> though.  Philip Wagner has been nice enough to post nightlies for that
> level of code.  Use a separate profile, though, or you'll end up
> screwing up the state of things that you have installed for FF2.
>
> I'll try to have it checked into FF2 by Monday.
>
> --Aaron
>
> Philip Fennell wrote:
>> Aaron,
>>
>> I hope I haven't jumped the gun here, but I've seen that this bug is
>> 'Resolved Fixed' and have taken the latest nightly builds of Firefox 2
>
>> and XForms plugin:
>>
>> <ftp://ftp.mozilla.org/pub/firefox/nightly/latest-mozilla1.8/firefox-2
>> .0
>> .0.17pre.en-US.win32.zip>
>> <ftp://ftp.mozilla.org/pub/firefox/nightly/latest-mozilla1.8/windows-x
>> pi
>> /xforms.xpi>
>>
>> This morning at about 10:00 BST
>>
>> I tried a submission using the following XForms fragment:
>>
>> <xf:model>
>>     <xf:action ev:event="xforms-ready">
>>         <xf:send submission="loadEquivalences"/>
>>     </xf:action>
>>
>>     <xf:submission action="../request.xml" encoding="utf-8"
>> id="loadEquivalences"
>>             ref="instance('equivalencesList')"
>>             method="get"
>>             replace="instance">
>>         <xf:header>
>>             <xf:name>Accept</xf:name>
>>             <xf:value>application/sparql-results+xml</xf:value>
>>         </xf:header>
>>     </xf:submission>
>>
>>     <xf:instance id="equivalencesList">
>>         <data xmlns=""/>
>>     </xf:instance>
>> </xf:model>
>>
>>
>> The XForm is being served from Apache Cocoon and the action URI
>> returns an XML serialisation of the HTTP request (this uses Cocoon's
>> request generator). The response looks like this:
>>
>>
>> <?xml version="1.0" encoding="ISO-8859-1"?> <h:request
>> xmlns:h="http://apache.org/cocoon/request/2.0"
>> target="/SemWebCVBlock/request.xml" sitemap="request.xml" source="">
>>     <h:requestHeaders>
>>         <h:header name="Host">localhost:8888</h:header>
>>         <h:header name="User-Agent">Mozilla/5.0 (Windows; U; Windows
>> NT 5.1; en-US; rv:1.8.1.17pre) Gecko/20080723
>> BonEcho/2.0.0.17pre</h:header>
>>         <h:header
>> name="Accept">text/xml,application/xml,application/xhtml+xml,text/html
>> ;q
>> =0.9,text/plain;q=0.8,image/png,*/*;q=0.5,application/rdf+xml;q=0.93,t
>> ex
>> t/rdf+n3;q=0.5</h:header>
>>         <h:header name="Accept-Language">en-us,en;q=0.5</h:header>
>>         <h:header name="Accept-Encoding">gzip,deflate</h:header>
>>         <h:header name="Accept-Charset">UTF-8,*</h:header>
>>         <h:header name="Keep-Alive">300</h:header>
>>         <h:header name="Connection">keep-alive</h:header>
>>         <h:header
>> name="Referer">http://localhost:8888/SemWebCVBlock/uis/equivalences.xh
>> tm
>> l</h:header>
>>     </h:requestHeaders>
>>     <h:requestParameters/>
>>     <h:configurationParameters/>
>>     <h:remoteUser/>
>> </h:request>
>>
>>
>> If I send the same request directly from Firefox, from the Navigation
>> Toolbar, and using the 'Modify Headers' add-on to set the same Accept
>> header as was used in the xf:submission, I get this, which is what I
>> believe I'm expecting from the XForms plug-in:
>>
>>
>> <?xml version="1.0" encoding="ISO-8859-1"?> <h:request
>> xmlns:h="http://apache.org/cocoon/request/2.0"
>> target="/SemWebCVBlock/request.xml" sitemap="request.xml" source="">
>>     <h:requestHeaders>
>>         <h:header name="Host">localhost:8888</h:header>
>>         <h:header name="User-Agent">Mozilla/5.0 (Windows; U; Windows
>> NT 5.1; en-US; rv:1.8.1.17pre) Gecko/20080723
>> BonEcho/2.0.0.17pre</h:header>
>>         <h:header
>> name="Accept">application/sparql-results+xml</h:header>
>>         <h:header name="Accept-Language">en-us,en;q=0.5</h:header>
>>         <h:header name="Accept-Encoding">gzip,deflate</h:header>
>>         <h:header name="Accept-Charset">UTF-8,*</h:header>
>>         <h:header name="Keep-Alive">300</h:header>
>>         <h:header name="Connection">keep-alive</h:header>
>>         <h:header name="Cache-Control">max-age=0</h:header>
>>     </h:requestHeaders>
>>     <h:requestParameters/>
>>     <h:configurationParameters/>
>>     <h:remoteUser/>
>> </h:request>
>>
>>
>> Should this last example be what I'm expecting and therefore there's
>> something wrong or have I gone and gotten a nightly build to soon?
>>
>>
>> Regards
>>
>> Philip Fennell
>>> XSLT Developer (Content Management Culture)
>>>
>>> BBC Future Media & Technology
>>> Media Village, 201 Wood Lane London W12 7TP
>>> BC4 C4, Broadcast Centre
>>>
>>> T: 0208 0085318
>>>
>> -----Original Message-----
>> From:
>> dev-tech-xforms-bounces+philip.fennell=[hidden email]
>> [mailto:dev-tech-xforms-bounces+philip.fennell=[hidden email]
>> .o
>> rg] On Behalf Of Philip Fennell
>> Sent: 22 July 2008 08:28
>> To: aaron reed; [hidden email]
>> Subject: RE: Setting the accept header with mediatype,for a request
>> generatedby an xf:send on an xf:submission doesn't work.
>>
>> Aaron,
>>
>>> I implemented xf:header in xf:submission.  
>> Thanks.
>>
>>> Please verify that this works for you when
>>> https://bugzilla.mozilla.org/show_bug.cgi?id=446368
>>> is checked in.
>> Will do.
>>  
>>
>>
>> Regards
>>
>> Philip Fennell
>>
>> -----Original Message-----
>> From:
>> dev-tech-xforms-bounces+philip.fennell=[hidden email]
>> [mailto:dev-tech-xforms-bounces+philip.fennell=[hidden email]
>> .o
>> rg] On Behalf Of aaron reed
>> Sent: 22 July 2008 07:36
>> To: [hidden email]
>> Subject: Re: Setting the accept header with mediatype,for a request
>> generatedby an xf:send on an xf:submission doesn't work.
>>
>> Hey Philip,
>>
>> I implemented xf:header in xf:submission.  Please verify that this
>> works for you when https://bugzilla.mozilla.org/show_bug.cgi?id=446368
>
>> is checked in.
>>
>> --Aaron
>> _______________________________________________
>> dev-tech-xforms mailing list
>> [hidden email]
>> https://lists.mozilla.org/listinfo/dev-tech-xforms
>>
>> 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.
>>
>> _______________________________________________
>> dev-tech-xforms mailing list
>> [hidden email]
>> https://lists.mozilla.org/listinfo/dev-tech-xforms
>>
>> 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.
>>
> _______________________________________________
> dev-tech-xforms mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-tech-xforms
>
> 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.
>
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms