From: Norman Walsh Date: Mon, 9 Apr 2001 14:27:32 +0000 (+0000) Subject: Initial checkin of a Schematron Schema for DocBook checking X-Git-Tag: release/1.79.1~6^2~6610 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=02b87159c205a2d708913d60c0884261a5fa2ab2;p=docbook-dsssl Initial checkin of a Schematron Schema for DocBook checking --- diff --git a/schema/schematron/.cvsignore b/schema/schematron/.cvsignore new file mode 100644 index 000000000..310cde16d --- /dev/null +++ b/schema/schematron/.cvsignore @@ -0,0 +1 @@ +docbook.xsl diff --git a/schema/schematron/Makefile b/schema/schematron/Makefile new file mode 100644 index 000000000..605b289f2 --- /dev/null +++ b/schema/schematron/Makefile @@ -0,0 +1,12 @@ +include ../../cvstools/Makefile.incl + +FILE= + +all: docbook.xsl +ifneq ($(FILE),) + $(XSLT) $(FILE) docbook.xsl +endif + +docbook.xsl: docbook.sch + $(XJPARSE) $< + $(XSLT) $< $(SCHEMATRON-BASIC) $@ diff --git a/schema/schematron/README.CVS b/schema/schematron/README.CVS new file mode 100644 index 000000000..89034f2d8 --- /dev/null +++ b/schema/schematron/README.CVS @@ -0,0 +1,2 @@ +This is the beginning of a Schematron Schema to test the things +that an XML DTD can't test. diff --git a/schema/schematron/docbook.sch b/schema/schematron/docbook.sch new file mode 100644 index 000000000..5b0085fb3 --- /dev/null +++ b/schema/schematron/docbook.sch @@ -0,0 +1,167 @@ + contains link + contains olink + contains ulink + contains xref +'> + + contains indexterm + contains beginpage +'> + + contains equation + contains example + contains figure + contains table +'> + + contains warning + contains tip + contains note + contains caution + contains important +'> + +]> + + + Schematron 1.5 Schema for DocBook + + + + + + + + Nested footnotes + &formal.exclusion; + + + + + + &admon.exclusion; + + + + + + &formal.exclusion; + + + + + + &formal.exclusion; + + + + + + &ubiq.exclusion; + &formal.exclusion; + + + + + + contains acronym + + + + + + contains glossterm + + + + + + &ubiq.exclusion; + + + &ubiq.exclusion; + + + + + + contains epigraph + + + + + + &links.exclusion; + + + + + + contains remark + + + + + + contains beginpage + + + contains beginpage + + + contains beginpage + + + contains beginpage + + + contains beginpage + + + + + + contains indexterm + + + + + + + + + + + Warning: does not point to a glossentry! + + + + + + + + Note: does not have a linkend attribute. + + + + + + + + diff --git a/schema/schematron/test.xml b/schema/schematron/test.xml new file mode 100644 index 000000000..3fbbac27d --- /dev/null +++ b/schema/schematron/test.xml @@ -0,0 +1,47 @@ + +
+ +Test Article + + +A paragraphA footnoteA nested +footnote + + + + + A note in a warning + + + + +A Table + + + + 1 + 2 +
A Figure +foo +
+ + +
+ +This is a glossterm. A +glossdef is also a glossterm. +So is a dinosaur. + + +glossterm +A glossary term. + + +glossdef +A glossary definition. + + + + +
diff --git a/schema/schematron/testok.xml b/schema/schematron/testok.xml new file mode 100644 index 000000000..3cb54e6c7 --- /dev/null +++ b/schema/schematron/testok.xml @@ -0,0 +1,26 @@ + +
+ +Test Article + + +A paragraphA footnote + + + A warning + + + +A Table + + + + 1 + 2 + + +
+ + +