[svn r1966] r2244@freebird: fabien | 2006-01-25 01:03:44 -0500
Ajout de la target validate.
--- a/Makefile Thu Jan 26 16:51:31 2006 -0500
+++ b/Makefile Thu Jan 26 16:51:34 2006 -0500
@@ -24,7 +24,7 @@
nature.xml \
oiseau.xml \
ondes.xml \
- orchidee.xml \
+# orchidee.xml \
paysage.xml \
plonger.xml \
pomme.xml \
@@ -43,6 +43,13 @@
HTML_STYLES=$(STYLES) $(addprefix $(STYLES_DIR)/,html.xsl poetry_html.xsl)
PRINT_STYLES=$(STYLES) $(addprefix $(STYLES_DIR)/,print.xsl poetry_print.xsl masters_print.xsl)
DTD=$(addprefix $(DTD_DIR)/,poetry.dtd)
+SGML_CATALOG_FILES=$(CATALOG)
+export SGML_CATALOG_FILES
+xml_validate=xmllint --catalogs --xinclude $(1) | \
+ sed -e 's/\(xmlns:xi\|xml:base\)="[^"]*"//g' | \
+ xmllint --catalogs --valid --noout - 2>&1 | \
+ sed 's/^-:/$(1):/'
+html_validate=true
#REMOTE_DIR=o:public_html/poesie
# FOP=xmlto pdf
@@ -64,6 +71,9 @@
[ -d $(INSTALL_DIR) ] || mkdir -p $(INSTALL_DIR)
cp -a $(OUTPUT)* $(INSTALL_DIR)
+validate:
+ $(call xml_validate,$(SRCS))
+
clean:
rm -f *~ *.fo