Skip to content

Commit

Permalink
Assessment keyword check changes
Browse files Browse the repository at this point in the history
  • Loading branch information
fred-atherden committed Feb 28, 2024
1 parent ae15aff commit 3437df1
Show file tree
Hide file tree
Showing 16 changed files with 1,455 additions and 21 deletions.
4 changes: 3 additions & 1 deletion src/dl-schematron.sch
Original file line number Diff line number Diff line change
Expand Up @@ -1491,8 +1491,10 @@
</rule></pattern><pattern id="ed-report-kwd-group-pattern"><rule context="sub-article[@article-type='editor-report']/front-stub/kwd-group" id="ed-report-kwd-group">

<assert test="@kwd-group-type=('claim-importance','evidence-strength')" role="error" flag="dl-ar" id="ed-report-kwd-group-1">kwd-group in <value-of select="parent::*/title-group/article-title"/> must have the attribute kwd-group-type with the value 'claim-importance' or 'evidence-strength'. This one does not.</assert>

<report test="@kwd-group-type='claim-importance' and count(kwd) gt 1" role="error" flag="dl-ar" id="ed-report-kwd-group-3"><value-of select="@kwd-group-type"/> type kwd-group has <value-of select="count(kwd)"/> keywords: <value-of select="string-join(kwd,'; ')"/>. This is not permitted, please check which single importance keyword should be used.</report>

<report test="@kwd-group-type=('claim-importance','evidence-strength') and count(kwd) gt 2" role="warning" flag="dl-ar" id="ed-report-kwd-group-2"><value-of select="@kwd-group-type"/> type kwd-group has <value-of select="count(kwd)"/> keywords: <value-of select="string-join(kwd,'; ')"/>. This is unusual, please check this is correct.</report>
<report test="@kwd-group-type='evidence-strength' and count(kwd) gt 1" role="warning" flag="dl-ar" id="ed-report-kwd-group-2"><value-of select="@kwd-group-type"/> type kwd-group has <value-of select="count(kwd)"/> keywords: <value-of select="string-join(kwd,'; ')"/>. This is unusual, please check this is correct.</report>

</rule></pattern><pattern id="ed-report-claim-kwds-pattern"><rule context="sub-article[@article-type='editor-report']/front-stub/kwd-group[@kwd-group-type='claim-importance']/kwd" id="ed-report-claim-kwds">
<let name="allowed-vals" value="('Landmark', 'Fundamental', 'Important', 'Valuable', 'Useful')"/>
Expand Down
24 changes: 22 additions & 2 deletions src/dl-schematron.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -2990,9 +2990,29 @@
</xsl:otherwise>
</xsl:choose>

<!--REPORT error-->
<xsl:if test="@kwd-group-type='claim-importance' and count(kwd) gt 1">
<svrl:successful-report xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@kwd-group-type='claim-importance' and count(kwd) gt 1">
<xsl:attribute name="id">ed-report-kwd-group-3</xsl:attribute>
<xsl:attribute name="flag">dl-ar</xsl:attribute>
<xsl:attribute name="role">error</xsl:attribute>
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>
<xsl:text/>
<xsl:value-of select="@kwd-group-type"/>
<xsl:text/> type kwd-group has <xsl:text/>
<xsl:value-of select="count(kwd)"/>
<xsl:text/> keywords: <xsl:text/>
<xsl:value-of select="string-join(kwd,'; ')"/>
<xsl:text/>. This is not permitted, please check which single importance keyword should be used.</svrl:text>
</svrl:successful-report>
</xsl:if>

<!--REPORT warning-->
<xsl:if test="@kwd-group-type=('claim-importance','evidence-strength') and count(kwd) gt 2">
<svrl:successful-report xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@kwd-group-type=('claim-importance','evidence-strength') and count(kwd) gt 2">
<xsl:if test="@kwd-group-type='evidence-strength' and count(kwd) gt 1">
<svrl:successful-report xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@kwd-group-type='evidence-strength' and count(kwd) gt 1">
<xsl:attribute name="id">ed-report-kwd-group-2</xsl:attribute>
<xsl:attribute name="flag">dl-ar</xsl:attribute>
<xsl:attribute name="role">warning</xsl:attribute>
Expand Down
4 changes: 3 additions & 1 deletion src/final-JATS-schematron.sch
Original file line number Diff line number Diff line change
Expand Up @@ -4053,8 +4053,10 @@
</rule></pattern><pattern id="ed-report-kwd-group-pattern"><rule context="sub-article[@article-type='editor-report']/front-stub/kwd-group" id="ed-report-kwd-group">

<assert test="@kwd-group-type=('claim-importance','evidence-strength')" role="error" flag="dl-ar" id="ed-report-kwd-group-1">[ed-report-kwd-group-1] kwd-group in <value-of select="parent::*/title-group/article-title"/> must have the attribute kwd-group-type with the value 'claim-importance' or 'evidence-strength'. This one does not.</assert>

