Skip to content
This repository has been archived by the owner on Jun 6, 2019. It is now read-only.

Add sample files #14

Closed
Klortho opened this issue Jul 30, 2015 · 5 comments
Closed

Add sample files #14

Klortho opened this issue Jul 30, 2015 · 5 comments

Comments

@Klortho
Copy link
Member

Klortho commented Jul 30, 2015

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

@hubgit
Copy link
Member

hubgit commented Aug 5, 2015

If this was a couple of files from each publisher, it could be integrated with #8 and used for running the tests.

@hubgit
Copy link
Member

hubgit commented Aug 5, 2015

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

@Klortho
Copy link
Member Author

Klortho commented Aug 12, 2015

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
Copy link
Member

hubgit commented Aug 12, 2015

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
Copy link
Member Author

Klortho commented Aug 12, 2015

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

@Klortho Klortho closed this as completed Aug 12, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants