Skip to content

Commit

Permalink
feat: add Backmatter sections and article title
Browse files Browse the repository at this point in the history
  • Loading branch information
fred-atherden committed Apr 22, 2020
1 parent 5f22662 commit b566328
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/support.sch
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,17 @@
</rule>
</pattern>

<pattern id="article-title_child">
<rule context="article-title/*">
<assert test="name()='sub'
or name()='sup'
or name()='italic'
or name()='sc'"
id="article-title_child-assert-1"
role="warn">Extra &lt;<name/>&gt; is ignored.</assert>
</rule>
</pattern>

<pattern id="app-group_child">
<rule context="app-group/*">
<assert id="app-group_child-assert-1" test="name()='app'" role="warn">
Expand Down Expand Up @@ -562,6 +573,14 @@
</assert>
</rule>
</pattern>

<pattern id="back-sec_child">
<rule context="back/sec/*">
<assert test="name()='title' or name()='p' or name()='supplementary-material'"
id="back-sec_child-assert-1"
role="warn">&lt;<name/>&gt; in back/sec is ignored.</assert>
</rule>
</pattern>

<pattern id="body_parent">
<rule context="body">
Expand Down Expand Up @@ -2831,6 +2850,9 @@
" role="warn">
&lt;<name/>&gt; in &lt;<value-of select="$parent"/>&gt; is ignored.
</assert>
<report test="preceding-sibling::ref-list"
id="ref-list_parent-report-1"
role="warn">Extra &lt;<name/>&gt; in &lt;<value-of select="$parent"/>&gt; is ignored.</report>
</rule>
</pattern>

Expand Down
2 changes: 2 additions & 0 deletions tests/xspec/support.xspec
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,8 @@
<x:scenario label="article-title/contents">
<x:context href="../cases/article-title/contents.xml"/>
<x:expect-assert id="article-title-assert-2" role="warn"/>
<x:expect-assert id="article-title_child-assert-1" role="warn"/>
<x:expect-assert id="article-title_child-assert-1" role="warn"/>
</x:scenario>
<x:scenario label="article-version-alternatives">
<x:context href="../cases/article-version-alternatives.xml"/>
Expand Down

0 comments on commit b566328

Please sign in to comment.