Skip to content

Commit

Permalink
chore: Update table cell check messages
Browse files Browse the repository at this point in the history
  • Loading branch information
fred-atherden committed Jan 26, 2024
1 parent 370dfc5 commit 0ba9603
Show file tree
Hide file tree
Showing 14 changed files with 29 additions and 21 deletions.
4 changes: 2 additions & 2 deletions src/final-JATS-schematron.sch
Original file line number Diff line number Diff line change
Expand Up @@ -3071,11 +3071,11 @@
</rule></pattern><pattern id="td-child-tests-pattern"><rule context="td/*" id="td-child-tests">
<let name="allowed-blocks" value="('bold','italic','sup','sub','sc','ext-link','xref', 'break', 'named-content', 'styled-content', 'monospace', 'code','inline-graphic','underline','inline-formula', 'list')"/>

<assert see="https://elifeproduction.slab.com/posts/tables-3nehcouh#td-child-test" test="self::*/local-name() = $allowed-blocks" role="error" id="td-child-test">[td-child-test] td cannot contain <value-of select="self::*/local-name()"/>. Only the following elements are allowed - 'bold', 'italic', 'sup', 'sub', 'sc', 'ext-link', 'xref', 'break', 'named-content', 'monospace', 'code','inline-graphic','underline', and 'inline-formula'.</assert>
<assert see="https://elifeproduction.slab.com/posts/tables-3nehcouh#td-child-test" test="self::*/local-name() = $allowed-blocks" role="error" id="td-child-test">[td-child-test] td cannot contain <value-of select="self::*/local-name()"/>. Only the following elements are allowed - <value-of select="string-join($allowed-blocks,', ')"/>.</assert>
</rule></pattern><pattern id="th-child-tests-pattern"><rule context="th/*" id="th-child-tests">
<let name="allowed-blocks" value="('bold','italic','sup','sub','sc','underline','ext-link','xref', 'break', 'named-content', 'monospace','inline-formula','inline-graphic', 'list')"/>

<assert see="https://elifeproduction.slab.com/posts/tables-3nehcouh#th-child-test-1" test="self::*/local-name() = ($allowed-blocks)" role="error" id="th-child-test-1">[th-child-test-1] th cannot contain <value-of select="self::*/local-name()"/>. Only the following elements are allowed - 'bold', 'italic', 'sup', 'sub', 'sc', 'underline', 'ext-link', 'xref', 'break', 'named-content', 'monospace', 'code', 'inline-graphic', and 'inline-formula'.</assert>
<assert see="https://elifeproduction.slab.com/posts/tables-3nehcouh#th-child-test-1" test="self::*/local-name() = ($allowed-blocks)" role="error" id="th-child-test-1">[th-child-test-1] th cannot contain <value-of select="self::*/local-name()"/>. Only the following elements are allowed - <value-of select="string-join($allowed-blocks,', ')"/>.</assert>

<report see="https://elifeproduction.slab.com/posts/tables-3nehcouh#th-child-test-2" test="name() = ('bold','underline') and . = ./parent::th" role="warning" id="th-child-test-2">[th-child-test-2] The content of this th element is entirely in <value-of select="name()"/> emphasis - <value-of select="."/>. Is this correct?</report>
</rule></pattern><pattern id="th-tests-pattern"><rule context="th" id="th-tests">
Expand Down
8 changes: 6 additions & 2 deletions src/final-JATS-schematron.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -17175,7 +17175,9 @@
</xsl:attribute>
<svrl:text>[td-child-test] td cannot contain <xsl:text/>
<xsl:value-of select="self::*/local-name()"/>
<xsl:text/>. Only the following elements are allowed - 'bold', 'italic', 'sup', 'sub', 'sc', 'ext-link', 'xref', 'break', 'named-content', 'monospace', 'code','inline-graphic','underline', and 'inline-formula'.</svrl:text>
<xsl:text/>. Only the following elements are allowed - <xsl:text/>
<xsl:value-of select="string-join($allowed-blocks,', ')"/>
<xsl:text/>.</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
Expand Down Expand Up @@ -17206,7 +17208,9 @@
</xsl:attribute>
<svrl:text>[th-child-test-1] th cannot contain <xsl:text/>
<xsl:value-of select="self::*/local-name()"/>
<xsl:text/>. Only the following elements are allowed - 'bold', 'italic', 'sup', 'sub', 'sc', 'underline', 'ext-link', 'xref', 'break', 'named-content', 'monospace', 'code', 'inline-graphic', and 'inline-formula'.</svrl:text>
<xsl:text/>. Only the following elements are allowed - <xsl:text/>
<xsl:value-of select="string-join($allowed-blocks,', ')"/>
<xsl:text/>.</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
Expand Down
4 changes: 2 additions & 2 deletions src/final-package-JATS-schematron.sch
Original file line number Diff line number Diff line change
Expand Up @@ -3077,11 +3077,11 @@
</rule></pattern><pattern id="td-child-tests-pattern"><rule context="td/*" id="td-child-tests">
<let name="allowed-blocks" value="('bold','italic','sup','sub','sc','ext-link','xref', 'break', 'named-content', 'styled-content', 'monospace', 'code','inline-graphic','underline','inline-formula', 'list')"/>

