Skip to content

Commit

Permalink
VOR - tweak Assessment term checks
Browse files Browse the repository at this point in the history
  • Loading branch information
fred-atherden committed Dec 10, 2024
1 parent e5955c9 commit 2150245
Show file tree
Hide file tree
Showing 14 changed files with 1,522 additions and 10 deletions.
6 changes: 5 additions & 1 deletion src/dl-schematron.sch
Original file line number Diff line number Diff line change
Expand Up @@ -1595,9 +1595,13 @@
<assert test=".=$allowed-vals" role="error" flag="dl-ar" id="ed-report-claim-kwd-1">Keyword contains <value-of select="."/>, but it is in a 'claim-importance' keyword group, meaning it should have one of the following values: <value-of select="string-join($allowed-vals,', ')"/></assert>

</rule></pattern><pattern id="ed-report-evidence-kwds-pattern"><rule context="sub-article[@article-type='editor-report']/front-stub/kwd-group[@kwd-group-type='evidence-strength']/kwd" id="ed-report-evidence-kwds">
<let name="allowed-vals" value="('Exceptional', 'Compelling', 'Convincing', 'Solid', 'Incomplete', 'Inadequate')"/>
<let name="wos-go-vals" value="('Exceptional', 'Compelling', 'Convincing', 'Solid')"/>
<let name="wos-no-go-vals" value="('Incomplete', 'Inadequate')"/>
<let name="allowed-vals" value="($wos-go-vals,$wos-no-go-vals)"/>

<assert test=".=$allowed-vals" role="error" flag="dl-ar" id="ed-report-evidence-kwd-1">Keyword contains <value-of select="."/>, but it is in a 'claim-importance' keyword group, meaning it should have one of the following values: <value-of select="string-join($allowed-vals,', ')"/></assert>

<report test=".=$wos-no-go-vals and parent::*/kwd[.=$wos-go-vals]" role="error" flag="dl-ar" id="ed-report-evidence-kwd-2">There is both an <value-of select="."/> and <value-of select="string-join(parent::*/kwd[.=$wos-go-vals],'; ')"/> kwd in the kwd-group for strength of evidence. Provided the <value-of select="string-join(parent::*/kwd[.=$wos-go-vals],'; ')"/> kwd is correct, please remove the <value-of select="."/> kwd from the kwd-group and unbold the term in the Assessment text.</report>
</rule></pattern><pattern id="ed-report-kwds-pattern"><rule context="sub-article[@article-type='editor-report']/front-stub/kwd-group/kwd" id="ed-report-kwds">

