gnome-help.sct 1.32 KB
Newer Older
1 2 3
<?run this:
xmllint --noout --schematron gnome-help.sct *.page 2>&1 | grep -v 'validates$'
?>
Shaun McCance's avatar
Shaun McCance committed
4 5 6 7 8 9 10 11 12 13
<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>
14 15 16 17 18
  <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">
19 20 21
      <assert test="mal:link or
                    substring(normalize-space(.), string-length(normalize-space(.))) = '.'"
                    >Desc must end with a period</assert>
22 23
    </rule>
    <rule context="mal:page/mal:info/mal:desc/mal:link">
24 25 26
      <assert test="substring(normalize-space(..), string-length(normalize-space(..)) - 2) = '...' or
                    substring(normalize-space(..), string-length(normalize-space(..))) = '…'"
		    >Desc with links must end with an ellipsis</assert>
27 28
    </rule>
  </pattern>
Shaun McCance's avatar
Shaun McCance committed
29
</schema>