<assert see="https://elifeproduction.slab.com/posts/tables-3nehcouh#td-child-test" test="self::*/local-name() = $allowed-blocks" role="error" id="td-child-test">td cannot contain <value-of select="self::*/local-name()"/>. Only the following elements are allowed - 'bold', 'italic', 'sup', 'sub', 'sc', 'ext-link', 'xref', 'break', 'named-content', 'monospace', 'code','inline-graphic','underline', and 'inline-formula'.</assert>
<assert see="https://elifeproduction.slab.com/posts/tables-3nehcouh#td-child-test" test="self::*/local-name() = $allowed-blocks" role="error" id="td-child-test">td cannot contain <value-of select="self::*/local-name()"/>. Only the following elements are allowed - <value-of select="string-join($allowed-blocks,', ')"/>.</assert>
</rule></pattern><pattern id="th-child-tests-pattern"><rule context="th/*" id="th-child-tests">
<let name="allowed-blocks" value="('bold','italic','sup','sub','sc','underline','ext-link','xref', 'break', 'named-content', 'monospace','inline-formula','inline-graphic', 'list')"/>

<assert see="https://elifeproduction.slab.com/posts/tables-3nehcouh#th-child-test-1" test="self::*/local-name() = ($allowed-blocks)" role="error" id="th-child-test-1">th cannot contain <value-of select="self::*/local-name()"/>. Only the following elements are allowed - 'bold', 'italic', 'sup', 'sub', 'sc', 'underline', 'ext-link', 'xref', 'break', 'named-content', 'monospace', 'code', 'inline-graphic', and 'inline-formula'.</assert>
<assert see="https://elifeproduction.slab.com/posts/tables-3nehcouh#th-child-test-1" test="self::*/local-name() = ($allowed-blocks)" role="error" id="th-child-test-1">th cannot contain <value-of select="self::*/local-name()"/>. Only the following elements are allowed - <value-of select="string-join($allowed-blocks,', ')"/>.</assert>

<report see="https://elifeproduction.slab.com/posts/tables-3nehcouh#th-child-test-2" test="name() = ('bold','underline') and . = ./parent::th" role="warning" id="th-child-test-2">The content of this th element is entirely in <value-of select="name()"/> emphasis - <value-of select="."/>. Is this correct?</report>
</rule></pattern><pattern id="th-tests-pattern"><rule context="th" id="th-tests">
Expand Down
4 changes: 2 additions & 2 deletions src/pre-JATS-schematron.sch
Original file line number Diff line number Diff line change
Expand Up @@ -3016,11 +3016,11 @@
</rule></pattern><pattern id="td-child-tests-pattern"><rule context="td/*" id="td-child-tests">
<let name="allowed-blocks" value="('bold','italic','sup','sub','sc','ext-link','xref', 'break', 'named-content', 'styled-content', 'monospace', 'code','inline-graphic','underline','inline-formula', 'list')"/>

<assert see="https://elifeproduction.slab.com/posts/tables-3nehcouh#td-child-test" test="self::*/local-name() = $allowed-blocks" role="error" id="td-child-test">[td-child-test] td cannot contain <value-of select="self::*/local-name()"/>. Only the following elements are allowed - 'bold', 'italic', 'sup', 'sub', 'sc', 'ext-link', 'xref', 'break', 'named-content', 'monospace', 'code','inline-graphic','underline', and 'inline-formula'.</assert>
<assert see="https://elifeproduction.slab.com/posts/tables-3nehcouh#td-child-test" test="self::*/local-name() = $allowed-blocks" role="error" id="td-child-test">[td-child-test] td cannot contain <value-of select="self::*/local-name()"/>. Only the following elements are allowed - <value-of select="string-join($allowed-blocks,', ')"/>.</assert>
</rule></pattern><pattern id="th-child-tests-pattern"><rule context="th/*" id="th-child-tests">
<let name="allowed-blocks" value="('bold','italic','sup','sub','sc','underline','ext-link','xref', 'break', 'named-content', 'monospace','inline-formula','inline-graphic', 'list')"/>

