[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#212088: docbook-utils: docbook frontend runs sgmlnorm on xml input, causing long delays



Package: docbook-utils
Version: 0.6.13-3
Severity: normal
Tags: sid patch


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.

Cheers
-Tim




-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux sceptic 2.6.0-test3-bk9 #1 Fri Aug 22 11:02:25 BST 2003 i686
Locale: LANG=C, LC_CTYPE=C

Versions of packages docbook-utils depends on:
ii  docbook-dsssl             1.78-4         modular DocBook DSSSL stylesheets,
ii  jadetex                   3.13-1         generator of printable output from
ii  lynx                      2.8.4.1b-5     Text-mode WWW Browser
ii  perl                      5.8.0-21       Larry Wall's Practical Extraction 
ii  sgmlspl                   1.03ii-25      SGMLS-based example Perl script fo
ii  sp                        1.3.4-1.2.1-35 James Clark's SGML parsing tools

-- no debconf information

--- docbook.original	2003-09-21 21:17:59.000000000 +0100
+++ docbook	2003-09-22 02:52:32.000000000 +0100
@@ -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

Reply to: