From f2e81e385c4d89d6dcb27ff303eb311bfd22dd30 Mon Sep 17 00:00:00 2001
From: Martin Goik <goik@hdm-stuttgart.de>
Date: Fri, 14 Jul 2017 15:07:49 +0200
Subject: [PATCH] Docbook 5.1 schematron

---
 .../Patch/040_hdmBusinessIntegrityRules.patch | 52 +++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/ws/Xmlmind/Patch/040_hdmBusinessIntegrityRules.patch b/ws/Xmlmind/Patch/040_hdmBusinessIntegrityRules.patch
index 2b84251a7..502f417d0 100644
--- a/ws/Xmlmind/Patch/040_hdmBusinessIntegrityRules.patch
+++ b/ws/Xmlmind/Patch/040_hdmBusinessIntegrityRules.patch
@@ -45,3 +45,55 @@
 +
 +<!-- End Goik's additions -->
 +</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>
-- 
GitLab