Comments requested: Normalized manual & DocBook 3.1
| From: | Lars Torben Wilson | Date: | Wed, 20 Oct 1999 23:12:11 +0000 |
| Subject: | Comments requested: Normalized manual & DocBook 3.1 | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-11798@lists.php.net to get a copy of this message | ||
I don't know whether there has been any thought of going to DocBook
3.1 at any point, but it fixes a lot of stuff from 3.0 and adds some
nice things like VARNAME and CONSTANT tags.
However, given that the DocBook 3.1 DTD doesn't allow tag
minimalization by default, generating the manual with a stock 3.1
install doesn't work without modififying DocBook files, which is a
nasty solution. It also uses a different public identifier.
For the first problem, I'm simply gone through all of the .sgml files
and normalized them. html.dsl.in and howto.dsl.in also needed
<style-sheet> tags.
For the identifier, I've modified configure.in to check the
$SGML_CATALOG_FILES for the current DocBook DTD, which is extracted
from docbook.dtd if found. If not found, it defaults to the 3.0 public
identifier. (Even though it seems likely that it won't parse without
finding the DTD in $SGML_CATALOG_FILES.)
This also involves generating manual.sgml and howto.sgml from new
files manual.sgml.in and howto.sgml.in, which use @DOCBOOK_DOCTYPE@ to
indicate the public identifier.
If anybody sees any obvious problems, please let me know. I'm
attaching the diff for configure.in with this message; the only
changes to manual.sgml and howto.sgml would be to move them to
manual.sgml.in and howto.sgml.in and changing the first line of each
from:
<!DOCTYPE article PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
...to:
<!DOCTYPE article PUBLIC "@DOCBOOK_DOCTYPE@" [
(where 'article' is book in manual.sgml)
I'll commit these configuration changes this evening if nobody
mentions anything huge I've missed.
n.b. I've tested this with 3.0 and 3.1 and it all seems to work as
expected.
Thanks for any comments,
Torben
Index: configure.in
===================================================================
RCS file: /repository/phpdoc/configure.in,v
retrieving revision 1.11
diff -u -r1.11 configure.in
--- configure.in 1999/07/27 03:00:51 1.11
+++ configure.in 1999/10/20 23:03:02
@@ -8,6 +8,25 @@
dnl used by checkdoc
AC_PATH_PROG(PERL_PATH, perl)
+AC_MSG_CHECKING(for doctype)
+if test -n "$SGML_CATALOG_FILES" ; then
+ CATFILES=
echo $SGML_CATALOG_FILES | sed -e 's/:/ /'g
+ for catalog in $CATFILES ; do
+ DBDT=grep -E '^PUBLIC.*"docbook.dtd".*$' $catalog 2>/dev/null|
cut -d'"' -f 2
+ if test -n "$DBDT" ; then
+ DOCBOOK_DOCTYPE=$DBDT
+ break
+ fi
+ done
+fi
+if test -n "$DOCBOOK_DOCTYPE"; then
+ AC_MSG_RESULT(got $DOCBOOK_DOCTYPE)
+else
+ DOCBOOK_DOCTYPE="-//Davenport//DTD DocBook V3.0//EN"
+ AC_MSG_RESULT(defaulting to $DOCBOOK_DOCTYPE)
+fi
+AC_SUBST(DOCBOOK_DOCTYPE)
+
AC_MSG_CHECKING(for docbook.dsl)
for dir in /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh \
/usr/lib/dsssl/stylesheets/docbook \
@@ -53,5 +72,5 @@
AC_MSG_RESULT($PHP_SOURCE)
AC_SUBST(PHP_SOURCE)
-AC_OUTPUT(Makefile version.ent checkdoc howto.dsl html.dsl print.dsl phpweb.dsl php.dsl)
+AC_OUTPUT(Makefile version.ent checkdoc howto.sgml manual.sgml howto.dsl html.dsl print.dsl
phpweb.dsl php.dsl)
chmod +x checkdoc