Skip to content

Commit

Permalink
RP - ignore Editor affs in aff-has-wrap-no-id
Browse files Browse the repository at this point in the history
  • Loading branch information
fred-atherden committed Nov 26, 2024
1 parent 794e62e commit 7030d29
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/rp-schematron-base.sch
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@
role="warning"
id="aff-no-wrap">Affiliation doesn't have an institution-wrap element (the container for institution name and id). Is that correct?</report>

<report test="institution-wrap[not(institution-id)]"
<report test="institution-wrap[not(institution-id)] and not(ancestor::contrib-group[@content-type='section']) and not(ancestor::sub-article)"
role="error"
id="aff-has-wrap-no-id">aff contains institution-wrap, but that institution-wrap does not have a child institution-id. institution-wrap should only be used when there is an institution-id for the institution.</report>

Expand Down
2 changes: 1 addition & 1 deletion src/rp-schematron.sch
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@

<report test="ancestor::article/journal-meta/lower-case(journal-id[1])='elife' and count(institution-wrap) = 0" role="warning" id="aff-no-wrap">[aff-no-wrap] Affiliation doesn't have an institution-wrap element (the container for institution name and id). Is that correct?</report>

<report test="institution-wrap[not(institution-id)]" role="error" id="aff-has-wrap-no-id">[aff-has-wrap-no-id] aff contains institution-wrap, but that institution-wrap does not have a child institution-id. institution-wrap should only be used when there is an institution-id for the institution.</report>
<report test="institution-wrap[not(institution-id)] and not(ancestor::contrib-group[@content-type='section']) and not(ancestor::sub-article)" role="error" id="aff-has-wrap-no-id">[aff-has-wrap-no-id] aff contains institution-wrap, but that institution-wrap does not have a child institution-id. institution-wrap should only be used when there is an institution-id for the institution.</report>

<report test="institution-wrap[not(institution)]" role="error" id="aff-has-wrap-no-inst">[aff-has-wrap-no-inst] aff contains institution-wrap, but that institution-wrap does not have a child institution.</report>

Expand Down
4 changes: 2 additions & 2 deletions src/rp-schematron.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -2013,8 +2013,8 @@
</svrl:successful-report>
</xsl:if>
<!--REPORT error-->
<xsl:if test="institution-wrap[not(institution-id)]">
<svrl:successful-report xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="institution-wrap[not(institution-id)]">
<xsl:if test="institution-wrap[not(institution-id)] and not(ancestor::contrib-group[@content-type='section']) and not(ancestor::sub-article)">
<svrl:successful-report xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="institution-wrap[not(institution-id)] and not(ancestor::contrib-group[@content-type='section']) and not(ancestor::sub-article)">
<xsl:attribute name="id">aff-has-wrap-no-id</xsl:attribute>
<xsl:attribute name="role">error</xsl:attribute>
<xsl:attribute name="location">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
<pattern id="affiliation-checks-pattern">
<rule context="aff" id="affiliation-checks">
<let name="country-count" value="count(descendant::country)"/>
<report test="institution-wrap[not(institution-id)]" role="error" id="aff-has-wrap-no-id">[aff-has-wrap-no-id] aff contains institution-wrap, but that institution-wrap does not have a child institution-id. institution-wrap should only be used when there is an institution-id for the institution.</report>
<report test="institution-wrap[not(institution-id)] and not(ancestor::contrib-group[@content-type='section']) and not(ancestor::sub-article)" role="error" id="aff-has-wrap-no-id">[aff-has-wrap-no-id] aff contains institution-wrap, but that institution-wrap does not have a child institution-id. institution-wrap should only be used when there is an institution-id for the institution.</report>
</rule>
</pattern>
<pattern id="root-pattern">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?oxygen SCHSchema="aff-has-wrap-no-id.sch"?>
<!--Context: aff
Test: report institution-wrap[not(institution-id)]
Test: report institution-wrap[not(institution-id)] and not(ancestor::contrib-group[@content-type='section']) and not(ancestor::sub-article)
Message: aff contains institution-wrap, but that institution-wrap does not have a child institution-id. institution-wrap should only be used when there is an institution-id for the institution. -->
<root xmlns:ali="http://www.niso.org/schemas/ali/1.0/" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">
<article>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?oxygen SCHSchema="aff-has-wrap-no-id.sch"?>
<!--Context: aff
Test: report institution-wrap[not(institution-id)]
Test: report institution-wrap[not(institution-id)] and not(ancestor::contrib-group[@content-type='section']) and not(ancestor::sub-article)
Message: aff contains institution-wrap, but that institution-wrap does not have a child institution-id. institution-wrap should only be used when there is an institution-id for the institution. -->
<root xmlns:ali="http://www.niso.org/schemas/ali/1.0/" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">
<article>
Expand Down
2 changes: 1 addition & 1 deletion test/xspec/rp-schematron.sch
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@

<report test="ancestor::article/journal-meta/lower-case(journal-id[1])='elife' and count(institution-wrap) = 0" role="warning" id="aff-no-wrap">Affiliation doesn't have an institution-wrap element (the container for institution name and id). Is that correct?</report>

<report test="institution-wrap[not(institution-id)]" role="error" id="aff-has-wrap-no-id">aff contains institution-wrap, but that institution-wrap does not have a child institution-id. institution-wrap should only be used when there is an institution-id for the institution.</report>
<report test="institution-wrap[not(institution-id)] and not(ancestor::contrib-group[@content-type='section']) and not(ancestor::sub-article)" role="error" id="aff-has-wrap-no-id">aff contains institution-wrap, but that institution-wrap does not have a child institution-id. institution-wrap should only be used when there is an institution-id for the institution.</report>

<report test="institution-wrap[not(institution)]" role="error" id="aff-has-wrap-no-inst">aff contains institution-wrap, but that institution-wrap does not have a child institution.</report>

Expand Down

0 comments on commit 7030d29

Please sign in to comment.