Skip to content
Snippets Groups Projects
Commit f2e81e38 authored by Goik Martin's avatar Goik Martin
Browse files

Docbook 5.1 schematron

parent 5f326c34
No related branches found
No related tags found
No related merge requests found
...@@ -45,3 +45,55 @@ ...@@ -45,3 +45,55 @@
+ +
+<!-- End Goik's additions --> +<!-- End Goik's additions -->
+</s:schema> +</s:schema>
--- xmlmind.7_4_1/addon/config/docbook51/rng/V5.1/docbook.sch 2016-11-22 18:00:00.000000000 +0100
+++ xmlmind/addon/config/docbook51/rng/V5.1/docbook.sch 2017-07-14 15:04:10.283398111 +0200
@@ -196,4 +196,49 @@
<s:assert test="parent::*[@xlink:type='extended'] or parent::*[@xlink:type='locator'] or parent::*[@xlink:type='arc']">An XLink title type element must occur as the direct child of an XLink extended, locator, or arc type element.</s:assert>
</s:rule>
</s:pattern>
+
+ <!-- Start Goik's additions -->
+ <s:pattern>
+ <s:title>Mandatory title in exercise</s:title>
+ <s:rule context="db:qandaset">
+ <s:assert test="db:title or name(preceding-sibling::*[1])='db:title'">Must be IMMEDIATELY following title or contain a title itself.</s:assert>
+ </s:rule>
+ </s:pattern>
+
+ <s:pattern>
+ <s:title>Mandatory defaultlabel</s:title>
+ <s:rule context="db:qandaset">
+ <s:assert test="@defaultlabel">Attribute defaultlabel must be defined.</s:assert>
+ </s:rule>
+ </s:pattern>
+
+ <s:pattern>
+ <s:title>Mandatory @language</s:title>
+ <s:rule context="db:programlisting">
+ <s:assert test="@language">Attribute language must be defined.</s:assert>
+ </s:rule>
+ </s:pattern>
+
+ <s:pattern>
+ <s:title>Mandatory Id definition constraint</s:title>
+ <s:rule context="db:preface|db:chapter|db:section|db:figure|db:equation|db:table|db:qandaset">
+ <s:assert test="@xml:id">Each chapter,section, subection,... must have a unique id.</s:assert>
+ </s:rule>
+ </s:pattern>
+
+ <s:pattern>
+ <s:title>Mandatory coref target constraint</s:title>
+ <s:rule context="db:coref">
+ <s:assert test="//db:co[@xml:id=current()/@linkend]">coref target must be a co element.</s:assert>
+ </s:rule>
+ </s:pattern>
+
+ <s:pattern>
+ <s:title>Avoid nested slide annotations</s:title>
+ <s:rule context="*[contains(@annotations, 'slide')]">
+ <s:assert test="not(ancestor::*[contains(@annotations, 'slide')])">Existing »slide« annotated parent.</s:assert>
+ </s:rule>
+ </s:pattern>
+ <!-- End Goik's additions -->
+
</s:schema>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment