Closed Klortho closed 9 years ago
If this was a couple of files from each publisher, it could be integrated with https://github.com/JATS4R/validator/issues/8 and used for running the tests.
In fact, it would be even better if it was a couple of real article URLs from each publisher - then the validator could ensure that the XML files are served correctly (content negotiation in response to Accept: application/jats+xml;q=1, application/xml
and CORS Access-Control-Allow-Origin: *
headers).
e.g.
curl --head --location --header 'Accept: application/jats+xml;q=1, application/xml' https://peerj.com/articles/1000
curl --head --location --header 'Accept: application/jats+xml;q=1, application/xml' http://elifesciences.org/content/4/e07025
I implemented the feature whereby the validator can load from URLs. As I mentioned in the email, see it at http://jats4r.org/test/validator/. It sets the accept header per your specification, and can download from PeerJ, but not elife -- that's expected right? I haven't looked into it, but I suspect elife isn't setting CORS headers.
We still need a good set of example articles, before I deploy this to the main validator.
I haven't looked into it, but I suspect elife isn't setting CORS headers.
That's exactly right, so you might want to either host a local copy of the eLife XML file or display a warning if the CORS header isn't set for the given URL (or both).
Okay, I added a PeerJ, a PLoS One, and an eLife article to the repo. I made some more tweaks to the "sample articles" pull-down, and went ahead and deployed everything to the main validator URL: http://jats4r.org/validator/.
The validator page should have links to a couple of sample files that users can download, in order to try it out.