[gedit] docs: Added two files to allow for schematron checks of docs.
- From: Jim Campbell <jcampbell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] docs: Added two files to allow for schematron checks of docs.
- Date: Mon, 26 Jan 2015 18:42:06 +0000 (UTC)
commit 2aed19fc23106bb3db319f62b1c04391eed4d3bf
Author: Jim Campbell <jcampbell gnome org>
Date: Mon Jan 26 18:36:06 2015 +0000
docs: Added two files to allow for schematron checks of docs.
Included both gnome-help.sct and schematron.sh. Running
./schematron.sh will call gnome-help.sct, providing further
validation of docs within gedit help.
help/C/gnome-help.sct | 22 ++++++++++++++++++++++
help/C/schematron.sh | 1 +
2 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/help/C/gnome-help.sct b/help/C/gnome-help.sct
new file mode 100644
index 0000000..0c1e623
--- /dev/null
+++ b/help/C/gnome-help.sct
@@ -0,0 +1,22 @@
+<schema xmlns="http://www.ascc.net/xml/schematron" >
+ <title>Some sanity checks for the GNOME desktop help</title>
+ <ns prefix="mal" uri="http://projectmallard.org/1.0/"/>
+ <ns prefix="xi" uri="http://www.w3.org/2001/XInclude"/>
+ <pattern name="Info element checks">
+ <rule context="mal:page/mal:info">
+ <assert test="not(mal:license)">Must not include license directly</assert>
+ <assert test="xi:include[ href='legal.xml']">Must include legal.xml</assert>
+ </rule>
+ </pattern>
+ <pattern name="Desc checks">
+ <rule context="mal:page/mal:info">
+ <assert test="normalize-space(mal:desc) != ''">Must have non-empty desc</assert>
+ </rule>
+ <rule context="mal:page/mal:info/mal:desc">
+ <assert test="substring(normalize-space(.), string-length(normalize-space(.))) = '.'">Desc must end
with a period</assert>
+ </rule>
+ <rule context="mal:page/mal:info/mal:desc/mal:link">
+ <assert test="substring(normalize-space(..), string-length(normalize-space(..)) - 2) = '...'">Desc
with links must end with an ellipsis</assert>
+ </rule>
+ </pattern>
+</schema>
diff --git a/help/C/schematron.sh b/help/C/schematron.sh
new file mode 100755
index 0000000..8c3a4b9
--- /dev/null
+++ b/help/C/schematron.sh
@@ -0,0 +1 @@
+xmllint --noout --schematron gnome-help.sct *.page 2>&1 | grep -v validates
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]