Thread: [Xsltforms-support] Submission problem
Brought to you by:
alain-couthures
From: Mark S. <m_s...@ma...> - 2015-07-10 18:45:16
|
Hi, I have a simple submit that is failing, if anyone can suggest something to try I would be very grateful. I’m sure I must have missed something obvious. Here is what XSLTForms, build 615, reports: Submit get - application/xml - http://www.nearby.org.uk/api/convert.php?key=37d6c2c0832f6b&p=303657%2C965123&in=gr-osgb36&need=gr10-osgb36&output=sxml - false If I copy the URL string into a browser the expected XML document is returned, so there is no problem there. Here is the submission itself: <xf:submission id="getGridRef" method="get" replace="instance" instance="coord" ref="instance('var')/convert" serialization="application/x-www-form-urlencoded" resource="http://www.nearby.org.uk/api/convert.php"> <xf:action ev:event="xforms-submit-error"> <xf:message level="modal">'<xf:output value="instance('var')/convert/p"/>' getGridRef didn't work</xf:message> </xf:action> </xf:submission> Best wishes Mark |
From: Tim T. <tim...@gm...> - 2015-07-10 19:01:37
|
Hi, Mark, What do your instances look like? Could you include a more complete example? Best, Tim -- Tim A. Thompson Metadata Librarian (Spanish/Portuguese Specialty) Princeton University Library <ta...@pr...> On Fri, Jul 10, 2015 at 2:45 PM, Mark Seaborne <m_s...@ma...> wrote: > Hi, > > I have a simple submit that is failing, if anyone can suggest something to > try I would be very grateful. I’m sure I must have missed something obvious. > > Here is what XSLTForms, build 615, reports: > > Submit get - application/xml - > http://www.nearby.org.uk/api/convert.php?key=37d6c2c0832f6b&p=303657%2C965123&in=gr-osgb36&need=gr10-osgb36&output=sxml > - false > > If I copy the URL string into a browser the expected XML document is > returned, so there is no problem there. > > Here is the submission itself: > > <xf:submission id="getGridRef" > method="get" > replace="instance" > instance="coord" > ref="instance('var')/convert" > serialization="application/x-www-form-urlencoded" > resource="http://www.nearby.org.uk/api/convert.php"> > <xf:action ev:event="xforms-submit-error"> > <xf:message level="modal">'<xf:output value="instance('var')/convert/p"/>' > getGridRef didn't work</xf:message> > </xf:action> > </xf:submission> > > Best wishes > > Mark > > > ------------------------------------------------------------------------------ > Don't Limit Your Business. Reach for the Cloud. > GigeNET's Cloud Solutions provide you with the tools and support that > you need to offload your IT needs and focus on growing your business. > Configured For All Businesses. Start Your Cloud Today. > https://www.gigenetcloud.com/ > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support > > |
From: Mark S. <m_s...@ma...> - 2015-07-10 19:58:09
|
Hi Tim, Here is a complete test form: <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet href="../xsltforms/xsltforms.xsl" type="application/xml"?> <?xsltforms-options debug="yes"?> <?css-conversion no?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:nr="http://www.nearby.org.uk" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events"> <head> <title>Test</title> <xf:model id="theModel"> <xf:instance id="var" xmlns=""> <doc> <!--co-ordinates--> <convert> <key>37d6c2c0832f6b</key> <p>303743,967206</p> <in>gr-osgb36</in> <need>gr10-osgb36</need> <output>sxml</output> </convert> </doc> </xf:instance> <xf:instance id="gridRef"> <convert xmlns="http://www.nearby.org.uk" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.nearby.org.uk/api/convert.xsd"> <info href="http://www.nearby.org.uk/api/convert-help.php"/> <input> <en datum="osgb36" e="302872" n="966758"/> </input> <output> <gaz country="United Kingdom"/> <gr10 datum="osgb36" gr10="ND 02872 66758"/> <gr datum="osgb36" gr="ND0287266758" digits="10"/> <ll datum="wgs84" lat="58.577939885331" long="-3.6719623952203"/> </output> </convert> </xf:instance> <xf:submission id="getGridRef" method="get" replace="instance" instance="gridRef" ref="instance('var')/convert" serialization="application/x-www-form-urlencoded" resource="http://www.nearby.org.uk/api/convert.php"> <xf:action ev:event="xforms-submit-error"> <xf:message level="modal">'<xf:output value="instance('var')/convert/p"/>' getGridRef didn't work</xf:message> </xf:action> </xf:submission> </xf:model> </head> <body> <xf:input ref="instance('var')/convert/p"> <xf:label>EPSG:27700 co-ordinates</xf:label> </xf:input> <xf:submit submission="getGridRef"> <xf:label>Get Ordnance Survey Grid Reference</xf:label> </xf:submit> <p>OS Grid Reference is: <xf:output ref="instance('gridRef')/nr:output/nr:gr10/@gr10"/></p> </body> </html> > On 10 Jul 2015, at 21:01, Tim Thompson <tim...@gm...> wrote: > > Hi, Mark, > > What do your instances look like? Could you include a more complete example? > > Best, > Tim > > > -- > Tim A. Thompson > Metadata Librarian (Spanish/Portuguese Specialty) > Princeton University Library > <mailto:ta...@pr...> > > On Fri, Jul 10, 2015 at 2:45 PM, Mark Seaborne <m_s...@ma... <mailto:m_s...@ma...>> wrote: > Hi, > > I have a simple submit that is failing, if anyone can suggest something to try I would be very grateful. I’m sure I must have missed something obvious. > > Here is what XSLTForms, build 615, reports: > > Submit get - application/xml - http://www.nearby.org.uk/api/convert.php?key=37d6c2c0832f6b&p=303657%2C965123&in=gr-osgb36&need=gr10-osgb36&output=sxml <http://www.nearby.org.uk/api/convert.php?key=37d6c2c0832f6b&p=303657%2C965123&in=gr-osgb36&need=gr10-osgb36&output=sxml> - false > > If I copy the URL string into a browser the expected XML document is returned, so there is no problem there. > > Here is the submission itself: > > <xf:submission id="getGridRef" > method="get" > replace="instance" > instance="coord" > ref="instance('var')/convert" > serialization="application/x-www-form-urlencoded" > resource="http://www.nearby.org.uk/api/convert.php <http://www.nearby.org.uk/api/convert.php>"> > <xf:action ev:event="xforms-submit-error"> > <xf:message level="modal">'<xf:output value="instance('var')/convert/p"/>' getGridRef didn't work</xf:message> > </xf:action> > </xf:submission> > > Best wishes > > Mark > > ------------------------------------------------------------------------------ > Don't Limit Your Business. Reach for the Cloud. > GigeNET's Cloud Solutions provide you with the tools and support that > you need to offload your IT needs and focus on growing your business. > Configured For All Businesses. Start Your Cloud Today. > https://www.gigenetcloud.com/ <https://www.gigenetcloud.com/> > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... <mailto:Xsl...@li...> > https://lists.sourceforge.net/lists/listinfo/xsltforms-support <https://lists.sourceforge.net/lists/listinfo/xsltforms-support> > > |
From: Alain C. <ala...@ag...> - 2015-07-10 20:06:09
|
Hello Mark, The browser debugger says that the response is empty... but it can be viewed in a different tab! I have to check the HTTP request... --Alain Le 10/07/2015 21:57, Mark Seaborne a écrit : > <htmlxmlns="http://www.w3.org/1999/xhtml" > xmlns:nr="http://www.nearby.org.uk" > xmlns:xf="http://www.w3.org/2002/xforms" > xmlns:ev="http://www.w3.org/2001/xml-events"> > > <head> > <title>Test</title> > > > <xf:modelid="theModel"> > <xf:instanceid="var"xmlns=""> > <doc> > <!--co-ordinates--> > <convert> > <key>37d6c2c0832f6b</key> > <p>303743,967206</p> > <in>gr-osgb36</in> > <need>gr10-osgb36</need> > <output>sxml</output> > </convert> > </doc> > </xf:instance> > > <xf:instanceid="gridRef"> > <convertxmlns="http://www.nearby.org.uk"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://www.nearby.org.uk/api/convert.xsd"> > <infohref="http://www.nearby.org.uk/api/convert-help.php"/> > <input> > <endatum="osgb36"e="302872"n="966758"/> > </input> > <output> > <gazcountry="United Kingdom"/> > <gr10datum="osgb36"gr10="ND 02872 66758"/> > <grdatum="osgb36"gr="ND0287266758"digits="10"/> > <lldatum="wgs84"lat="58.577939885331"long="-3.6719623952203"/> > </output> > </convert> > </xf:instance> > > > <xf:submissionid="getGridRef" > method="get" > replace="instance" > instance="gridRef" > ref="instance('var')/convert" > serialization="application/x-www-form-urlencoded" > resource="http://www.nearby.org.uk/api/convert.php"> > <xf:actionev:event="xforms-submit-error"> > <xf:messagelevel="modal">'<xf:outputvalue="instance('var')/convert/p"/>' > getGridRef didn't work</xf:message> > </xf:action> > </xf:submission> > > </xf:model> > > </head> > > <body> > <xf:inputref="instance('var')/convert/p"> > <xf:label>EPSG:27700 co-ordinates</xf:label> > </xf:input> > > <xf:submitsubmission="getGridRef"> > <xf:label>Get Ordnance Survey Grid Reference</xf:label> > </xf:submit> > > <p>OS Grid Reference is: > <xf:outputref="instance('gridRef')/nr:output/nr:gr10/@gr10"/></p> > </body> > </html> |
From: Alain C. <ala...@ag...> - 2015-07-10 20:17:58
|
As I suspected, this is a cross-domain restriction. I have not been looking at this for a long time and it has surely been improved (https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS)! --Alain Le 10/07/2015 22:05, Alain Couthures a écrit : > Hello Mark, > > The browser debugger says that the response is empty... but it can be > viewed in a different tab! > > I have to check the HTTP request... > > --Alain > > Le 10/07/2015 21:57, Mark Seaborne a écrit : >> <htmlxmlns="http://www.w3.org/1999/xhtml" >> xmlns:nr="http://www.nearby.org.uk" >> xmlns:xf="http://www.w3.org/2002/xforms" >> xmlns:ev="http://www.w3.org/2001/xml-events"> >> >> <head> >> <title>Test</title> >> >> >> <xf:modelid="theModel"> >> <xf:instanceid="var"xmlns=""> >> <doc> >> <!--co-ordinates--> >> <convert> >> <key>37d6c2c0832f6b</key> >> <p>303743,967206</p> >> <in>gr-osgb36</in> >> <need>gr10-osgb36</need> >> <output>sxml</output> >> </convert> >> </doc> >> </xf:instance> >> >> <xf:instanceid="gridRef"> >> <convertxmlns="http://www.nearby.org.uk"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://www.nearby.org.uk/api/convert.xsd"> >> <infohref="http://www.nearby.org.uk/api/convert-help.php"/> >> <input> >> <endatum="osgb36"e="302872"n="966758"/> >> </input> >> <output> >> <gazcountry="United Kingdom"/> >> <gr10datum="osgb36"gr10="ND 02872 66758"/> >> <grdatum="osgb36"gr="ND0287266758"digits="10"/> >> <lldatum="wgs84"lat="58.577939885331"long="-3.6719623952203"/> >> </output> >> </convert> >> </xf:instance> >> >> >> <xf:submissionid="getGridRef" >> method="get" >> replace="instance" >> instance="gridRef" >> ref="instance('var')/convert" >> serialization="application/x-www-form-urlencoded" >> resource="http://www.nearby.org.uk/api/convert.php"> >> <xf:actionev:event="xforms-submit-error"> >> <xf:messagelevel="modal">'<xf:outputvalue="instance('var')/convert/p"/>' >> getGridRef didn't work</xf:message> >> </xf:action> >> </xf:submission> >> >> </xf:model> >> >> </head> >> >> <body> >> <xf:inputref="instance('var')/convert/p"> >> <xf:label>EPSG:27700 co-ordinates</xf:label> >> </xf:input> >> >> <xf:submitsubmission="getGridRef"> >> <xf:label>Get Ordnance Survey Grid Reference</xf:label> >> </xf:submit> >> >> <p>OS Grid Reference is: >> <xf:outputref="instance('gridRef')/nr:output/nr:gr10/@gr10"/></p> >> </body> >> </html> > > > > ------------------------------------------------------------------------------ > Don't Limit Your Business. Reach for the Cloud. > GigeNET's Cloud Solutions provide you with the tools and support that > you need to offload your IT needs and focus on growing your business. > Configured For All Businesses. Start Your Cloud Today. > https://www.gigenetcloud.com/ > > > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: Alain C. <ala...@ag...> - 2015-07-10 20:27:08
|
Mark, When compared with a dbpedia.org response, there should be response headers such as: Access-Control-Allow-Origin: http://localhost Access-Control-Allow-Credentials: true Access-Control-Expose-Headers: Content-Type Access-Control-Allow-Headers: Accept, Authorization, Slug, Link, Origin, Content-type The web administrator for www.nearby.org.uk should be contacted for these headers to be added, don't you think? Thank you for your feedback! --Alain Le 10/07/2015 22:17, Alain Couthures a écrit : > As I suspected, this is a cross-domain restriction. I have not been > looking at this for a long time and it has surely been improved > (https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS)! > > --Alain > > Le 10/07/2015 22:05, Alain Couthures a écrit : >> Hello Mark, >> >> The browser debugger says that the response is empty... but it can be >> viewed in a different tab! >> >> I have to check the HTTP request... >> >> --Alain >> >> Le 10/07/2015 21:57, Mark Seaborne a écrit : >>> <htmlxmlns="http://www.w3.org/1999/xhtml" >>> xmlns:nr="http://www.nearby.org.uk" >>> xmlns:xf="http://www.w3.org/2002/xforms" >>> xmlns:ev="http://www.w3.org/2001/xml-events"> >>> >>> <head> >>> <title>Test</title> >>> >>> >>> <xf:modelid="theModel"> >>> <xf:instanceid="var"xmlns=""> >>> <doc> >>> <!--co-ordinates--> >>> <convert> >>> <key>37d6c2c0832f6b</key> >>> <p>303743,967206</p> >>> <in>gr-osgb36</in> >>> <need>gr10-osgb36</need> >>> <output>sxml</output> >>> </convert> >>> </doc> >>> </xf:instance> >>> >>> <xf:instanceid="gridRef"> >>> <convertxmlns="http://www.nearby.org.uk"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://www.nearby.org.uk/api/convert.xsd"> >>> <infohref="http://www.nearby.org.uk/api/convert-help.php"/> >>> <input> >>> <endatum="osgb36"e="302872"n="966758"/> >>> </input> >>> <output> >>> <gazcountry="United Kingdom"/> >>> <gr10datum="osgb36"gr10="ND 02872 66758"/> >>> <grdatum="osgb36"gr="ND0287266758"digits="10"/> >>> <lldatum="wgs84"lat="58.577939885331"long="-3.6719623952203"/> >>> </output> >>> </convert> >>> </xf:instance> >>> >>> >>> <xf:submissionid="getGridRef" >>> method="get" >>> replace="instance" >>> instance="gridRef" >>> ref="instance('var')/convert" >>> serialization="application/x-www-form-urlencoded" >>> resource="http://www.nearby.org.uk/api/convert.php"> >>> <xf:actionev:event="xforms-submit-error"> >>> <xf:messagelevel="modal">'<xf:outputvalue="instance('var')/convert/p"/>' >>> getGridRef didn't work</xf:message> >>> </xf:action> >>> </xf:submission> >>> >>> </xf:model> >>> >>> </head> >>> >>> <body> >>> <xf:inputref="instance('var')/convert/p"> >>> <xf:label>EPSG:27700 co-ordinates</xf:label> >>> </xf:input> >>> >>> <xf:submitsubmission="getGridRef"> >>> <xf:label>Get Ordnance Survey Grid Reference</xf:label> >>> </xf:submit> >>> >>> <p>OS Grid Reference is: >>> <xf:outputref="instance('gridRef')/nr:output/nr:gr10/@gr10"/></p> >>> </body> >>> </html> >> >> >> >> ------------------------------------------------------------------------------ >> Don't Limit Your Business. Reach for the Cloud. >> GigeNET's Cloud Solutions provide you with the tools and support that >> you need to offload your IT needs and focus on growing your business. >> Configured For All Businesses. Start Your Cloud Today. >> https://www.gigenetcloud.com/ >> >> >> _______________________________________________ >> Xsltforms-support mailing list >> Xsl...@li... >> https://lists.sourceforge.net/lists/listinfo/xsltforms-support > > > > ------------------------------------------------------------------------------ > Don't Limit Your Business. Reach for the Cloud. > GigeNET's Cloud Solutions provide you with the tools and support that > you need to offload your IT needs and focus on growing your business. > Configured For All Businesses. Start Your Cloud Today. > https://www.gigenetcloud.com/ > > > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: Mark S. <m_s...@ma...> - 2015-07-12 08:27:48
|
Hi Alain, Indeed, I will contact them to suggest they fix the headers. Thanks once again Alain for support well beyond the call of duty! Best wishes Mark > On 10 Jul 2015, at 22:26, Alain Couthures <ala...@ag...> wrote: > > Mark, > > When compared with a dbpedia.org response, there should be response headers such as: > > Access-Control-Allow-Origin: http://localhost <http://localhost/> > Access-Control-Allow-Credentials: true > Access-Control-Expose-Headers: Content-Type > Access-Control-Allow-Headers: Accept, Authorization, Slug, Link, Origin, Content-type > > The web administrator for www.nearby.org.uk <http://www.nearby.org.uk/> should be contacted for these headers to be added, don't you think? > > Thank you for your feedback! > > --Alain > > Le 10/07/2015 22:17, Alain Couthures a écrit : >> As I suspected, this is a cross-domain restriction. I have not been looking at this for a long time and it has surely been improved ( <https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS>https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS <https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS>)! >> >> --Alain >> >> Le 10/07/2015 22:05, Alain Couthures a écrit : >>> Hello Mark, >>> >>> The browser debugger says that the response is empty... but it can be viewed in a different tab! >>> >>> I have to check the HTTP request... >>> >>> --Alain >>> >>> Le 10/07/2015 21:57, Mark Seaborne a écrit : >>>> <html xmlns=" <http://www.w3.org/1999/xhtml>http://www.w3.org/1999/xhtml <http://www.w3.org/1999/xhtml>" >>>> xmlns:nr=" <http://www.nearby.org.uk/>http://www.nearby.org.uk <http://www.nearby.org.uk/>" >>>> xmlns:xf=" <http://www.w3.org/2002/xforms>http://www.w3.org/2002/xforms <http://www.w3.org/2002/xforms>" >>>> xmlns:ev=" <http://www.w3.org/2001/xml-events>http://www.w3.org/2001/xml-events <http://www.w3.org/2001/xml-events>"> >>>> >>>> <head> >>>> <title>Test</title> >>>> >>>> >>>> <xf:model id="theModel"> >>>> <xf:instance id="var" xmlns=""> >>>> <doc> >>>> <!--co-ordinates--> >>>> <convert> >>>> <key>37d6c2c0832f6b</key> >>>> <p>303743,967206</p> >>>> <in>gr-osgb36</in> >>>> <need>gr10-osgb36</need> >>>> <output>sxml</output> >>>> </convert> >>>> </doc> >>>> </xf:instance> >>>> >>>> <xf:instance id="gridRef"> >>>> <convert xmlns=" <http://www.nearby.org.uk/>http://www.nearby.org.uk <http://www.nearby.org.uk/>" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance>" xsi:schemaLocation=" <http://www.nearby.org.uk/api/convert.xsd>http://www.nearby.org.uk/api/convert.xsd <http://www.nearby.org.uk/api/convert.xsd>"> >>>> <info href=" <http://www.nearby.org.uk/api/convert-help.php>http://www.nearby.org.uk/api/convert-help.php <http://www.nearby.org.uk/api/convert-help.php>"/> >>>> <input> >>>> <en datum="osgb36" e="302872" n="966758"/> >>>> </input> >>>> <output> >>>> <gaz country="United Kingdom"/> >>>> <gr10 datum="osgb36" gr10="ND 02872 66758"/> >>>> <gr datum="osgb36" gr="ND0287266758" digits="10"/> >>>> <ll datum="wgs84" lat="58.577939885331" long="-3.6719623952203"/> >>>> </output> >>>> </convert> >>>> </xf:instance> >>>> >>>> >>>> <xf:submission id="getGridRef" >>>> method="get" >>>> replace="instance" >>>> instance="gridRef" >>>> ref="instance('var')/convert" >>>> serialization="application/x-www-form-urlencoded" >>>> resource=" <http://www.nearby.org.uk/api/convert.php>http://www.nearby.org.uk/api/convert.php <http://www.nearby.org.uk/api/convert.php>"> >>>> <xf:action ev:event="xforms-submit-error"> >>>> <xf:message level="modal">'<xf:output value="instance('var')/convert/p"/>' getGridRef didn't work</xf:message> >>>> </xf:action> >>>> </xf:submission> >>>> >>>> </xf:model> >>>> >>>> </head> >>>> >>>> <body> >>>> <xf:input ref="instance('var')/convert/p"> >>>> <xf:label>EPSG:27700 co-ordinates</xf:label> >>>> </xf:input> >>>> >>>> <xf:submit submission="getGridRef"> >>>> <xf:label>Get Ordnance Survey Grid Reference</xf:label> >>>> </xf:submit> >>>> >>>> <p>OS Grid Reference is: <xf:output ref="instance('gridRef')/nr:output/nr:gr10/@gr10"/></p> >>>> </body> >>>> </html> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Don't Limit Your Business. Reach for the Cloud. >>> GigeNET's Cloud Solutions provide you with the tools and support that >>> you need to offload your IT needs and focus on growing your business. >>> Configured For All Businesses. Start Your Cloud Today. >>> https://www.gigenetcloud.com/ <https://www.gigenetcloud.com/> >>> >>> _______________________________________________ >>> Xsltforms-support mailing list >>> Xsl...@li... <mailto:Xsl...@li...> >>> https://lists.sourceforge.net/lists/listinfo/xsltforms-support <https://lists.sourceforge.net/lists/listinfo/xsltforms-support> >> >> >> >> ------------------------------------------------------------------------------ >> Don't Limit Your Business. Reach for the Cloud. >> GigeNET's Cloud Solutions provide you with the tools and support that >> you need to offload your IT needs and focus on growing your business. >> Configured For All Businesses. Start Your Cloud Today. >> https://www.gigenetcloud.com/ <https://www.gigenetcloud.com/> >> >> _______________________________________________ >> Xsltforms-support mailing list >> Xsl...@li... <mailto:Xsl...@li...> >> https://lists.sourceforge.net/lists/listinfo/xsltforms-support <https://lists.sourceforge.net/lists/listinfo/xsltforms-support> > |