From c39be90c07e0d77151b17577a946d56e346857c2 Mon Sep 17 00:00:00 2001 From: Steven Calderwood Date: Wed, 6 May 2015 22:20:38 -0400 Subject: [PATCH] Add schematron that catches common style2tagmap errors and update xml catalogs. Closes #6 --- doctypes/style2tagmap/catalog.xml | 1 + doctypes/style2tagmap/sch/catalog.xml | 14 +++ doctypes/style2tagmap/sch/style2tagmap.sch | 118 +++++++++++++++++++++ 3 files changed, 133 insertions(+) create mode 100644 doctypes/style2tagmap/sch/catalog.xml create mode 100644 doctypes/style2tagmap/sch/style2tagmap.sch diff --git a/doctypes/style2tagmap/catalog.xml b/doctypes/style2tagmap/catalog.xml index 6f649dc..57505a8 100644 --- a/doctypes/style2tagmap/catalog.xml +++ b/doctypes/style2tagmap/catalog.xml @@ -3,6 +3,7 @@ + diff --git a/doctypes/style2tagmap/sch/catalog.xml b/doctypes/style2tagmap/sch/catalog.xml new file mode 100644 index 0000000..9049754 --- /dev/null +++ b/doctypes/style2tagmap/sch/catalog.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/doctypes/style2tagmap/sch/style2tagmap.sch b/doctypes/style2tagmap/sch/style2tagmap.sch new file mode 100644 index 0000000..a1b646d --- /dev/null +++ b/doctypes/style2tagmap/sch/style2tagmap.sch @@ -0,0 +1,118 @@ + + + + Style2Tag Map Schematron + + + + + Does @format on mapProperties or topicProperties match an output elem's @name? + + + + + @format attribute [] does not match + an existing output element's @name + + + + + + Does topicProperties element with @topicDoc='yes' have @format? + + + @format attribute is missing; it should be present because + @topicDoc is yes. + + + + + + Does @containingTopic = root (which is obsolete value)? + + + @containingTopic is 'root', which is obsolete. Use 'roottopic'. + + + + + + Does topicProperties and output have differing @prologType? + + + + + Does topicProperties and output have differing @shortdescType? + + + + + Does topicProperties and output have differing @bodyType? + + + + + Does topicProperties and output have differing @abstractType? + + + + + Does topicProperties and output have differing @topicType? + + + + + Does topicProperties and output have differing @initialSectionType? + + + + + Abstract pattern for checking whether topicProperties has different attribute values + than corresponding output element. + + + + + + @ with value + [] that takes precedence over the output element's attribute + @. + + + + + + Is the style element, which is deprecated, used? + + + The style element is deprecated. Migrate to paragraphStyle or characterStyle. + + + + + + Does a style definition have a styleName and a styleId attribute? + + + has @styleName and @styleId. @styleName takes precedence. + + + + + + + Does data elem miss some attributes that we want to warn about? + + + is missing @putValueIn attribute but maps to data; should specify + either "content" or "value". + + + does not specify @dataName, which is generally only desirable when + the element type has a default value for the data's @name. + + + + \ No newline at end of file