Calling 3rd-party API using ixsl:schedule-action/@http-request
The task I have is to update bibliographic references in an XML document with identifiers sourced from third party databases (e.g. CrossRef DOIs).
I thought Saxon-JS could be used to achieve this using just XSLT, by
- building an HTTP request map from a bib reference
- using ixsl:schedule-action/@http-request, parsing the response,
- incorporating the result back into the bib reference.
But when I attempt this, I get an error in the browser "Cross-Origin Request Blocked". Because the HTTP request feature is only available in Saxon-JS, I have to run the code (attached) in a browser, which spots that the server running the code is trying to scrape data from another server, and blocks this action.
So my questions are:
- Have I missed a parameter of some kind that would make this work?
- Is it feasible to include ixsl:schedule-action and HTTP requests in Saxon-EE? (so I'm not tied to using a browser for this)
- Or is the COR security issue a fundamental obstacle to making this work?
Please register to edit this issue