<report test="@kwd-group-type='claim-importance' and count(kwd) gt 1" role="error" flag="dl-ar" id="ed-report-kwd-group-3">[ed-report-kwd-group-3] <value-of select="@kwd-group-type"/> type kwd-group has <value-of select="count(kwd)"/> keywords: <value-of select="string-join(kwd,'; ')"/>. This is not permitted, please check which single importance keyword should be used.</report>

<report test="@kwd-group-type=('claim-importance','evidence-strength') and count(kwd) gt 2" role="warning" flag="dl-ar" id="ed-report-kwd-group-2">[ed-report-kwd-group-2] <value-of select="@kwd-group-type"/> type kwd-group has <value-of select="count(kwd)"/> keywords: <value-of select="string-join(kwd,'; ')"/>. This is unusual, please check this is correct.</report>
<report test="@kwd-group-type='evidence-strength' and count(kwd) gt 1" role="warning" flag="dl-ar" id="ed-report-kwd-group-2">[ed-report-kwd-group-2] <value-of select="@kwd-group-type"/> type kwd-group has <value-of select="count(kwd)"/> keywords: <value-of select="string-join(kwd,'; ')"/>. This is unusual, please check this is correct.</report>

</rule></pattern><pattern id="ed-report-claim-kwds-pattern"><rule context="sub-article[@article-type='editor-report']/front-stub/kwd-group[@kwd-group-type='claim-importance']/kwd" id="ed-report-claim-kwds">
<let name="allowed-vals" value="('Landmark', 'Fundamental', 'Important', 'Valuable', 'Useful')"/>
Expand Down
23 changes: 21 additions & 2 deletions src/final-JATS-schematron.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -23621,9 +23621,28 @@
</xsl:otherwise>
</xsl:choose>

<!--REPORT error-->
<xsl:if test="@kwd-group-type='claim-importance' and count(kwd) gt 1">
<svrl:successful-report xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@kwd-group-type='claim-importance' and count(kwd) gt 1">
<xsl:attribute name="id">ed-report-kwd-group-3</xsl:attribute>
<xsl:attribute name="flag">dl-ar</xsl:attribute>
<xsl:attribute name="role">error</xsl:attribute>
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>[ed-report-kwd-group-3] <xsl:text/>
<xsl:value-of select="@kwd-group-type"/>
<xsl:text/> type kwd-group has <xsl:text/>
<xsl:value-of select="count(kwd)"/>
<xsl:text/> keywords: <xsl:text/>
<xsl:value-of select="string-join(kwd,'; ')"/>
<xsl:text/>. This is not permitted, please check which single importance keyword should be used.</svrl:text>
</svrl:successful-report>
</xsl:if>

<!--REPORT warning-->
<xsl:if test="@kwd-group-type=('claim-importance','evidence-strength') and count(kwd) gt 2">
<svrl:successful-report xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@kwd-group-type=('claim-importance','evidence-strength') and count(kwd) gt 2">
<xsl:if test="@kwd-group-type='evidence-strength' and count(kwd) gt 1">
<svrl:successful-report xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@kwd-group-type='evidence-strength' and count(kwd) gt 1">
<xsl:attribute name="id">ed-report-kwd-group-2</xsl:attribute>
<xsl:attribute name="flag">dl-ar</xsl:attribute>
<xsl:attribute name="role">warning</xsl:attribute>
Expand Down
4 changes: 3 additions & 1 deletion src/final-package-JATS-schematron.sch
Original file line number Diff line number Diff line change
Expand Up @@ -4059,8 +4059,10 @@
</rule></pattern><pattern id="ed-report-kwd-group-pattern"><rule context="sub-article[@article-type='editor-report']/front-stub/kwd-group" id="ed-report-kwd-group">

<assert test="@kwd-group-type=('claim-importance','evidence-strength')" role="error" id="ed-report-kwd-group-1">kwd-group in <value-of select="parent::*/title-group/article-title"/> must have the attribute kwd-group-type with the value 'claim-importance' or 'evidence-strength'. This one does not.</assert>

<report test="@kwd-group-type='claim-importance' and count(kwd) gt 1" role="error" id="ed-report-kwd-group-3"><value-of select="@kwd-group-type"/> type kwd-group has <value-of select="count(kwd)"/> keywords: <value-of select="string-join(kwd,'; ')"/>. This is not permitted, please check which single importance keyword should be used.</report>