<report test="preceding-sibling::kwd = ." role="error" flag="dl-ar" id="ed-report-kwd-1">Keyword contains <value-of select="."/>, there is another kwd with that value witin the same kwd-group, so this one is either incorrect or superfluous and should be deleted.</report>
Expand Down
24 changes: 23 additions & 1 deletion src/dl-schematron.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -3017,7 +3017,9 @@
<!--PATTERN ed-report-evidence-kwds-pattern-->
<!--RULE ed-report-evidence-kwds-->
<xsl:template match="sub-article[@article-type='editor-report']/front-stub/kwd-group[@kwd-group-type='evidence-strength']/kwd" priority="1000" mode="M87">
<xsl:variable name="allowed-vals" select="('Exceptional', 'Compelling', 'Convincing', 'Solid', 'Incomplete', 'Inadequate')"/>
<xsl:variable name="wos-go-vals" select="('Exceptional', 'Compelling', 'Convincing', 'Solid')"/>
<xsl:variable name="wos-no-go-vals" select="('Incomplete', 'Inadequate')"/>
<xsl:variable name="allowed-vals" select="($wos-go-vals,$wos-no-go-vals)"/>
<!--ASSERT error-->
<xsl:choose>
<xsl:when test=".=$allowed-vals"/>
Expand All @@ -3038,6 +3040,26 @@
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<!--REPORT error-->
<xsl:if test=".=$wos-no-go-vals and parent::*/kwd[.=$wos-go-vals]">
<svrl:successful-report xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test=".=$wos-no-go-vals and parent::*/kwd[.=$wos-go-vals]">
<xsl:attribute name="id">ed-report-evidence-kwd-2</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>There is both an <xsl:text/>
<xsl:value-of select="."/>
<xsl:text/> and <xsl:text/>
<xsl:value-of select="string-join(parent::*/kwd[.=$wos-go-vals],'; ')"/>
<xsl:text/> kwd in the kwd-group for strength of evidence. Provided the <xsl:text/>
<xsl:value-of select="string-join(parent::*/kwd[.=$wos-go-vals],'; ')"/>
<xsl:text/> kwd is correct, please remove the <xsl:text/>
<xsl:value-of select="."/>
<xsl:text/> kwd from the kwd-group and unbold the term in the Assessment text.</svrl:text>
</svrl:successful-report>
</xsl:if>
<xsl:apply-templates select="*" mode="M87"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M87"/>
Expand Down
6 changes: 5 additions & 1 deletion src/final-JATS-schematron.sch
Original file line number Diff line number Diff line change
Expand Up @@ -4236,9 +4236,13 @@
<assert test=".=$allowed-vals" role="error" flag="dl-ar" id="ed-report-claim-kwd-1">[ed-report-claim-kwd-1] Keyword contains <value-of select="."/>, but it is in a 'claim-importance' keyword group, meaning it should have one of the following values: <value-of select="string-join($allowed-vals,', ')"/></assert>

</rule></pattern><pattern id="ed-report-evidence-kwds-pattern"><rule context="sub-article[@article-type='editor-report']/front-stub/kwd-group[@kwd-group-type='evidence-strength']/kwd" id="ed-report-evidence-kwds">
<let name="allowed-vals" value="('Exceptional', 'Compelling', 'Convincing', 'Solid', 'Incomplete', 'Inadequate')"/>
<let name="wos-go-vals" value="('Exceptional', 'Compelling', 'Convincing', 'Solid')"/>
<let name="wos-no-go-vals" value="('Incomplete', 'Inadequate')"/>
<let name="allowed-vals" value="($wos-go-vals,$wos-no-go-vals)"/>

<assert test=".=$allowed-vals" role="error" flag="dl-ar" id="ed-report-evidence-kwd-1">[ed-report-evidence-kwd-1] Keyword contains <value-of select="."/>, but it is in a 'claim-importance' keyword group, meaning it should have one of the following values: <value-of select="string-join($allowed-vals,', ')"/></assert>

<report test=".=$wos-no-go-vals and parent::*/kwd[.=$wos-go-vals]" role="error" flag="dl-ar" id="ed-report-evidence-kwd-2">[ed-report-evidence-kwd-2] There is both an <value-of select="."/> and <value-of select="string-join(parent::*/kwd[.=$wos-go-vals],'; ')"/> kwd in the kwd-group for strength of evidence. Provided the <value-of select="string-join(parent::*/kwd[.=$wos-go-vals],'; ')"/> kwd is correct, please remove the <value-of select="."/> kwd from the kwd-group and unbold the term in the Assessment text.</report>
</rule></pattern><pattern id="ed-report-kwds-pattern"><rule context="sub-article[@article-type='editor-report']/front-stub/kwd-group/kwd" id="ed-report-kwds">

<report test="preceding-sibling::kwd = ." role="error" flag="dl-ar" id="ed-report-kwd-1">[ed-report-kwd-1] Keyword contains <value-of select="."/>, there is another kwd with that value witin the same kwd-group, so this one is either incorrect or superfluous and should be deleted.</report>
Expand Down
24 changes: 23 additions & 1 deletion src/final-JATS-schematron.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -22800,7 +22800,9 @@
<!--PATTERN ed-report-evidence-kwds-pattern-->
<!--RULE ed-report-evidence-kwds-->
<xsl:template match="sub-article[@article-type='editor-report']/front-stub/kwd-group[@kwd-group-type='evidence-strength']/kwd" priority="1000" mode="M364">
<xsl:variable name="allowed-vals" select="('Exceptional', 'Compelling', 'Convincing', 'Solid', 'Incomplete', 'Inadequate')"/>
<xsl:variable name="wos-go-vals" select="('Exceptional', 'Compelling', 'Convincing', 'Solid')"/>
<xsl:variable name="wos-no-go-vals" select="('Incomplete', 'Inadequate')"/>
<xsl:variable name="allowed-vals" select="($wos-go-vals,$wos-no-go-vals)"/>
<!--ASSERT error-->
<xsl:choose>
<xsl:when test=".=$allowed-vals"/>
Expand All @@ -22821,6 +22823,26 @@
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<!--REPORT error-->
<xsl:if test=".=$wos-no-go-vals and parent::*/kwd[.=$wos-go-vals]">
<svrl:successful-report xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test=".=$wos-no-go-vals and parent::*/kwd[.=$wos-go-vals]">
<xsl:attribute name="id">ed-report-evidence-kwd-2</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-evidence-kwd-2] There is both an <xsl:text/>
<xsl:value-of select="."/>
<xsl:text/> and <xsl:text/>
<xsl:value-of select="string-join(parent::*/kwd[.=$wos-go-vals],'; ')"/>
<xsl:text/> kwd in the kwd-group for strength of evidence. Provided the <xsl:text/>
<xsl:value-of select="string-join(parent::*/kwd[.=$wos-go-vals],'; ')"/>
<xsl:text/> kwd is correct, please remove the <xsl:text/>
<xsl:value-of select="."/>
<xsl:text/> kwd from the kwd-group and unbold the term in the Assessment text.</svrl:text>
</svrl:successful-report>
</xsl:if>
<xsl:apply-templates select="*" mode="M364"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M364"/>
Expand Down
6 changes: 5 additions & 1 deletion src/final-package-JATS-schematron.sch
Original file line number Diff line number Diff line change
Expand Up @@ -4242,9 +4242,13 @@
<assert test=".=$allowed-vals" role="error" id="ed-report-claim-kwd-1">Keyword contains <value-of select="."/>, but it is in a 'claim-importance' keyword group, meaning it should have one of the following values: <value-of select="string-join($allowed-vals,', ')"/></assert>

</rule></pattern><pattern id="ed-report-evidence-kwds-pattern"><rule context="sub-article[@article-type='editor-report']/front-stub/kwd-group[@kwd-group-type='evidence-strength']/kwd" id="ed-report-evidence-kwds">
<let name="allowed-vals" value="('Exceptional', 'Compelling', 'Convincing', 'Solid', 'Incomplete', 'Inadequate')"/>
<let name="wos-go-vals" value="('Exceptional', 'Compelling', 'Convincing', 'Solid')"/>
<let name="wos-no-go-vals" value="('Incomplete', 'Inadequate')"/>
<let name="allowed-vals" value="($wos-go-vals,$wos-no-go-vals)"/>

<assert test=".=$allowed-vals" role="error" id="ed-report-evidence-kwd-1">Keyword contains <value-of select="."/>, but it is in a 'claim-importance' keyword group, meaning it should have one of the following values: <value-of select="string-join($allowed-vals,', ')"/></assert>

<report test=".=$wos-no-go-vals and parent::*/kwd[.=$wos-go-vals]" role="error" id="ed-report-evidence-kwd-2">There is both an <value-of select="."/> and <value-of select="string-join(parent::*/kwd[.=$wos-go-vals],'; ')"/> kwd in the kwd-group for strength of evidence. Provided the <value-of select="string-join(parent::*/kwd[.=$wos-go-vals],'; ')"/> kwd is correct, please remove the <value-of select="."/> kwd from the kwd-group and unbold the term in the Assessment text.</report>
</rule></pattern><pattern id="ed-report-kwds-pattern"><rule context="sub-article[@article-type='editor-report']/front-stub/kwd-group/kwd" id="ed-report-kwds">

<report test="preceding-sibling::kwd = ." role="error" id="ed-report-kwd-1">Keyword contains <value-of select="."/>, there is another kwd with that value witin the same kwd-group, so this one is either incorrect or superfluous and should be deleted.</report>
Expand Down
6 changes: 5 additions & 1 deletion src/pre-JATS-schematron.sch
Original file line number Diff line number Diff line change
Expand Up @@ -4181,9 +4181,13 @@
<assert test=".=$allowed-vals" role="error" flag="dl-ar" id="ed-report-claim-kwd-1">[ed-report-claim-kwd-1] Keyword contains <value-of select="."/>, but it is in a 'claim-importance' keyword group, meaning it should have one of the following values: <value-of select="string-join($allowed-vals,', ')"/></assert>

</rule></pattern><pattern id="ed-report-evidence-kwds-pattern"><rule context="sub-article[@article-type='editor-report']/front-stub/kwd-group[@kwd-group-type='evidence-strength']/kwd" id="ed-report-evidence-kwds">
<let name="allowed-vals" value="('Exceptional', 'Compelling', 'Convincing', 'Solid', 'Incomplete', 'Inadequate')"/>
<let name="wos-go-vals" value="('Exceptional', 'Compelling', 'Convincing', 'Solid')"/>
<let name="wos-no-go-vals" value="('Incomplete', 'Inadequate')"/>
<let name="allowed-vals" value="($wos-go-vals,$wos-no-go-vals)"/>

<assert test=".=$allowed-vals" role="error" flag="dl-ar" id="ed-report-evidence-kwd-1">[ed-report-evidence-kwd-1] Keyword contains <value-of select="."/>, but it is in a 'claim-importance' keyword group, meaning it should have one of the following values: <value-of select="string-join($allowed-vals,', ')"/></assert>

<report test=".=$wos-no-go-vals and parent::*/kwd[.=$wos-go-vals]" role="error" flag="dl-ar" id="ed-report-evidence-kwd-2">[ed-report-evidence-kwd-2] There is both an <value-of select="."/> and <value-of select="string-join(parent::*/kwd[.=$wos-go-vals],'; ')"/> kwd in the kwd-group for strength of evidence. Provided the <value-of select="string-join(parent::*/kwd[.=$wos-go-vals],'; ')"/> kwd is correct, please remove the <value-of select="."/> kwd from the kwd-group and unbold the term in the Assessment text.</report>
</rule></pattern><pattern id="ed-report-kwds-pattern"><rule context="sub-article[@article-type='editor-report']/front-stub/kwd-group/kwd" id="ed-report-kwds">

<report test="preceding-sibling::kwd = ." role="error" flag="dl-ar" id="ed-report-kwd-1">[ed-report-kwd-1] Keyword contains <value-of select="."/>, there is another kwd with that value witin the same kwd-group, so this one is either incorrect or superfluous and should be deleted.</report>
Expand Down
24 changes: 23 additions & 1 deletion src/pre-JATS-schematron.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -22629,7 +22629,9 @@
<!--PATTERN ed-report-evidence-kwds-pattern-->
<!--RULE ed-report-evidence-kwds-->
<xsl:template match="sub-article[@article-type='editor-report']/front-stub/kwd-group[@kwd-group-type='evidence-strength']/kwd" priority="1000" mode="M362">
<xsl:variable name="allowed-vals" select="('Exceptional', 'Compelling', 'Convincing', 'Solid', 'Incomplete', 'Inadequate')"/>
<xsl:variable name="wos-go-vals" select="('Exceptional', 'Compelling', 'Convincing', 'Solid')"/>
<xsl:variable name="wos-no-go-vals" select="('Incomplete', 'Inadequate')"/>
<xsl:variable name="allowed-vals" select="($wos-go-vals,$wos-no-go-vals)"/>
<!--ASSERT error-->
<xsl:choose>
<xsl:when test=".=$allowed-vals"/>
Expand All @@ -22650,6 +22652,26 @@
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<!--REPORT error-->
<xsl:if test=".=$wos-no-go-vals and parent::*/kwd[.=$wos-go-vals]">
<svrl:successful-report xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test=".=$wos-no-go-vals and parent::*/kwd[.=$wos-go-vals]">
<xsl:attribute name="id">ed-report-evidence-kwd-2</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-evidence-kwd-2] There is both an <xsl:text/>
<xsl:value-of select="."/>
<xsl:text/> and <xsl:text/>
<xsl:value-of select="string-join(parent::*/kwd[.=$wos-go-vals],'; ')"/>
<xsl:text/> kwd in the kwd-group for strength of evidence. Provided the <xsl:text/>
<xsl:value-of select="string-join(parent::*/kwd[.=$wos-go-vals],'; ')"/>
<xsl:text/> kwd is correct, please remove the <xsl:text/>
<xsl:value-of select="."/>
<xsl:text/> kwd from the kwd-group and unbold the term in the Assessment text.</svrl:text>
</svrl:successful-report>
</xsl:if>
<xsl:apply-templates select="*" mode="M362"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M362"/>
Expand Down
9 changes: 8 additions & 1 deletion src/schematron.sch
Original file line number Diff line number Diff line change
Expand Up @@ -7487,12 +7487,19 @@ else self::*/local-name() = $allowed-p-blocks"
</rule>

<rule context="sub-article[@article-type='editor-report']/front-stub/kwd-group[@kwd-group-type='evidence-strength']/kwd" id="ed-report-evidence-kwds">
<let name="allowed-vals" value="('Exceptional', 'Compelling', 'Convincing', 'Solid', 'Incomplete', 'Inadequate')"/>
<let name="wos-go-vals" value="('Exceptional', 'Compelling', 'Convincing', 'Solid')"/>
<let name="wos-no-go-vals" value="('Incomplete', 'Inadequate')"/>
<let name="allowed-vals" value="($wos-go-vals,$wos-no-go-vals)"/>

<assert test=".=$allowed-vals"
role="error"
flag="dl-ar"
id="ed-report-evidence-kwd-1">Keyword contains <value-of select="."/>, but it is in a 'claim-importance' keyword group, meaning it should have one of the following values: <value-of select="string-join($allowed-vals,', ')"/></assert>

<report test=".=$wos-no-go-vals and parent::*/kwd[.=$wos-go-vals]"
role="error"
flag="dl-ar"
id="ed-report-evidence-kwd-2">There is both an <value-of select="."/> and <value-of select="string-join(parent::*/kwd[.=$wos-go-vals],'; ')"/> kwd in the kwd-group for strength of evidence. Provided the <value-of select="string-join(parent::*/kwd[.=$wos-go-vals],'; ')"/> kwd is correct, please remove the <value-of select="."/> kwd from the kwd-group and unbold the term in the Assessment text.</report>
</rule>

<rule context="sub-article[@article-type='editor-report']/front-stub/kwd-group/kwd" id="ed-report-kwds">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1362,7 +1362,9 @@
</xsl:function>
<pattern id="dec-letter-auth-response">
<rule context="sub-article[@article-type='editor-report']/front-stub/kwd-group[@kwd-group-type='evidence-strength']/kwd" id="ed-report-evidence-kwds">
<let name="allowed-vals" value="('Exceptional', 'Compelling', 'Convincing', 'Solid', 'Incomplete', 'Inadequate')"/>
<let name="wos-go-vals" value="('Exceptional', 'Compelling', 'Convincing', 'Solid')"/>
<let name="wos-no-go-vals" value="('Incomplete', 'Inadequate')"/>
<let name="allowed-vals" value="($wos-go-vals,$wos-no-go-vals)"/>
<assert test=".=$allowed-vals" role="error" flag="dl-ar" id="ed-report-evidence-kwd-1">Keyword contains <value-of select="."/>, but it is in a 'claim-importance' keyword group, meaning it should have one of the following values: <value-of select="string-join($allowed-vals,', ')"/>
</assert>
</rule>
Expand Down
Loading

0 comments on commit 2150245

Please sign in to comment.