[install manual] Some comments about doc/manual/ files
Hi,
here are some comments and questions about doc/manual/ files:
* The trailing dollar in $Id$ keyword is almost always lacking
* Many files have no $Id$ keyword
* When applying validate.sh.patch, one can validate a single file,
but it must be run in the file directory, e.g.
$ cd en/hardware && ../../validate.sh hardware.xml
I also had to move entity declarations from install.en.xml to a
new file entities.ent
* Why is this manual split into small pieces?
* and the most important one: in XML, marked sections are only valid
in DTD and not within XML documents! It might not be a problem if
nsgmls is used to process these files, but XML tools will complain.
Denis
Index: validate.sh
===================================================================
RCS file: /cvs/debian-boot/debian-installer/doc/manual/validate.sh,v
retrieving revision 1.1
diff -u -r1.1 validate.sh
--- validate.sh 27 May 2003 02:54:26 -0000 1.1
+++ validate.sh 13 Jun 2003 21:47:40 -0000
@@ -1,2 +1,17 @@
#!/bin/sh
-nsgmls -sv -c /usr/share/sgml/docbook/custom/simple/catalog /usr/share/sgml/declaration/xml.dcl $1 2> errors
+
+catalog=/usr/share/sgml/docbook/dtd/xml/4.2/catalog
+xmldcl=/usr/share/sgml/declaration/xml.dcl
+if grep -q '^<!DOCTYPE' $1; then
+ nsgmls -s -c $catalog $xmldcl $1
+else
+ temp=`tempfile`
+ topdir=`dirname $0`
+ root=`sed -e '0,/<[a-z]/!d' $1 | sed -e '$!d' | sed -e 's/<\([a-z][a-zA-Z0-9]*\).*/\1/'`
+ cat > $temp <<EOT
+<!DOCTYPE $root PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "docbookx.dtd" [<!ENTITY % entities SYSTEM "entities.ent"> %entities;]>
+EOT
+ cat $1 >> $temp
+ nsgmls -s -D$topdir -c $catalog $xmldcl $temp
+ rm -f $temp
+fi
Reply to: