Tim,
Currently, XSLTForms is not interpreting media type correctly: the
response media type has to be analyzed instead of submission/@mediatype
which is there just for the request serialization. I tested adding the
overrideMimeType property to the request and the browser errors don't
occur anymore!
I will fix this as soon as possible.
Thanks!
--Alain
Le 10/07/2015 16:08, Tim Thompson a écrit :
Alain,
I'm testing XSLTForms on an Apache XAMPP server (though not yet with
SaxonHE9-4-0-7), and I had (another) question about browser errors.
Here's a Gist that shows a basic submission from XSLTForms to
DBpedia's SPARQL endpoint, using @replace="text" on the
<xf:submission> element:
https://gist.github.com/Timathom/176a1e6865215b00d544
This works beautifully, but in Firefox and IE 11, I am getting browser
errors on the XHR response.
Here is the HTTP response header in Firefox:
HTTP/1.1 200 OK
Date: Fri, 10 Jul 2015 13:26:30 GMT
Content-Type: application/ld+json
Content-Length: 7127
Connection: keep-alive
Server: Virtuoso/07.20.3214 (Linux) i686-generic-linux-glibc212-64 VDB
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
Expires: Fri, 17 Jul 2015 13:26:30 GMT
Cache-Control: max-age=604800
Accept-Ranges: bytes
Even though the server returns a Content-Type of
"application/ld+json," the browser still tries to parse it as XML.
Firefox throws this error (via Firebug):
XML Parsing Error: not well-formed Location:
moz-nullprincipal:{a25b11dd-9e4b-5f40-bb8b-b9415ed8d56e} Line Number
1, Column 1:
{ "@graph": [
^
IE 11 throws this error:
XML5619: Incorrect document syntax. Line: 1, Column 1
Chrome does not throw a (visible) error. I guess that these errors are
probably harmless, but is there any way to avoid them, and to prevent
the browser from trying to parse the response as XML when the XForms
submission has a @replace attribute value of "text" and the
Content-Type of the response is a non-XML format?
Thanks again!
Tim
--
Tim A. Thompson
Metadata Librarian (Spanish/Portuguese Specialty)
Princeton University Library
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/xsltforms-support