Skip to content

Commit

Permalink
Fix: https in niso CRediT URLs (#26)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: Alf Eaton <[email protected]>
  • Loading branch information
fred-atherden and hubgit authored Aug 19, 2023
1 parent f8f8f4b commit 768cb66
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 37 deletions.
4 changes: 2 additions & 2 deletions schematrons/1.0/credit-errors.sch
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
<let name="vocab-term-id" value="lower-case(@vocab-term-identifier)"/>
<let name="credit-role" value="$credit-roles//*:item[(@term = $vocab-term) or (@uri = $vocab-term-id)]"/>

<assert test="@vocab-identifier='http://credit.niso.org/'" role="error">
A CRediT taxonomy role must have a @vocab-identifier whose value is http://credit.niso.org/.
<assert test="@vocab-identifier='https://credit.niso.org/'" role="error">
A CRediT taxonomy role must have a @vocab-identifier whose value is https://credit.niso.org/.
</assert>

<report test="not(@vocab-term-identifier) or ((count($credit-role) = 1) and ($vocab-term-id != $credit-role/@uri))" role="error">
Expand Down
28 changes: 14 additions & 14 deletions schematrons/1.0/credit-roles.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<credit-roles>
<item term="Conceptualization" normalized-term="conceptualization" uri="http://credit.niso.org/contributor-roles/conceptualization/"/>
<item term="Data curation" normalized-term="datacuration" uri="http://credit.niso.org/contributor-roles/data-curation/"/>
<item term="Formal Analysis" normalized-term="formalanalysis" uri="http://credit.niso.org/contributor-roles/formal-analysis/"/>
<item term="Funding acquisition" normalized-term="fundingacquisition" uri="http://credit.niso.org/contributor-roles/funding-acquisition/"/>
<item term="Investigation" normalized-term="investigation" uri="http://credit.niso.org/contributor-roles/investigation/"/>
<item term="Methodology" normalized-term="methodology" uri="http://credit.niso.org/contributor-roles/methodology/"/>
<item term="Project administration" normalized-term="projectadministration" uri="http://credit.niso.org/contributor-roles/project-administration/"/>
<item term="Resources" normalized-term="resources" uri="http://credit.niso.org/contributor-roles/resources/"/>
<item term="Software" normalized-term="software" uri="http://credit.niso.org/contributor-roles/software/"/>
<item term="Supervision" normalized-term="supervision" uri="http://credit.niso.org/contributor-roles/supervision/"/>
<item term="Validation" normalized-term="validation" uri="http://credit.niso.org/contributor-roles/validation/"/>
<item term="Visualization" normalized-term="visualization" uri="http://credit.niso.org/contributor-roles/visualization/"/>
<item term="Writing – original draft" normalized-term="writing–originaldraft" uri="http://credit.niso.org/contributor-roles/writing-original-draft/"/>
<item term="Writing – review &amp; editing" normalized-term="writing–review&amp;editing" uri="http://credit.niso.org/contributor-roles/writing-review-editing/"/>
<item term="Conceptualization" normalized-term="conceptualization" uri="https://credit.niso.org/contributor-roles/conceptualization/"/>
<item term="Data curation" normalized-term="datacuration" uri="https://credit.niso.org/contributor-roles/data-curation/"/>
<item term="Formal Analysis" normalized-term="formalanalysis" uri="https://credit.niso.org/contributor-roles/formal-analysis/"/>
<item term="Funding acquisition" normalized-term="fundingacquisition" uri="https://credit.niso.org/contributor-roles/funding-acquisition/"/>
<item term="Investigation" normalized-term="investigation" uri="https://credit.niso.org/contributor-roles/investigation/"/>
<item term="Methodology" normalized-term="methodology" uri="https://credit.niso.org/contributor-roles/methodology/"/>
<item term="Project administration" normalized-term="projectadministration" uri="https://credit.niso.org/contributor-roles/project-administration/"/>
<item term="Resources" normalized-term="resources" uri="https://credit.niso.org/contributor-roles/resources/"/>
<item term="Software" normalized-term="software" uri="https://credit.niso.org/contributor-roles/software/"/>
<item term="Supervision" normalized-term="supervision" uri="https://credit.niso.org/contributor-roles/supervision/"/>
<item term="Validation" normalized-term="validation" uri="https://credit.niso.org/contributor-roles/validation/"/>
<item term="Visualization" normalized-term="visualization" uri="https://credit.niso.org/contributor-roles/visualization/"/>
<item term="Writing – original draft" normalized-term="writing–originaldraft" uri="https://credit.niso.org/contributor-roles/writing-original-draft/"/>
<item term="Writing – review &amp; editing" normalized-term="writing–review&amp;editing" uri="https://credit.niso.org/contributor-roles/writing-review-editing/"/>
</credit-roles>
2 changes: 1 addition & 1 deletion schematrons/1.0/credit-warnings.sch
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<let name="normalized-text" value="replace(replace(lower-case(.),'[—–-]','–'),'\s','')"/>

<report test="some $item in $credit-roles//*:item satisfies $item/@normalized-term = $normalized-text" role="warning">
A CRediT taxonomy role should have the attributes vocab="credit" and vocab-identifier="http://credit.niso.org/", as well as the following attributes which correspond to a specific CRediT taxonomy term: vocab-term (whose value should possibly be '<value-of select="$credit-roles//*:item[@normalized-term = $normalized-text]/@term"/>'), and vocab-term-identifier (whose value should possibly be '<value-of select="$credit-roles//*:item[@normalized-term = $normalized-text]/@uri"/>').
A CRediT taxonomy role should have the attributes vocab="credit" and vocab-identifier="https://credit.niso.org/", as well as the following attributes which correspond to a specific CRediT taxonomy term: vocab-term (whose value should possibly be '<value-of select="$credit-roles//*:item[@normalized-term = $normalized-text]/@term"/>'), and vocab-term-identifier (whose value should possibly be '<value-of select="$credit-roles//*:item[@normalized-term = $normalized-text]/@uri"/>').
</report>
</rule>

Expand Down
26 changes: 13 additions & 13 deletions testfiles/credit-test1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,30 @@
<article-meta>
<contrib-group>
<contrib contrib-type="author">
<role vocab="credit" vocab-identifier="http://credit.niso.org/" vocab-term="Writing – original draft" vocab-term-identifier="http://credit.niso.org/contributor-roles/writing-original-draft/">Writing – Original draft</role>
<role vocab="credit" vocab-identifier="http://credit.niso.org/" vocab-term="Writing – original draft" vocab-term-identifier="http://credit.niso.org/contributor-roles/writing-original-draft/">Writing</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Writing – original draft" vocab-term-identifier="https://credit.niso.org/contributor-roles/writing-original-draft/">Writing – Original draft</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Writing – original draft" vocab-term-identifier="https://credit.niso.org/contributor-roles/writing-original-draft/">Writing</role>
<!--
Expect error: A CRediT taxonomy role must have a @vocab-term, whose value is a specific CRediT taxonomy term, and a @vocab-term-identifier, whose value is the URL for that corresponding CRediT term. Either the @vocab-term - Writing – original draft - is incorrect and should be Data curation, or the @vocab-term-identifier - http://credit.niso.org/contributor-roles/data-curation/ - is incorrect and should be http://credit.niso.org/contributor-roles/writing-original-draft/.
Expect error: A CRediT taxonomy role must have a @vocab-term, whose value is a specific CRediT taxonomy term, and a @vocab-term-identifier, whose value is the URL for that corresponding CRediT term. Either the @vocab-term - Writing – original draft - is incorrect and should be Data curation, or the @vocab-term-identifier - https://credit.niso.org/contributor-roles/data-curation/ - is incorrect and should be https://credit.niso.org/contributor-roles/writing-original-draft/.
-->
<role vocab="credit" vocab-identifier="http://credit.niso.org/" vocab-term="Writing – original draft" vocab-term-identifier="http://credit.niso.org/contributor-roles/data-curation/">Data curation</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Writing – original draft" vocab-term-identifier="https://credit.niso.org/contributor-roles/data-curation/">Data curation</role>
<!--
Expect error: A CRediT taxonomy role must have a @vocab-identifier whose value is http://credit.niso.org/.
Expect error: A CRediT taxonomy role must have a @vocab-identifier whose value is https://credit.niso.org/.
-->
<role vocab="credit" vocab-term="Methodology" vocab-term-identifier="http://credit.niso.org/contributor-roles/methodology/">Methodology</role>
<role vocab="credit" vocab-term="Methodology" vocab-term-identifier="https://credit.niso.org/contributor-roles/methodology/">Methodology</role>
<!--
Expect error: A CRediT taxonomy role must have a @vocab-term, the value of which should be one of the CRediT terms - in this case Methodology (based on the attributes of this role element).
-->
<role vocab="credit" vocab-identifier="http://credit.niso.org/" vocab-term-identifier="http://credit.niso.org/contributor-roles/methodology/">Methodology</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term-identifier="https://credit.niso.org/contributor-roles/methodology/">Methodology</role>
<!--
Expect error: A CRediT taxonomy role must have a @vocab-term-identifier, the value of which should be the URL of the specific CRediT term. In this case http://credit.niso.org/contributor-roles/methodology/ (based on the @vocab-term of this role element).
Expect error: A CRediT taxonomy role must have a @vocab-term-identifier, the value of which should be the URL of the specific CRediT term. In this case https://credit.niso.org/contributor-roles/methodology/ (based on the @vocab-term of this role element).
-->
<role vocab="credit" vocab-identifier="http://credit.niso.org/" vocab-term="Methodology">Methodology</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Methodology">Methodology</role>
<!--
Expect error: A CRediT taxonomy role must have a @vocab whose value is 'credit'.
-->
<role vocab-identifier="http://credit.niso.org/" vocab-term="Writing – original draft" vocab-term-identifier="http://credit.niso.org/contributor-roles/writing-original-draft/">Writing – Original draft</role>
<role vocab-identifier="https://credit.niso.org/" vocab-term="Writing – original draft" vocab-term-identifier="https://credit.niso.org/contributor-roles/writing-original-draft/">Writing – Original draft</role>
<!--
Expect warning: A CRediT taxonomy role should have the attributes vocab="credit" and vocab-identifier="http://credit.niso.org/", as well as the following attributes which correspond to a specific CRediT taxonomy term: vocab-term (whose value should possibly be 'Writing – original draft'), and vocab-term-identifier (whose value should possibly be 'http://credit.niso.org/contributor-roles/writing-original-draft/').
Expect warning: A CRediT taxonomy role should have the attributes vocab="credit" and vocab-identifier="https://credit.niso.org/", as well as the following attributes which correspond to a specific CRediT taxonomy term: vocab-term (whose value should possibly be 'Writing – original draft'), and vocab-term-identifier (whose value should possibly be 'https://credit.niso.org/contributor-roles/writing-original-draft/').
-->
<role>Writing – Original draft</role>
</contrib>
Expand All @@ -37,9 +37,9 @@
<given-names>Patrick</given-names>
<surname>McCaw</surname>
</string-name>
<role vocab="credit" vocab-identifier="http://credit.niso.org/"
<role vocab="credit" vocab-identifier="https://credit.niso.org/"
vocab-term="Investigation"
vocab-term-identifier="http://credit.niso.org/contributor-roles/investigation/"
vocab-term-identifier="https://credit.niso.org/contributor-roles/investigation/"
>Data Collection</role>
</contrib>
</contrib-group>
Expand Down
14 changes: 7 additions & 7 deletions testfiles/credit-test2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@
<surname>Leonard</surname>
<given-names>Kawhi</given-names>
</string-name>
<role content-type="http://credit.niso.org/contributor-roles/conceptualization/">Conceptualization</role>
<role content-type="https://credit.niso.org/contributor-roles/conceptualization/">Conceptualization</role>
<!--
Expect error: A CRediT taxonomy role should have a @content-type, whose value should be one of the specific CRediT term URLs. http://credit.niso.org/contributor-roles/ is not one of http://credit.niso.org/contributor-roles/conceptualization/, http://credit.niso.org/contributor-roles/data-curation/, http://credit.niso.org/contributor-roles/formal-analysis/, http://credit.niso.org/contributor-roles/funding-acquisition/, http://credit.niso.org/contributor-roles/investigation/, http://credit.niso.org/contributor-roles/methodology/, http://credit.niso.org/contributor-roles/project-administration/, http://credit.niso.org/contributor-roles/resources/, http://credit.niso.org/contributor-roles/software/, http://credit.niso.org/contributor-roles/supervision/, http://credit.niso.org/contributor-roles/validation/, http://credit.niso.org/contributor-roles/visualization/, http://credit.niso.org/contributor-roles/writing-original-draft/, http://credit.niso.org/contributor-roles/writing-review-editing/.
Expect error: A CRediT taxonomy role should have a @content-type, whose value should be one of the specific CRediT term URLs. https://credit.niso.org/contributor-roles/ is not one of https://credit.niso.org/contributor-roles/conceptualization/, https://credit.niso.org/contributor-roles/data-curation/, https://credit.niso.org/contributor-roles/formal-analysis/, https://credit.niso.org/contributor-roles/funding-acquisition/, https://credit.niso.org/contributor-roles/investigation/, https://credit.niso.org/contributor-roles/methodology/, https://credit.niso.org/contributor-roles/project-administration/, https://credit.niso.org/contributor-roles/resources/, https://credit.niso.org/contributor-roles/software/, https://credit.niso.org/contributor-roles/supervision/, https://credit.niso.org/contributor-roles/validation/, https://credit.niso.org/contributor-roles/visualization/, https://credit.niso.org/contributor-roles/writing-original-draft/, https://credit.niso.org/contributor-roles/writing-review-editing/.
-->
<role content-type="http://credit.niso.org/contributor-roles/">Data curation</role>
<role content-type="http://credit.niso.org/contributor-roles/formal-analysis/">Formal analysis</role>
<role content-type="http://credit.niso.org/contributor-roles/investigation/">Investigation</role>
<role content-type="http://credit.niso.org/contributor-roles/writing-original-draft/">Writing – original draft</role>
<role content-type="https://credit.niso.org/contributor-roles/">Data curation</role>
<role content-type="https://credit.niso.org/contributor-roles/formal-analysis/">Formal analysis</role>
<role content-type="https://credit.niso.org/contributor-roles/investigation/">Investigation</role>
<role content-type="https://credit.niso.org/contributor-roles/writing-original-draft/">Writing – original draft</role>
<!--
Expect warning: A CRediT taxonomy role should have a @content-type, whose value should be one of the specific CRediT term URLs. Based on the content of this element (Data curation), it should have a content-type="http://credit.niso.org/contributor-roles/data-curation/" attribute.
Expect warning: A CRediT taxonomy role should have a @content-type, whose value should be one of the specific CRediT term URLs. Based on the content of this element (Data curation), it should have a content-type="https://credit.niso.org/contributor-roles/data-curation/" attribute.
-->
<role>Data curation</role>
</contrib>
Expand Down

1 comment on commit 768cb66

@vercel
Copy link

@vercel vercel bot commented on 768cb66 Aug 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

jats-schematrons – ./

jats-schematrons-aea.vercel.app
jats-schematrons-git-master-aea.vercel.app
jats-schematrons.vercel.app

Please sign in to comment.