Skip to content

Commit

Permalink
Update test files for local use
Browse files Browse the repository at this point in the history
  • Loading branch information
fred-atherden committed Oct 23, 2023
1 parent 8d6df82 commit c67f517
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1287,7 +1287,7 @@
</xsl:function>
<pattern id="house-style">
<rule context="break" id="break-tests">
<assert test="ancestor::td or ancestor::th" role="error" id="break-placement">The break element is only permitted as a child (or descendant) of a table cell. This one is placed elsewhere (<value-of select="concat(string-join(for $x in ancestor::* return $x/name(),'/'),'/',name())"/>).</assert>
<assert see="https://elifeproduction.slab.com/posts/general-layout-and-formatting-wq0m31at#hmp1c-break-placement" test="ancestor::td or ancestor::th" role="error" id="break-placement">The break element is only permitted as a child (or descendant) of a table cell. This one is placed elsewhere (<value-of select="concat(string-join(for $x in ancestor::* return $x/name(),'/'),'/',name())"/>).</assert>
</rule>
</pattern>
<pattern id="root-pattern">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1288,7 +1288,7 @@
<pattern id="house-style">
<rule context="article//styled-content" id="colour-styled-content-v2">
<let name="allowed-values" value="('color: #366BFB;','color: #9C27B0;','color: #D50000;')"/>
<report test="@style = $allowed-values" role="warning" id="colour-styled-content-flag">
<report see="https://elifeproduction.slab.com/posts/general-layout-and-formatting-wq0m31at#h3819-colour-styled-content-flag" test="@style = $allowed-values" role="warning" id="colour-styled-content-flag">
<value-of select="."/> has colour formatting. Is this correct? Preceding text - <value-of select="substring(preceding-sibling::text()[1],string-length(preceding-sibling::text()[1])-25)"/>
</report>
</rule>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1288,7 +1288,7 @@
<pattern id="house-style">
<rule context="article//styled-content" id="colour-styled-content-v2">
<let name="allowed-values" value="('color: #366BFB;','color: #9C27B0;','color: #D50000;')"/>
<assert test="@style = $allowed-values" role="error" id="final-styled-content-style-check">
<assert see="https://elifeproduction.slab.com/posts/general-layout-and-formatting-wq0m31at#h7uzr-final-styled-content-style-check" test="@style = $allowed-values" role="error" id="final-styled-content-style-check">
<value-of select="."/> - text in <value-of select="parent::*/name()"/> element is captured in a &lt;styled-content style="<value-of select="@style"/>"&gt;. The only allowed values for the @style are <value-of select="string-join($allowed-values,', ')"/>.</assert>
</rule>
</pattern>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1288,7 +1288,7 @@
<pattern id="house-style">
<rule context="article//styled-content" id="colour-styled-content-v2">
<let name="allowed-values" value="('color: #366BFB;','color: #9C27B0;','color: #D50000;')"/>
<assert test="@style = $allowed-values" role="warning" id="pre-styled-content-style-check">
<assert see="https://elifeproduction.slab.com/posts/general-layout-and-formatting-wq0m31at#hm00e-pre-styled-content-style-check" test="@style = $allowed-values" role="warning" id="pre-styled-content-style-check">
<value-of select="."/> - text in <value-of select="parent::*/name()"/> element is captured in a &lt;styled-content style="<value-of select="@style"/>"&gt;. The only allowed values for the @style are <value-of select="string-join($allowed-values,', ')"/> as only blue, purple, and red text is permitted (respectively). If this is coloured text and it is not one of the allowed colours, please query the authors - 'eLife only supports the following colours for text - red, blue and purple. Please confirm how you would like the colour(s) here captured given this information.'</assert>
</rule>
</pattern>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1288,7 +1288,7 @@
<pattern id="house-style">
<rule context="article//body//named-content[not(@content-type='sequence')]|article//back//named-content[not(@content-type='sequence')]" id="colour-styled-content">
<let name="parent" value="parent::*/local-name()"/>
<report test="." role="error" id="final-colour-styled-content-check">'<value-of select="."/>' - <value-of select="$parent"/> element contains a named content element. This is not allowed for coloured text. Please ensure that &lt;styled-content&gt; is used with the three permitted colours for text - red, blue and purple.</report>
<report see="https://elifeproduction.slab.com/posts/general-layout-and-formatting-wq0m31at#hqmsd-final-colour-styled-content-check" test="." role="error" id="final-colour-styled-content-check">'<value-of select="."/>' - <value-of select="$parent"/> element contains a named content element. This is not allowed for coloured text. Please ensure that &lt;styled-content&gt; is used with the three permitted colours for text - red, blue and purple.</report>
</rule>
</pattern>
</schema>
Original file line number Diff line number Diff line change
Expand Up @@ -1288,7 +1288,7 @@
<pattern id="house-style">
<rule context="article//body//named-content[not(@content-type='sequence')]|article//back//named-content[not(@content-type='sequence')]" id="colour-styled-content">
<let name="parent" value="parent::*/local-name()"/>
<report test="." role="warning" id="pre-colour-styled-content-check">'<value-of select="."/>' - <value-of select="$parent"/> element contains a named content element. If it is red, blue or purple then it should be tagged using &lt;styled-content&gt;. If it is not, then the author will need to be queried - 'eLife only supports the following colours for text - red, blue and purple. Please confirm how you would like the colour(s) here captured given this information.'</report>
<report see="https://elifeproduction.slab.com/posts/general-layout-and-formatting-wq0m31at#h8td5-pre-colour-styled-content-check" test="." role="warning" id="pre-colour-styled-content-check">'<value-of select="."/>' - <value-of select="$parent"/> element contains a named content element. If it is red, blue or purple then it should be tagged using &lt;styled-content&gt;. If it is not, then the author will need to be queried - 'eLife only supports the following colours for text - red, blue and purple. Please confirm how you would like the colour(s) here captured given this information.'</report>
</rule>
</pattern>
</schema>
Original file line number Diff line number Diff line change
Expand Up @@ -1287,7 +1287,7 @@
</xsl:function>
<pattern id="house-style">
<rule context="sub|sup" id="sub-sup-tests">
<report test="parent::*/name() = name()" role="error" id="double-sup-sub">
<report see="https://elifeproduction.slab.com/posts/general-layout-and-formatting-wq0m31at#h6795-double-sup-sub" test="parent::*/name() = name()" role="error" id="double-sup-sub">
<name/> is captured as a child of <name/>, which is not permitted.</report>
</rule>
</pattern>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1288,7 +1288,7 @@
<pattern id="house-style">
<rule context="title[(count(*)=1) and (child::bold or child::italic)]" id="title-bold-tests">
<let name="free-text" value="replace( normalize-space(string-join(for $x in self::*/text() return $x,'')) ,' ','')"/>
<report test="$free-text=''" role="warning" id="title-all-bold-test-1">Title is entirely in <value-of select="child::*[1]/local-name()"/> - '<value-of select="."/>'. Is this correct?</report>
<report see="https://elifeproduction.slab.com/posts/general-layout-and-formatting-wq0m31at#hcq0l-title-all-bold-test-1" test="$free-text=''" role="warning" id="title-all-bold-test-1">Title is entirely in <value-of select="child::*[1]/local-name()"/> - '<value-of select="."/>'. Is this correct?</report>
</rule>
</pattern>
<pattern id="root-pattern">
Expand Down

0 comments on commit c67f517

Please sign in to comment.