<report test="@kwd-group-type=('claim-importance','evidence-strength') and count(kwd) gt 2" role="warning" id="ed-report-kwd-group-2"><value-of select="@kwd-group-type"/> type kwd-group has <value-of select="count(kwd)"/> keywords: <value-of select="string-join(kwd,'; ')"/>. This is unusual, please check this is correct.</report>
<report test="@kwd-group-type='evidence-strength' and count(kwd) gt 1" role="warning" id="ed-report-kwd-group-2"><value-of select="@kwd-group-type"/> type kwd-group has <value-of select="count(kwd)"/> keywords: <value-of select="string-join(kwd,'; ')"/>. This is unusual, please check this is correct.</report>

</rule></pattern><pattern id="ed-report-claim-kwds-pattern"><rule context="sub-article[@article-type='editor-report']/front-stub/kwd-group[@kwd-group-type='claim-importance']/kwd" id="ed-report-claim-kwds">
<let name="allowed-vals" value="('Landmark', 'Fundamental', 'Important', 'Valuable', 'Useful')"/>
Expand Down
4 changes: 3 additions & 1 deletion src/pre-JATS-schematron.sch
Original file line number Diff line number Diff line change
Expand Up @@ -3998,8 +3998,10 @@
</rule></pattern><pattern id="ed-report-kwd-group-pattern"><rule context="sub-article[@article-type='editor-report']/front-stub/kwd-group" id="ed-report-kwd-group">

<assert test="@kwd-group-type=('claim-importance','evidence-strength')" role="error" flag="dl-ar" id="ed-report-kwd-group-1">[ed-report-kwd-group-1] kwd-group in <value-of select="parent::*/title-group/article-title"/> must have the attribute kwd-group-type with the value 'claim-importance' or 'evidence-strength'. This one does not.</assert>

<report test="@kwd-group-type='claim-importance' and count(kwd) gt 1" role="error" flag="dl-ar" id="ed-report-kwd-group-3">[ed-report-kwd-group-3] <value-of select="@kwd-group-type"/> type kwd-group has <value-of select="count(kwd)"/> keywords: <value-of select="string-join(kwd,'; ')"/>. This is not permitted, please check which single importance keyword should be used.</report>

<report test="@kwd-group-type=('claim-importance','evidence-strength') and count(kwd) gt 2" role="warning" flag="dl-ar" id="ed-report-kwd-group-2">[ed-report-kwd-group-2] <value-of select="@kwd-group-type"/> type kwd-group has <value-of select="count(kwd)"/> keywords: <value-of select="string-join(kwd,'; ')"/>. This is unusual, please check this is correct.</report>
<report test="@kwd-group-type='evidence-strength' and count(kwd) gt 1" role="warning" flag="dl-ar" id="ed-report-kwd-group-2">[ed-report-kwd-group-2] <value-of select="@kwd-group-type"/> type kwd-group has <value-of select="count(kwd)"/> keywords: <value-of select="string-join(kwd,'; ')"/>. This is unusual, please check this is correct.</report>

</rule></pattern><pattern id="ed-report-claim-kwds-pattern"><rule context="sub-article[@article-type='editor-report']/front-stub/kwd-group[@kwd-group-type='claim-importance']/kwd" id="ed-report-claim-kwds">
<let name="allowed-vals" value="('Landmark', 'Fundamental', 'Important', 'Valuable', 'Useful')"/>
Expand Down
23 changes: 21 additions & 2 deletions src/pre-JATS-schematron.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -23489,9 +23489,28 @@
</xsl:otherwise>
</xsl:choose>

<!--REPORT error-->
<xsl:if test="@kwd-group-type='claim-importance' and count(kwd) gt 1">
<svrl:successful-report xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@kwd-group-type='claim-importance' and count(kwd) gt 1">
<xsl:attribute name="id">ed-report-kwd-group-3</xsl:attribute>
<xsl:attribute name="flag">dl-ar</xsl:attribute>
<xsl:attribute name="role">error</xsl:attribute>
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>[ed-report-kwd-group-3] <xsl:text/>
<xsl:value-of select="@kwd-group-type"/>
<xsl:text/> type kwd-group has <xsl:text/>
<xsl:value-of select="count(kwd)"/>
<xsl:text/> keywords: <xsl:text/>
<xsl:value-of select="string-join(kwd,'; ')"/>
<xsl:text/>. This is not permitted, please check which single importance keyword should be used.</svrl:text>
</svrl:successful-report>
</xsl:if>

<!--REPORT warning-->
<xsl:if test="@kwd-group-type=('claim-importance','evidence-strength') and count(kwd) gt 2">
<svrl:successful-report xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@kwd-group-type=('claim-importance','evidence-strength') and count(kwd) gt 2">
<xsl:if test="@kwd-group-type='evidence-strength' and count(kwd) gt 1">
<svrl:successful-report xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@kwd-group-type='evidence-strength' and count(kwd) gt 1">
<xsl:attribute name="id">ed-report-kwd-group-2</xsl:attribute>
<xsl:attribute name="flag">dl-ar</xsl:attribute>
<xsl:attribute name="role">warning</xsl:attribute>
Expand Down
7 changes: 6 additions & 1 deletion src/schematron.sch
Original file line number Diff line number Diff line change
Expand Up @@ -7188,8 +7188,13 @@ else self::*/local-name() = $allowed-p-blocks"
role="error"
flag="dl-ar"
id="ed-report-kwd-group-1">kwd-group in <value-of select="parent::*/title-group/article-title"/> must have the attribute kwd-group-type with the value 'claim-importance' or 'evidence-strength'. This one does not.</assert>