<assert see="https://elifeproduction.slab.com/posts/tables-3nehcouh#th-child-test-1" test="self::*/local-name() = ($allowed-blocks)" role="error" id="th-child-test-1">[th-child-test-1] th cannot contain <value-of select="self::*/local-name()"/>. Only the following elements are allowed - 'bold', 'italic', 'sup', 'sub', 'sc', 'underline', 'ext-link', 'xref', 'break', 'named-content', 'monospace', 'code', 'inline-graphic', and 'inline-formula'.</assert>
<assert see="https://elifeproduction.slab.com/posts/tables-3nehcouh#th-child-test-1" test="self::*/local-name() = ($allowed-blocks)" role="error" id="th-child-test-1">[th-child-test-1] th cannot contain <value-of select="self::*/local-name()"/>. Only the following elements are allowed - <value-of select="string-join($allowed-blocks,', ')"/>.</assert>

<report see="https://elifeproduction.slab.com/posts/tables-3nehcouh#th-child-test-2" test="name() = ('bold','underline') and . = ./parent::th" role="warning" id="th-child-test-2">[th-child-test-2] The content of this th element is entirely in <value-of select="name()"/> emphasis - <value-of select="."/>. Is this correct?</report>
</rule></pattern><pattern id="th-tests-pattern"><rule context="th" id="th-tests">
Expand Down
8 changes: 6 additions & 2 deletions src/pre-JATS-schematron.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -17053,7 +17053,9 @@
</xsl:attribute>
<svrl:text>[td-child-test] td cannot contain <xsl:text/>
<xsl:value-of select="self::*/local-name()"/>
<xsl:text/>. Only the following elements are allowed - 'bold', 'italic', 'sup', 'sub', 'sc', 'ext-link', 'xref', 'break', 'named-content', 'monospace', 'code','inline-graphic','underline', and 'inline-formula'.</svrl:text>
<xsl:text/>. Only the following elements are allowed - <xsl:text/>
<xsl:value-of select="string-join($allowed-blocks,', ')"/>
<xsl:text/>.</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
Expand Down Expand Up @@ -17084,7 +17086,9 @@
</xsl:attribute>
<svrl:text>[th-child-test-1] th cannot contain <xsl:text/>
<xsl:value-of select="self::*/local-name()"/>
<xsl:text/>. Only the following elements are allowed - 'bold', 'italic', 'sup', 'sub', 'sc', 'underline', 'ext-link', 'xref', 'break', 'named-content', 'monospace', 'code', 'inline-graphic', and 'inline-formula'.</svrl:text>
<xsl:text/>. Only the following elements are allowed - <xsl:text/>
<xsl:value-of select="string-join($allowed-blocks,', ')"/>
<xsl:text/>.</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
Expand Down
4 changes: 2 additions & 2 deletions src/schematron.sch
Original file line number Diff line number Diff line change
Expand Up @@ -5052,7 +5052,7 @@ else self::*/local-name() = $allowed-p-blocks"
<assert see="https://elifeproduction.slab.com/posts/tables-3nehcouh#td-child-test"
test="self::*/local-name() = $allowed-blocks"
role="error"
id="td-child-test">td cannot contain <value-of select="self::*/local-name()"/>. Only the following elements are allowed - 'bold', 'italic', 'sup', 'sub', 'sc', 'ext-link', 'xref', 'break', 'named-content', 'monospace', 'code','inline-graphic','underline', and 'inline-formula'.</assert>
id="td-child-test">td cannot contain <value-of select="self::*/local-name()"/>. Only the following elements are allowed - <value-of select="string-join($allowed-blocks,', ')"/>.</assert>
</rule>

