[email protected]
[Top] [All Lists]

Bug#451267: marked as forwarded (dblatex: tries to compile incorrect doc

Subject: Bug#451267: marked as forwarded dblatex: tries to compile incorrect document
From: Debian Bug Tracking System
Date: Fri, 16 Nov 2007 16:33:03 +0000
Your message dated Fri, 16 Nov 2007 17:30:22 +0100
with message-id <[email protected]>
has caused the Debian Bug report #451267,
regarding dblatex: tries to compile incorrect document
to be marked as having been forwarded to the upstream software
author(s) .

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Subject: Re: Bug#451267: dblatex: tries to compile incorrect document
From: Andreas Hoenen
Date: Fri, 16 Nov 2007 17:30:22 +0100
Josselin Mouette <[email protected]> wrote:

> Le vendredi 16 novembre 2007 à 13:23 +0100, Andreas Hoenen a écrit :
> > Sadly, I cannot reproduce your problem:
> >
> > >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > 
> > >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> > [email protected]:~/dblatex/work/bug451267$ cat incorrect.xml
> > <?xml version="1.0"?>
> > <!DOCTYPE article
> >   PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
> >   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd";>
> > <article lang="en">
> >   <title>Non validating docbook article</title>
> >
> >   <itemizedlist>
> >     <para>Example paragraph</para>
> >   </itemizedlist>
> > </article>
> >
> > [email protected]:~/dblatex/work/bug451267$ dblatex incorrect.xml
> > Build the listings...
> > XSLT stylesheets DocBook -  LaTeX 2e (0.2.6-1)
> > ===================================================
> > Build incorrect.pdf
> > This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)
> >  %&-line parsing enabled.
> > entering extended mode
> > pdflatex failed
> > incorrect_tmp.tex:35: Something's wrong--perhaps a missing \item.
> > incorrect_tmp.tex:35: leading text: \end{itemize}
> > Error: pdflatex compilation failed
> This is exactly the issue i'm talking about. This error message doesn't
> give any hint about where the problem comes from.

Okay, I had the wrong impression that your transformation did not fail,
but resulted in a garbage document.  Sorry.

> > dblatex expects valid DocBook as its input.  However, it does no
> > validation on its own (there are tools like xmllint for this), and it
> > tries to transform the input even if the latter has errors: best effort
> > principle.
> >
> > If dblatex succeeds, great.  If not, don't blame the tool.  One could
> > consider this a case of "shit in, shit out".
> As a tool that handles XML which is a format that can easily be
> validated, I'd expect it to at least give a warning when the XML input
> isn't valid.
> In this specific case, the compilation fails, and that's expected.
> However I'd like to see something about the real reason, which is
> malformed XML, not something about a missing \item.

Thus it's a usability issue.  And it's not restricted to dblatex, but to
the XSLT processor [1].  I can imagine two approaches:

1) Force a validation before XSLT transformation.  This abandons the
   best effort approach, but is rather straight forward.

2) On transformation errors validate the document afterwards.  If
   validation fails, dump this as a possible error cause.

The problem for dblatex in general is that it is aimed at various
platforms, thus adding another dependency is likely to cause trouble.
However the Debian installation could patch the general product to add
such a validation.

Thus let's ask upstream:

Benoit, what do you think about this feature request?  Any objections
against a Debian specific extension?  Or do you prefer a general
solution, maybe in a way that validation will only occur if xmllint is

[1] http://www.sagehill.net/docbookxsl/ToolsSetup.html#Validation

Regards, Andreas

P.S. Benoit, as usual you'll find this report's history at
Andreas Hoenen <[email protected]>

GPG: 1024D/B888D2CE
     A4A6 E8B5 593A E89B 496B
     82F0 728D 8B7E B888 D2CE

--- End Message ---
<Prev in Thread] Current Thread [Next in Thread>