<report test="@kwd-group-type='claim-importance' and count(kwd) gt 1"
role="error"
flag="dl-ar"
id="ed-report-kwd-group-3"><value-of select="@kwd-group-type"/> type kwd-group has <value-of select="count(kwd)"/> keywords: <value-of select="string-join(kwd,'; ')"/>. This is not permitted, please check which single importance keyword should be used.</report>

<report test="@kwd-group-type=('claim-importance','evidence-strength') and count(kwd) gt 2"
<report test="@kwd-group-type='evidence-strength' and count(kwd) gt 1"
role="warning"
flag="dl-ar"
id="ed-report-kwd-group-2"><value-of select="@kwd-group-type"/> type kwd-group has <value-of select="count(kwd)"/> keywords: <value-of select="string-join(kwd,'; ')"/>. This is unusual, please check this is correct.</report>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1291,7 +1291,7 @@
</xsl:function>
<pattern id="dec-letter-auth-response">
<rule context="sub-article[@article-type='editor-report']/front-stub/kwd-group" id="ed-report-kwd-group">
<report test="@kwd-group-type=('claim-importance','evidence-strength') and count(kwd) gt 2" role="warning" flag="dl-ar" id="ed-report-kwd-group-2">
<report test="@kwd-group-type='evidence-strength' and count(kwd) gt 1" role="warning" flag="dl-ar" id="ed-report-kwd-group-2">
<value-of select="@kwd-group-type"/> type kwd-group has <value-of select="count(kwd)"/> keywords: <value-of select="string-join(kwd,'; ')"/>. This is unusual, please check this is correct.</report>
</rule>
</pattern>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?oxygen SCHSchema="ed-report-kwd-group-2.sch"?>
<!--Context: sub-article[@article-type='editor-report']/front-stub/kwd-group
Test: report @kwd-group-type=('claim-importance','evidence-strength') and count(kwd) gt 2
Test: report @kwd-group-type='evidence-strength' and count(kwd) gt 1
Message: type kwd-group has keywords: . This is unusual, please check this is correct. -->
<root xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:ali="http://www.niso.org/schemas/ali/1.0/">
<article>
Expand All @@ -12,17 +12,14 @@ Message: type kwd-group has keywords: . This is unusual, please check this is
</title-group>
<kwd-group kwd-group-type="claim-importance">
<kwd>Noteworthy</kwd>
<kwd>Flawed</kwd>
<kwd>boooring :yawning_face:</kwd>
</kwd-group>
<kwd-group kwd-group-type="evidence-strength">
<kwd>Compelling</kwd>
<kwd>Incomplete</kwd>
<kwd>Gorgeous :heart_eyes:</kwd>
</kwd-group>
</front-stub>
<body>
<p>The terms in use are <bold>noteworthy</bold> but <bold>flawed</bold>. And the data is <bold>compelling</bold>, but <bold>incomplete</bold>.</p>
<p>The terms in use are <bold>noteworthy</bold>. And the data is <bold>compelling</bold>, but <bold>incomplete</bold>.</p>
</body>
</sub-article>
</article>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?oxygen SCHSchema="ed-report-kwd-group-2.sch"?>
<!--Context: sub-article[@article-type='editor-report']/front-stub/kwd-group
Test: report @kwd-group-type=('claim-importance','evidence-strength') and count(kwd) gt 2
Test: report @kwd-group-type='evidence-strength' and count(kwd) gt 1
Message: type kwd-group has keywords: . This is unusual, please check this is correct. -->
<root xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:ali="http://www.niso.org/schemas/ali/1.0/">
<article>
Expand All @@ -16,11 +16,10 @@ Message: type kwd-group has keywords: . This is unusual, please check this is
</kwd-group>
<kwd-group kwd-group-type="evidence-strength">
<kwd>Compelling</kwd>
<kwd>Incomplete</kwd>
</kwd-group>
</front-stub>
<body>
<p>The terms in use are <bold>noteworthy</bold> but <bold>flawed</bold>. And the data is <bold>compelling</bold>, but <bold>incomplete</bold>.</p>
<p>The terms in use are <bold>noteworthy</bold>. And the data is <bold>compelling</bold>.</p>
</body>
</sub-article>
</article>
Expand Down
Loading

0 comments on commit 3437df1

Please sign in to comment.