# [PATCH todo] dodoc: detect doctype-xsl version before making docs

2 messages from 2009-11-12 to 2009-11-15. Participants: Jonathan Nieder, Junio C Hamano.
Thread: https://gitlist.dev/t/21587

## Jonathan Nieder, 2009-11-12 02:31

Subject: [PATCH todo] dodoc: detect doctype-xsl version before making docs
Message-ID: <20091112023139.GA1627@progeny.tock>
URL: https://gitlist.dev/e/20091112023139.GA1627%40progeny.tock

```
The manpages in the man branch of git.git appear to have acquired
the dreaded escaped .ft disease when the docbook-xsl toolchain
was upgraded to v1.74.3.
---
It is hard work avoiding escaped nroff directives in output.  I am a
bit confused at what happened here, since docbook-xsl v1.73.2 should
have required the same settings.

These changes are untested, unfortunately.  I hope they can be of some
help nevertheless.

 dodoc.sh |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/dodoc.sh b/dodoc.sh
index 5cbc269..bf49710 100755
--- a/dodoc.sh
+++ b/dodoc.sh
@@ -77,6 +77,19 @@ asciidoc' 8'.*)
 	export ASCIIDOC8 ;;
 esac
 
+db_version_file=/usr/share/xml/docbook/stylesheet/nwalsh/VERSION
+case "$(grep "<fm:Version>" "$db_version_file" 2>/dev/null)" in
+*1.72*)
+	DOCBOOK_XSL_172=YesPlease
+	export DOCBOOK_XSL_172 ;;
+*1.69.[1-9]* | *1.70* | *1.71.0*)
+	DOCBOOK_SUPPRESS_SP=YesPlease
+	export DOCBOOK_SUPPRESS_SP ;;
+*1.7[3-9]* | *1.6[0-8]*)
+	ASCIIDOC_NO_ROFF=YesPlease
+	export ASCIIDOC_NO_ROFF ;;
+esac
+
 make >./:html.log 2>&1 \
 	-C Documentation -j 2 \
 	WEBDOC_DEST="$DOCREPO/doc-html-inst" install-webdoc || exit
-- 
1.6.5.2

```

## Junio C Hamano, 2009-11-15 10:09

Subject: Re: [PATCH todo] dodoc: detect doctype-xsl version before making docs
Message-ID: <7vy6m8m74a.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vy6m8m74a.fsf%40alter.siamese.dyndns.org
In-Reply-To: <20091112023139.GA1627@progeny.tock>

```
Jonathan Nieder <jrnieder@gmail.com> writes:

> The manpages in the man branch of git.git appear to have acquired
> the dreaded escaped .ft disease when the docbook-xsl toolchain
> was upgraded to v1.74.3.
> ---
> It is hard work avoiding escaped nroff directives in output.  I am a
> bit confused at what happened here, since docbook-xsl v1.73.2 should
> have required the same settings.
>
> These changes are untested, unfortunately.  I hope they can be of some
> help nevertheless.
>
>  dodoc.sh |   13 +++++++++++++
>  1 files changed, 13 insertions(+), 0 deletions(-)
>
> diff --git a/dodoc.sh b/dodoc.sh
> index 5cbc269..bf49710 100755
> --- a/dodoc.sh
> +++ b/dodoc.sh
> @@ -77,6 +77,19 @@ asciidoc' 8'.*)
>  	export ASCIIDOC8 ;;
>  esac
>  
> +db_version_file=/usr/share/xml/docbook/stylesheet/nwalsh/VERSION
> +case "$(grep "<fm:Version>" "$db_version_file" 2>/dev/null)" in

Thanks, but there seem to be no such file on FC11.  In /etc/xml/catalog,
I see:

<rewriteURI
 uriStartString="http://docbook.sourceforge.net/release/xsl/current"
 rewritePrefix="file:///usr/share/sgml/docbook/xsl-stylesheets-1.74.3"/>

Unfortunately this seems highly distro dependent.  On my near-by Debian
box, /etc/xml/docbook-xsl.xml has

    <delegateURI
     uriStartString="http://docbook.sourceforge.net/release/xsl/"
     catalog="file:///usr/share/xml/docbook/stylesheet/nwalsh/catalog.xml"/>

and the _catalog_ file has comment v1.73.2 (or whatever) and also

    <rewriteURI
     uriStartString="http://docbook.sourceforge.net/release/xsl/1.73.2/"
     rewritePrefix="./"/>

For now I simply will give up to be portable and adjust the script for the
reality on k.org machine that is used to auto-generate the documentation.

```
