[svn] r2239@freebird: fabien | 2006-01-25 00:08:27 -0500
Add good validate target.
--- a/Makefile Tue Jan 24 13:23:44 2006 -0500
+++ b/Makefile Thu Jan 26 16:51:15 2006 -0500
@@ -11,6 +11,10 @@
SGML_CATALOG_FILES=/etc/sgml/catalog
OUTPUT=$(addprefix $(PACKAGE),.html .pdf .txt) $(PACKAGE)
INSTALL_DIR=$(TOP)/install
+xml_validate=xmllint --xinclude $(1) | \
+ sed -e 's/\(xmlns:xi\|xml:base\)="[^"]*"//g' | \
+ xmllint --valid --noout - 2>&1 | sed 's/^-:/$(1):/'
+html_validate=true
all: $(OUTPUT)
@@ -19,7 +23,7 @@
cp -a $(OUTPUT) $(INSTALL_DIR)
validate:
- xmllint --xinclude --noout --postvalid $(MAIN_FILE)
+ $(call xml_validate,$(MAIN_FILE))
$(PACKAGE): $(PACKAGE)/index.html
--- a/book1/7ages.xml Tue Jan 24 13:23:44 2006 -0500
+++ b/book1/7ages.xml Thu Jan 26 16:51:15 2006 -0500
@@ -1,7 +1,7 @@
<?xml version='1.0'?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"/usr/share/sgml/docbook/dtd/xml/4.2/docbookx.dtd">
-<chapter id="7ages" lang="fr"
+<chapter id="sept_ages" lang="fr"
xmlns:xi="http://www.w3.org/2001/XInclude">
<title>Les Sept Âges des Dragons</title>
--- a/book1/7dragons.xml Tue Jan 24 13:23:44 2006 -0500
+++ b/book1/7dragons.xml Thu Jan 26 16:51:15 2006 -0500
@@ -1,7 +1,7 @@
<?xml version='1.0'?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"/usr/share/sgml/docbook/dtd/xml/4.2/docbookx.dtd">
-<chapter id="7dragons" lang="fr"
+<chapter id="sept_dragons" lang="fr"
xmlns:xi="http://www.w3.org/2001/XInclude">
<title>Les Sept Dragons</title>