[svn r1968] r2250@freebird: fabien | 2006-01-26 16:51:01 -0500 poesie
authorfabien
Thu, 26 Jan 2006 16:51:42 -0500
branchpoesie
changeset 15 5d8d02c08a17
parent 14 ab0866b1578d
child 16 58d31c830386
[svn r1968] r2250@freebird: fabien | 2006-01-26 16:51:01 -0500 New validation rule for used with my locally modified xmllint.
Makefile
abzoodre.xml
--- a/Makefile	Thu Jan 26 16:51:34 2006 -0500
+++ b/Makefile	Thu Jan 26 16:51:42 2006 -0500
@@ -43,18 +43,14 @@
 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)
+SGML_CATALOG_FILES=$(TOP)/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):/'
+xml_validate=xmllint --catalogs --xinclude --postvalid --noout $(1)
 html_validate=true
 
 #REMOTE_DIR=o:public_html/poesie
 # FOP=xmlto pdf
 FOP=fop
-CATALOG=$(TOP)/catalog
 
 #OUTPUT=$(foreach target,$(basename $(SRCS)),$(call output,$(target)))
 OUTPUT=poetry.pdf poetry/
@@ -71,8 +67,11 @@
 	[ -d $(INSTALL_DIR) ] || mkdir -p $(INSTALL_DIR)
 	cp -a $(OUTPUT)* $(INSTALL_DIR)
 
-validate:
-	$(call xml_validate,$(SRCS))
+validate: $(SRCS) $(addsuffix -validate,$(SRC_DEPS))
+	$(call xml_validate,$<)
+
+%-validate: %
+	$(call xml_validate,$<)
 
 clean:
 	rm -f *~ *.fo
@@ -84,25 +83,25 @@
 	echo $(PRINT_STYLES)
 
 %.fo: %.xml $(PRINT_STYLES) $(SRC_DEPS)
-	SGML_CATALOG_FILES=$(CATALOG) xsltproc --catalogs --xinclude \
+	xsltproc --catalogs --xinclude			\
 		-o $@ $(STYLES_DIR)/poetry_print.xsl $<
 
 %.pdf: %.fo
-#	SGML_CATALOG_FILES=$(CATALOG) xsltproc -o $@.tmp.fo strip-attributes.xsl $<
+#	xsltproc -o $@.tmp.fo strip-attributes.xsl $<
 #	xmlto pdf -o $(dir $@) $<
 	fop $< $@
 #	rm $@.tmp.fo
 
 %.html: %.xml $(HTML_STYLES) $(SRC_DEPS)
-	SGML_CATALOG_FILES=$(CATALOG) xsltproc --catalogs --xinclude \
-		--stringparam css-base-dir '/~fabien/styles/' \
+	xsltproc --catalogs --xinclude				\
+		--stringparam css-base-dir '/~fabien/styles/'	\
 		-o $@ $(STYLES_DIR)/poetry_html.xsl $<
 
 %/index.html: %.xml $(HTML_STYLES) $(SRC_DEPS)
 	rm -rf $(dir $@)
 	mkdir -p $(dir $@)
-	SGML_CATALOG_FILES=$(CATALOG) xsltproc --catalogs --xinclude \
-		--stringparam css-base-dir '/~fabien/styles/' \
+	xsltproc --catalogs --xinclude				\
+		--stringparam css-base-dir '/~fabien/styles/'	\
 		-o $@ $(STYLES_DIR)/poetry_html.xsl $<
 
 %.txt: %.html
--- a/abzoodre.xml	Thu Jan 26 16:51:34 2006 -0500
+++ b/abzoodre.xml	Thu Jan 26 16:51:42 2006 -0500
@@ -67,8 +67,7 @@
       trop souvent une réalité.  À quoi sert-il de se considérer comme
       une société alors que seule une poignée d'individus
       réfléchissent et décident pour tous les autres?  C'est le plus
-      grand défaut de notre <link linkend="pdemocratie">Démocratie
-      médiatique</link>.</para>
+      grand défaut de notre Démocratie médiatique.</para>
   </nda>
 </poetry>
 <!-- Keep this comment at the end of the file