Your message dated Sun, 21 Feb 2010 09:11:24 +0100
with message-id <[email protected]>
has caused the   report #570582,
regarding dblatex: completely broken if xsltproc is not installed
to be marked as having been forwarded to the upstream software
author(s) Benoit Guillon <[email protected]>

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
570582: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=570582
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Hi BenoƮt,

I want to inform you about dblatex Debian BTS report #570582 [1]:

using the 4xslt processor instead of xsltproc does not work with dblatex
0.2.12 (I've identified the last working version as 0.2.10).

Although the failure example given by the reporter is caused by wrong
usage (he assumes some automatism that falls back to 4xslt when xsltproc
isn't installed), issuing the appropriate call 'dblatex -m 4xslt' on an
arbitrary docbook document fails.  The XsltParserException thrown by
4xslt is:

Top level variable (None, u'set.book.num') has duplicate definitions
with the same import precedence.  (see XSLT 1.0 sec. 11)

Indeed the variable is defined in preamble.xsl as well as set.xsl.
4xslt seems to be more picky about this issue than xsltproc.

Even after removing one definition, still no PDF file is created,
because in file dbtex.py method Document.build_doclist() assumes
multiple instead of single setup erroneously:

Whereas in single setup case in XsltProc.run() file doclist.txt is not
created at all, in FourXslt.run() it gets created _empty_, which
switches to multiple setup.

[2] patches the problems provisorily, however as usual any improvements
respectively official solutions are welcome.

[1] http://bugs.debian.org/570582
[2] 
Author: Andreas Hoenen <[email protected]>
Description: Fix dblatex's support for alternative XSLT processor 4xslt.
Closes: #570582
The patch is likely to be included in the next upstream release.
--- a/xsl/set.xsl
+++ b/xsl/set.xsl
@@ -5,8 +5,6 @@
     XSLT Stylesheet DocBook -> LaTeX 
     
############################################################################ -->
 
-<xsl:param name="set.book.num">1</xsl:param>
-
 
 <!-- ################
      # Set of books #
--- a/lib/dbtexmf/core/dbtex.py
+++ b/lib/dbtexmf/core/dbtex.py
@@ -4,6 +4,7 @@
 #
 import sys
 import os
+import stat
 import re
 import tempfile
 import shutil
@@ -267,10 +268,10 @@
 
         # If <doclist> is missing, there's no set, or only one book from
         # the set is compiled
-        if not(os.path.isfile(doclist)):
-            self._single_setup()
-        else:
+        if os.path.isfile(doclist) and os.stat(doclist)[stat.ST_SIZE] > 0:
             self._multiple_setup(doclist)
+        else:
+            self._single_setup()
 
     def make_rawtex(self):
         if len(self.documents) == 1:
Regards, Andreas
-- 
Andreas Hoenen <[email protected]>
GPG: 1024D/B888D2CE
     A4A6 E8B5 593A E89B 496B
     82F0 728D 8B7E B888 D2CE

Attachment: pgpZ9SGf6UvXy.pgp
Description: PGP signature


--- End Message ---

Reply via email to