Debian Bug report logs - #186886
wrong assumptions on PIs cause TDG processing to fail

version graph

Package: docbook-dsssl; Maintainer for docbook-dsssl is Debian XML/SGML Group <[email protected]>; Source for docbook-dsssl is src:docbook-dsssl (PTS, buildd, popcon).

Reported by: Yann Dirson <[email protected]>

Date: Sun, 30 Mar 2003 21:18:04 UTC

Severity: normal

Tags: confirmed, upstream

Found in version 1.78-3

Forwarded to http://sourceforge.net/tracker/index.php?func=detail&aid=1061802&group_id=21935&atid=1127362

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], Adam Di Carlo <[email protected]>, [email protected]:
Bug#186886; Package docbook-dsssl. (full text, mbox, link).


Acknowledgement sent to Yann Dirson <[email protected]>:
New Bug report received and forwarded. Copy sent to Adam Di Carlo <[email protected]>, [email protected]. (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Yann Dirson <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: wrong assumptions on PIs cause TDG processing to fail
Date: Sun, 30 Mar 2003 23:28:42 +0200
Package: docbook-dsssl
Version: 1.78-3
Severity: important

As of 2.0.8, TDG includes PIs such as:

<?ORA last-page-blank?>

where the PI parameters are not of the form name="value"


The following clearly fails on such PI parameters, as string-index
returns -1:

(define (parse-pi-attribute pivalues #!optional (skip #f))
  (let* ((equalpos (string-index pivalues "="))
         (name     (substring pivalues 0 equalpos))
         (quotchar (substring pivalues (+ equalpos 1) (+ equalpos 2)))
         (rest     (substring pivalues 
                              (+ equalpos 2) 
                              (string-length pivalues)))
         (quotpos  (string-index rest quotchar))
         (value    (substring rest 0 quotpos))
         (morevals (strip (substring rest 
                                     (+ quotpos 1) 
                                     (string-length rest)))))
    (if skip
        morevals
        (list name value))))


I originally thought to try fixing this code (and may do that anyway),
but was puzzled by another assumption, namely that the 1st char
following the = sign should be a quote.  Not knowing whether that's
correct as well, I prefered to use a stub returning an empty list
instead, by adding the following to my customisation layer:

;; attempt to workaround bug in docbook-dsssl 1.78 
(define (parse-pi-attribute pivalues #!optional (skip #f))  
  '()) 


Unfortunately this has no effect, and TDG processing fails with the
same error messages refering to the original defn:

openjade1.3:/usr/share/sgml/docbook/stylesheet/dsssl/modular/lib/dblib.dsl:1796:12:E: argument out of range


I suspect this new problem would be a bug in openjade, as it violates
my understanding of the DSSSL standard (section 7.1).  I'll do more
tests with a modified version of docbook-dsssl to work around htis.


-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux bylbo 2.4.19+mppe-k6 #1 SMP Fri Nov 15 20:50:49 CET 2002 i586
Locale: LANG=français, LC_CTYPE=français

Versions of packages docbook-dsssl depends on:
ii  debconf                      1.2.34      Debian configuration management sy
ii  docbook                      4.2-3       standard SGML representation syste
ii  jade                         1.2.1-29.1  James Clark's DSSSL Engine
ii  openjade                     1.4devel1-8 Implementation of the DSSSL langua
ii  perl                         5.8.0-17    Larry Wall's Practical Extraction 
ii  sgml-base                    1.17        utilities to maintain SGML catalog
ii  sgml-data                    1.9.1       Common SGML and XML DTDs and entit

-- debconf information:
* docbook-dsssl/visual-acuity: normal
* docbook-dsssl/html-ext: .html
* docbook-dsssl/set-papersize: do not set
* docbook-dsssl/title-font-family: %body-font-family%
* docbook-dsssl/show-comments: true
* docbook-dsssl/body-start-indent: false
* docbook-dsssl/use-id-as-filename: true


-- 
Yann Dirson    <[email protected]> |    Why make M$-Bill richer & richer ?
Debian-related: <[email protected]> |   Support Debian GNU/Linux:
Pro:    <[email protected]> |  Freedom, Power, Stability, Gratuity
     http://ydirson.free.fr/        | Check <http://www.debian.org/>



Information forwarded to [email protected], Adam Di Carlo <[email protected]>, [email protected]:
Bug#186886; Package docbook-dsssl. (full text, mbox, link).


Acknowledgement sent to Adam DiCarlo <[email protected]>:
Extra info received and forwarded to list. Copy sent to Adam Di Carlo <[email protected]>, [email protected]. (full text, mbox, link).


Message #10 received at [email protected] (full text, mbox, reply):

From: Adam DiCarlo <[email protected]>
To: Yann Dirson <[email protected]>
Cc: [email protected]
Subject: Re: Bug#186886: wrong assumptions on PIs cause TDG processing to fail
Date: 30 Mar 2003 17:53:15 -0600
I don't clearly understand what the bug is.  Can you give me a docbook
XML file that is small and shows the behavior that should work but
doesn't?

-- 
.....Adam Di [email protected].....<URL:http://www.debian.org/>




Information forwarded to [email protected], Adam Di Carlo <[email protected]>, [email protected]:
Bug#186886; Package docbook-dsssl. (full text, mbox, link).


Acknowledgement sent to Yann Dirson <[email protected]>:
Extra info received and forwarded to list. Copy sent to Adam Di Carlo <[email protected]>, [email protected]. (full text, mbox, link).


Message #15 received at [email protected] (full text, mbox, reply):

From: Yann Dirson <[email protected]>
To: Adam DiCarlo <[email protected]>
Cc: Yann Dirson <[email protected]>, [email protected]
Subject: Re: Bug#186886: wrong assumptions on PIs cause TDG processing to fail
Date: Thu, 3 Apr 2003 16:10:59 +0200
On Sun, Mar 30, 2003 at 05:53:15PM -0600, Adam DiCarlo wrote:
> I don't clearly understand what the bug is.

It is somewhat explained in the code itself:

  ;; REFENTRY parse-starttag-pi
  ;; PURP Parses a structured PI and returns a list of values
  ;; DESC
  ;; It has become common practice to give PIs structured values.  The
  ;; resultis a PI that looks a lot like a start tag with attributes:
  ;;
  ;; &#60;?pitarget name1="value1" name2='value2' name3="value '3'">
  ;; 
  ;; This function parses a PI with this form and returns a list. The
  ;; list contains the pitarget and each of the name/value pairs:
  ;;
  ;; ("pitarget" "name1" "value1" "name2" "value2" "name3" "value '3'")

As explained in the original bugreport, one of the support functions
for this functionality does not look generic enough to cope with more
general PIs.


> Can you give me a docbook XML file that is small and shows the
> behavior that should work but doesn't?

I tried to make a couple of simples doc with the PI that appears to
cause problem in TDG, but they all processed fine.  I'll have to hunt
to find in which conditions PI processing gets triggered.

In the meantime you can fetch docbook-defguide_2.0.8 (in incoming) and
comment out the workaround at the end of ./defguide.dsl.  On a K6-II
350 it takes less a little more than 10 minutes to get the 1st error
messages:

cd en && docbook-2-html -O -G -O -Vhtml-index -O -D`pwd` --style local=../defguide.dsl book.xml
openjade1.3:/usr/share/sgml/docbook/stylesheet/dsssl/modular/lib/dblib.dsl:1796:12:E: argument out of range
openjade1.3:/usr/share/sgml/docbook/stylesheet/dsssl/modular/lib/dblib.dsl:1811:2:I: called from here
openjade1.3:/usr/share/sgml/docbook/stylesheet/dsssl/modular/lib/dblib.dsl:1839:8:I: called from here
openjade1.3:/usr/share/sgml/docbook/stylesheet/dsssl/modular/lib/dblib.dsl:1839:2:I: called from here
openjade1.3:/usr/share/sgml/docbook/stylesheet/dsssl/modular/lib/dblib.dsl:1836:4:I: called from here
openjade1.3:/usr/share/sgml/docbook/stylesheet/dsssl/modular/html/dbpi.dsl:46:6:I: called from here...(5 calls omitted)
openjade1.3:/usr/share/sgml/docbook/stylesheet/dsssl/modular/html/dbchunk.dsl:148:2:I: called from here
openjade1.3:/usr/share/sgml/docbook/stylesheet/dsssl/modular/html/dbchunk.dsl:192:5:I: called from here
openjade1.3:/usr/share/sgml/docbook/stylesheet/dsssl/modular/html/dbchunk.dsl:234:17:I: called from here
openjade1.3:/usr/share/sgml/docbook/stylesheet/dsssl/modular/html/dbchunk.dsl:249:12:I: called from here
openjade1.3:/usr/share/sgml/docbook/stylesheet/dsssl/modular/html/dbautoc.dsl:32:11:I: called from here


-- 
Yann Dirson    <[email protected]> |    Why make M$-Bill richer & richer ?
Debian-related: <[email protected]> |   Support Debian GNU/Linux:
Pro:    <[email protected]> |  Freedom, Power, Stability, Gratuity
     http://ydirson.free.fr/        | Check <http://www.debian.org/>



Information forwarded to [email protected], Adam Di Carlo <[email protected]>, [email protected]:
Bug#186886; Package docbook-dsssl. (full text, mbox, link).


Acknowledgement sent to Adam DiCarlo <[email protected]>:
Extra info received and forwarded to list. Copy sent to Adam Di Carlo <[email protected]>, [email protected]. (full text, mbox, link).


Message #20 received at [email protected] (full text, mbox, reply):

From: Adam DiCarlo <[email protected]>
To: Yann Dirson <[email protected]>, [email protected]
Cc: [email protected]
Subject: Re: Bug#186886: wrong assumptions on PIs cause TDG processing to fail
Date: 28 Apr 2003 00:23:25 -0500
[Message part 1 (text/plain, inline)]
tags 186886 + pending
thanks

I believe I've fixed this bug in the DSSSL source.  I attach a patch.

The underlying problem is actually just PIs which are in rather
degenerate form, such as '<?dbhtml filename="pe-module.html"??>'.
However, the stylesheets shouldn't die in that way, just because a PI
is bad; now it silently skips over it.  Probably a warning would be
better but I'm lazy. :)

This has been applied upstream and will be in the Debian package once
the next docbook-dsssl releases.

-- 
...Adam Di Carlo...<[email protected]>.......<URL:http://www.onshored.com/>
[pi.diff (text/plain, attachment)]

Tags added: pending Request was from Adam DiCarlo <[email protected]> to [email protected]. (full text, mbox, link).


Information forwarded to [email protected], Adam Di Carlo <[email protected]>, [email protected]:
Bug#186886; Package docbook-dsssl. (full text, mbox, link).


Acknowledgement sent to Yann Dirson <[email protected]>:
Extra info received and forwarded to list. Copy sent to Adam Di Carlo <[email protected]>, [email protected]. (full text, mbox, link).


Message #27 received at [email protected] (full text, mbox, reply):

From: Yann Dirson <[email protected]>
To: Adam DiCarlo <[email protected]>
Cc: Yann Dirson <[email protected]>, [email protected]
Subject: Re: Bug#186886: wrong assumptions on PIs cause TDG processing to fail
Date: Mon, 28 Apr 2003 11:09:20 +0200
On Mon, Apr 28, 2003 at 12:23:25AM -0500, Adam DiCarlo wrote:
> I believe I've fixed this bug in the DSSSL source.  I attach a patch.

Cool, thanks !

> The underlying problem is actually just PIs which are in rather
> degenerate form, such as '<?dbhtml filename="pe-module.html"??>'.
> However, the stylesheets shouldn't die in that way, just because a PI
> is bad; now it silently skips over it.  Probably a warning would be
> better but I'm lazy. :)

Well, AFAIUI there is no constraint on the contents of a PI in SGML -
it's just a matter of conventions.

Regards,
-- 
Yann Dirson    <[email protected]> |    Why make M$-Bill richer & richer ?
Debian-related: <[email protected]> |   Support Debian GNU/Linux:
Pro:    <[email protected]> |  Freedom, Power, Stability, Gratuity
     http://ydirson.free.fr/        | Check <http://www.debian.org/>



Information forwarded to [email protected], Adam Di Carlo <[email protected]>, [email protected]:
Bug#186886; Package docbook-dsssl. (full text, mbox, link).


Acknowledgement sent to Adam DiCarlo <[email protected]>:
Extra info received and forwarded to list. Copy sent to Adam Di Carlo <[email protected]>, [email protected]. (full text, mbox, link).


Message #32 received at [email protected] (full text, mbox, reply):

From: Adam DiCarlo <[email protected]>
To: Yann Dirson <[email protected]>
Cc: Yann Dirson <[email protected]>, [email protected]
Subject: Re: Bug#186886: wrong assumptions on PIs cause TDG processing to fail
Date: 29 Apr 2003 00:18:21 -0500
Yann Dirson <[email protected]> writes:

> Well, AFAIUI there is no constraint on the contents of a PI in SGML -
> it's just a matter of conventions.

Right, I was just saying ideally if there is a "<?dbhtml" directive we
can't figure out, i t might be nice to say so.

-- 
.....Adam Di [email protected].....<URL:http://www.debian.org/>




Tags removed: pending Request was from Peter Eisentraut <[email protected]> to [email protected]. (full text, mbox, link).


Tags added: fixed-upstream Request was from Peter Eisentraut <[email protected]> to [email protected]. (full text, mbox, link).


Severity set to `normal'. Request was from Peter Eisentraut <[email protected]> to [email protected]. (full text, mbox, link).


Tags removed: fixed-upstream Request was from Peter Eisentraut <[email protected]> to [email protected]. (full text, mbox, link).


Tags added: confirmed, upstream Request was from Peter Eisentraut <[email protected]> to [email protected]. (full text, mbox, link).


Noted your statement that Bug has been forwarded to http://sourceforge.net/tracker/index.php?func=detail&aid=1061802&group_id=21935&atid=373747. Request was from Peter Eisentraut <[email protected]> to [email protected]. (full text, mbox, link).


Forwarded-to-address changed from http://sourceforge.net/tracker/index.php?func=detail&aid=1061802&group_id=21935&atid=373747 to http://sourceforge.net:80/tracker/index.php?func=detail&aid=1061802&group_id=21935&atid=1127362. Request was from Peter Eisentraut <[email protected]> to [email protected]. (Mon, 11 May 2009 19:27:05 GMT) (full text, mbox, link).


Forwarded-to-address changed from http://sourceforge.net:80/tracker/index.php?func=detail&aid=1061802&group_id=21935&atid=1127362 to http://sourceforge.net/tracker/index.php?func=detail&aid=1061802&group_id=21935&atid=1127362. Request was from Sandro Tosi <[email protected]> to [email protected]. (Fri, 26 Jun 2009 16:24:03 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Thu May 15 19:21:56 2025; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.