<<< Date Index >>>     <<< Thread Index >>>

[PATCH] Make manual validate against DocBook 4.2 DTD for "book"



This adds a 'validate' target to doc/Makefile which uses xmllint(1)
to validate manual.xml against the DTD given in the doctype (intended
for developers only).

Running it revealed two validation errors which this patch fixes:

1) We declare 'article' as the doctype but want to use 'book'
2) Within a lists's items, we didn't include our text in a paragraph

Signed-off-by: Rocco Rutte <pdmef@xxxxxxx>
---
 doc/Makefile.am     |    3 +++
 doc/manual.xml.head |   14 +++++++-------
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/doc/Makefile.am b/doc/Makefile.am
index 5469132..32978de 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -99,6 +99,9 @@ manual.tex: stamp-doc-xml
          openjade -t tex -D $(DSLROOT) -d print/docbook.dsl dtds/decls/xml.dcl 
manual.xml; \
        fi
 
+validate: stamp-doc-xml
+       xmllint --noout --noblanks --postvalid manual.xml
+
 clean-local:
        rm -f *~ *.html *.orig *.rej  stamp-doc-* *.ps mutt.1 muttrc.man
        rm -f *.aux *.log *.tex *.out
diff --git a/doc/manual.xml.head b/doc/manual.xml.head
index f5bad9e..2376817 100644
--- a/doc/manual.xml.head
+++ b/doc/manual.xml.head
@@ -1,5 +1,5 @@
 <?xml version="1.0" standalone="no"?>
-<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd";>
 <book>
 
@@ -308,12 +308,12 @@ following categories:
 
 <para>
 <itemizedlist>
-<listitem>muttrc commands</listitem>
-<listitem>addresses and aliases</listitem>
-<listitem>shell commands</listitem>
-<listitem>filenames</listitem>
-<listitem>patterns</listitem>
-<listitem>everything else</listitem>
+<listitem><para>muttrc commands</para></listitem>
+<listitem><para>addresses and aliases</para></listitem>
+<listitem><para>shell commands</para></listitem>
+<listitem><para>filenames</para></listitem>
+<listitem><para>patterns</para></listitem>
+<listitem><para>everything else</para></listitem>
 </itemizedlist>
 </para>
 
-- 
1.5.0.rc4.g0f5c