1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
| | Definition: docbook frontend runs sgmlnorm on xml input,
WARNING: I know very little about the docbook toolchain! Please
double-check and triple-check my suggestion. Works For Me (tm)
Running
db2html foo.xml
causes unnecessary long waits (up to 30 seconds or so) if the
input document is an XML document.
I traced down the problem to the file
/usr/share/sgml/docbook/utils-0.6.13/frontend/docbook (which is
called from /usr/bin/jw). Apparently it runs 'sgmlnorm' even
over XML documents (which should be expected to be well-formed, no?).
This is because $SGML_NORM is set to either 'sgml' or 'xml' in
/usr/bin/jw in any case (and exported), so that the check in docbook
will always lead to sgmlnorm being used.
To me it seems unnecessary to run sgmlnorm over XML input, but I
may well be wrong :)
If there is something to it, please have a look at the attached
patch, which works fine for me and fixes those long waits for me.
Author: Tim-Philipp Müller <tim-mailinglists@zen.co.uk>
Forwarded: not-needed
Bug-Debian: http://bugs.debian.org/212088
Index: docbook-utils-0.6.14/frontends/docbook.in
===================================================================
--- docbook-utils-0.6.14.orig/frontends/docbook.in 2012-05-09 19:15:17.396741140 +0200
+++ docbook-utils-0.6.14/frontends/docbook.in 2012-05-09 19:15:34.988740507 +0200
@@ -6,7 +6,7 @@
# Give the location of the centralized catalog
# First try the one with a version matching the version that is indicated in the document
centralized-catalog)
- if [ -n "$SGML_NORM" ]; then
+ if [ -n "$SGML_NORM" ] && [ "$SGML_XML" = "sgml" ]; then
SGML_NORM_OPTS='-d'
else
SGML_NORM=cat
|