]> granicus.if.org Git - docbook-dsssl/commitdiff
Check for multiple titles
authorNorman Walsh <ndw@nwalsh.com>
Sun, 15 Apr 2001 22:17:46 +0000 (22:17 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Sun, 15 Apr 2001 22:17:46 +0000 (22:17 +0000)
schema/schematron/docbook.sch

index 5b0085fb3d34543e2c10b9b5850b7f104385eb62..2c7127f1d18ea7d77f13b690fdb832092f6b0811 100644 (file)
   </pattern>
   -->
 
+  <!-- ============================================================ -->
+  <!-- Repeated Titles Terms                                        -->
+  <!-- ============================================================ -->
+
+  <pattern name="Duplicated titles">
+    <rule context="setinfo|bookinfo|partinfo|referenceinfo">
+      <assert test="count(title) &lt; 2"><name/> contains multiple titles</assert>
+    </rule>
+    <rule context="prefaceinfo|chapterinfo|appendixinfo">
+      <assert test="count(title) &lt; 2"><name/> contains multiple titles</assert>
+    </rule>
+    <rule context="bibliographyinfo|glossaryinfo|indexinfo">
+      <assert test="count(title) &lt; 2"><name/> contains multiple titles</assert>
+    </rule>
+    <rule context="sect1info|sect2info|sect3info|sect4info|sect5info">
+      <assert test="count(title) &lt; 2"><name/> contains multiple titles</assert>
+    </rule>
+    <rule context="sectioninfo|simplesectionfo">
+      <assert test="count(title) &lt; 2"><name/> contains multiple titles</assert>
+    </rule>
+    <rule context="refsect1info|refsect2info|refsect3info">
+      <assert test="count(title) &lt; 2"><name/> contains multiple titles</assert>
+    </rule>
+  </pattern>
+
+  <!-- FIXME: test for duplicated *info/title and */title. they must be the same -->
 </schema>