<rule context="th/*" id="th-child-tests">
Expand All @@ -5061,7 +5061,7 @@ else self::*/local-name() = $allowed-p-blocks"
<assert see="https://elifeproduction.slab.com/posts/tables-3nehcouh#th-child-test-1"
test="self::*/local-name() = ($allowed-blocks)"
role="error"
id="th-child-test-1">th cannot contain <value-of select="self::*/local-name()"/>. Only the following elements are allowed - 'bold', 'italic', 'sup', 'sub', 'sc', 'underline', 'ext-link', 'xref', 'break', 'named-content', 'monospace', 'code', 'inline-graphic', and 'inline-formula'.</assert>
id="th-child-test-1">th cannot contain <value-of select="self::*/local-name()"/>. Only the following elements are allowed - <value-of select="string-join($allowed-blocks,', ')"/>.</assert>

<report see="https://elifeproduction.slab.com/posts/tables-3nehcouh#th-child-test-2"
test="name() = ('bold','underline') and . = ./parent::th"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ Message: A section with the title in the abstract must have at least one relate
</sec>
</abstract>
</article>
</root>
</root>
2 changes: 1 addition & 1 deletion test/tests/gen/td-child-tests/td-child-test/fail.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?oxygen SCHSchema="td-child-test.sch"?>
<!--Context: td/*
Test: assert self::*/local-name() = $allowed-blocks
Message: td cannot contain . Only the following elements are allowed - 'bold', 'italic', 'sup', 'sub', 'sc', 'ext-link', 'xref', 'break', 'named-content', 'monospace', 'code','inline-graphic','underline', and 'inline-formula'. -->
Message: td cannot contain . Only the following elements are allowed - . -->
<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>
<td><label/><bold/><italic/><sup/><sub/><sc/><ext-link/> <break/> <named-content/> <monospace/> <xref/></td>
Expand Down
2 changes: 1 addition & 1 deletion test/tests/gen/td-child-tests/td-child-test/pass.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?oxygen SCHSchema="td-child-test.sch"?>
<!--Context: td/*
Test: assert self::*/local-name() = $allowed-blocks
Message: td cannot contain . Only the following elements are allowed - 'bold', 'italic', 'sup', 'sub', 'sc', 'ext-link', 'xref', 'break', 'named-content', 'monospace', 'code','inline-graphic','underline', and 'inline-formula'. -->
Message: td cannot contain . Only the following elements are allowed - . -->
<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>
<td><bold/><italic/><sup/><sub/><sc/><ext-link/> <break/> <named-content/> <monospace/> <xref/></td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1292,7 +1292,7 @@
<pattern id="content-containers">
<rule context="td/*" id="td-child-tests">
<let name="allowed-blocks" value="('bold','italic','sup','sub','sc','ext-link','xref', 'break', 'named-content', 'styled-content', 'monospace', 'code','inline-graphic','underline','inline-formula', 'list')"/>
<assert see="https://elifeproduction.slab.com/posts/tables-3nehcouh#td-child-test" test="self::*/local-name() = $allowed-blocks" role="error" id="td-child-test">td cannot contain <value-of select="self::*/local-name()"/>. Only the following elements are allowed - 'bold', 'italic', 'sup', 'sub', 'sc', 'ext-link', 'xref', 'break', 'named-content', 'monospace', 'code','inline-graphic','underline', and 'inline-formula'.</assert>
<assert see="https://elifeproduction.slab.com/posts/tables-3nehcouh#td-child-test" test="self::*/local-name() = $allowed-blocks" role="error" id="td-child-test">td cannot contain <value-of select="self::*/local-name()"/>. Only the following elements are allowed - <value-of select="string-join($allowed-blocks,', ')"/>.</assert>
</rule>
</pattern>
<pattern id="root-pattern">
Expand Down
2 changes: 1 addition & 1 deletion test/tests/gen/th-child-tests/th-child-test-1/fail.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?oxygen SCHSchema="th-child-test-1.sch"?>
<!--Context: th/*
Test: assert self::*/local-name() = ($allowed-blocks)
Message: th cannot contain . Only the following elements are allowed - 'bold', 'italic', 'sup', 'sub', 'sc', 'underline', 'ext-link', 'xref', 'break', 'named-content', 'monospace', 'code', 'inline-graphic', and 'inline-formula'. -->
Message: th cannot contain . Only the following elements are allowed - . -->
<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>
<table>
Expand Down
2 changes: 1 addition & 1 deletion test/tests/gen/th-child-tests/th-child-test-1/pass.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?oxygen SCHSchema="th-child-test-1.sch"?>
<!--Context: th/*
Test: assert self::*/local-name() = ($allowed-blocks)
Message: th cannot contain . Only the following elements are allowed - 'bold', 'italic', 'sup', 'sub', 'sc', 'underline', 'ext-link', 'xref', 'break', 'named-content', 'monospace', 'code', 'inline-graphic', and 'inline-formula'. -->
Message: th cannot contain . Only the following elements are allowed - . -->
<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>
<table>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1292,7 +1292,7 @@
<pattern id="content-containers">
<rule context="th/*" id="th-child-tests">
<let name="allowed-blocks" value="('bold','italic','sup','sub','sc','underline','ext-link','xref', 'break', 'named-content', 'monospace','inline-formula','inline-graphic', 'list')"/>
<assert see="https://elifeproduction.slab.com/posts/tables-3nehcouh#th-child-test-1" test="self::*/local-name() = ($allowed-blocks)" role="error" id="th-child-test-1">th cannot contain <value-of select="self::*/local-name()"/>. Only the following elements are allowed - 'bold', 'italic', 'sup', 'sub', 'sc', 'underline', 'ext-link', 'xref', 'break', 'named-content', 'monospace', 'code', 'inline-graphic', and 'inline-formula'.</assert>
<assert see="https://elifeproduction.slab.com/posts/tables-3nehcouh#th-child-test-1" test="self::*/local-name() = ($allowed-blocks)" role="error" id="th-child-test-1">th cannot contain <value-of select="self::*/local-name()"/>. Only the following elements are allowed - <value-of select="string-join($allowed-blocks,', ')"/>.</assert>
</rule>
</pattern>
<pattern id="root-pattern">
Expand Down
4 changes: 2 additions & 2 deletions test/xspec/schematron.sch
Original file line number Diff line number Diff line change
Expand Up @@ -3717,14 +3717,14 @@
<rule context="td/*" id="td-child-tests">
<let name="allowed-blocks" value="('bold','italic','sup','sub','sc','ext-link','xref', 'break', 'named-content', 'styled-content', 'monospace', 'code','inline-graphic','underline','inline-formula', 'list')"/>

<assert see="https://elifeproduction.slab.com/posts/tables-3nehcouh#td-child-test" test="self::*/local-name() = $allowed-blocks" role="error" id="td-child-test">td cannot contain <value-of select="self::*/local-name()"/>. Only the following elements are allowed - 'bold', 'italic', 'sup', 'sub', 'sc', 'ext-link', 'xref', 'break', 'named-content', 'monospace', 'code','inline-graphic','underline', and 'inline-formula'.</assert>
<assert see="https://elifeproduction.slab.com/posts/tables-3nehcouh#td-child-test" test="self::*/local-name() = $allowed-blocks" role="error" id="td-child-test">td cannot contain <value-of select="self::*/local-name()"/>. Only the following elements are allowed - <value-of select="string-join($allowed-blocks,', ')"/>.</assert>
</rule>
</pattern>
<pattern id="th-child-tests-pattern">
<rule context="th/*" id="th-child-tests">
<let name="allowed-blocks" value="('bold','italic','sup','sub','sc','underline','ext-link','xref', 'break', 'named-content', 'monospace','inline-formula','inline-graphic', 'list')"/>

<assert see="https://elifeproduction.slab.com/posts/tables-3nehcouh#th-child-test-1" test="self::*/local-name() = ($allowed-blocks)" role="error" id="th-child-test-1">th cannot contain <value-of select="self::*/local-name()"/>. Only the following elements are allowed - 'bold', 'italic', 'sup', 'sub', 'sc', 'underline', 'ext-link', 'xref', 'break', 'named-content', 'monospace', 'code', 'inline-graphic', and 'inline-formula'.</assert>
<assert see="https://elifeproduction.slab.com/posts/tables-3nehcouh#th-child-test-1" test="self::*/local-name() = ($allowed-blocks)" role="error" id="th-child-test-1">th cannot contain <value-of select="self::*/local-name()"/>. Only the following elements are allowed - <value-of select="string-join($allowed-blocks,', ')"/>.</assert>

<report see="https://elifeproduction.slab.com/posts/tables-3nehcouh#th-child-test-2" test="name() = ('bold','underline') and . = ./parent::th" role="warning" id="th-child-test-2">The content of this th element is entirely in <value-of select="name()"/> emphasis - <value-of select="."/>. Is this correct?</report>
</rule>
Expand Down

0 comments on commit 0ba9603

Please sign in to comment.