JATS4R / jats-schematrons

JATS4R Schematrons
https://jats-schematrons.vercel.app/
8 stars 4 forks source link

Add preprint citations #14

Closed fred-atherden closed 4 years ago

fred-atherden commented 4 years ago

Added tests from the latest preprint recs

vercel[bot] commented 4 years ago

This pull request is being automatically deployed with Vercel (learn more). To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/jats4r/jats-schematrons/7hwjbh6kg ✅ Preview: https://jats-schematrons-git-fork-fatherden-elife-preprint-citations.jats4r.vercel.app

hubgit commented 4 years ago

The validator should be updated with these changes now.

fred-atherden commented 4 years ago

Thanks @hubgit - just tested and seeing some discrepancies.

When validating preprint-test.xml I would expect there to be 6 errors and 1 warning, but in the JSON from the validator I'm only seeing 3 errors and 1 warning.

Also the tests have <name/> and <value-of/> elements in their messages but these are not carried over in the output of the validator:

I can rewrite the tests to not include these if we don't expect to support this kind of thing.

fred-atherden commented 4 years ago

Also, a separate issue, when I validate kwd-test.xml i see this in the output:

"ignored": [
      {
        "assertionId": "",
        "context": "*[kwd-group]",
        "errorMessage": {
          "ignored": true,
          "errorMessage": "XPath parse error"
        },
        "patternId": "kwd-warnings",
        "simplifiedTest": null,
        "test": "$vanilla-kwd-group-count le 1",
        "type": "warning"
      }
    ],

I take it it's the let variable in the respective test which isn't being supported?

<let name="vanilla-kwd-group-count" value="count(kwd-group[not(@xml:lang) and not(@kwd-group-type)])"/>

I can rewrite the test if this is expected.

hubgit commented 4 years ago

Apologies, I updated the wrong repository - try again now at either https://jats-validator.onrender.com/ or https://validator.jats4r.org/ and you should see the expected results (although they're all shown as warnings rather than errors).

fred-atherden commented 4 years ago

Looks good, thanks :+1: