JATS4R / validator

JATS for Reuse client-side validator
Other
5 stars 2 forks source link

Add sample files #14

Closed Klortho closed 9 years ago

Klortho commented 9 years ago

The validator page should have links to a couple of sample files that users can download, in order to try it out.

hubgit commented 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.

hubgit commented 9 years ago

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.

Klortho commented 9 years ago

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.

hubgit commented 9 years ago

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).

Klortho commented 9 years ago

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/.