[xml/sgml-pkgs] Bug#255241: xmlto: amp entity in url attribute breaks PDF generation

Ivan Vilata i Balaguer Ivan Vilata i Balaguer <ivan@selidor.net>, 255241@bugs.debian.org
Sat, 19 Jun 2004 20:32:58 +0200


Package: xmlto
Version: 0.0.18-4
Severity: normal

      Hi all.  I have been having trouble with PDF generation from a
  DocBook XML file which contained an `amp´ entity in a `url´ attribute
  in a `ulink´ element.  For instance, the following input shows the
  problem:

--8<--
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE article
	PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
	"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
]>
<article lang="en">
	<para>
		XXX <ulink url="http://host/script.cgi?arg1=val1&amp;arg2=val2"></ulink> XXX
	</para>
</article>
--8<--

      That was a perfectly valid XML DocBook file (in fact, the
  conversion to HTML gives the pretended link).  However, running `xmlto
  pdf test.xml´ yields the following output:

--8<--
Making portrait pages on a4 paper (209.9028mm x 297.0389mm)
This is pdfTeX, Version 3.14159-1.10b (Web2C 7.4.5)
(./tmp.fo{/usr/share/texmf/pdftex/config/pdftex.cfg}
LaTeX2e <2001/06/01>
Babel <v3.7h> and hyphenation patterns for american, nohyphenation, loaded.
xmltex version: 2002/06/25 v1.9 (Exp):
(/usr/share/texmf/tex/xmltex/config/xmltex.cfg) 
No File: tmp.cfg (/usr/share/texmf/tex/xmltex/passivetex/fotex.xmt)
(/usr/share/texmf/tex/latex/base/article.cls
Document Class: article 2001/04/21 v1.4e Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size10.clo))
(/usr/share/texmf/tex/xmltex/passivetex/fotex.sty
)
No file tmp.aux.
(/usr/share/texmf/tex/latex/cyrillic/t2acmr.fd)
(/usr/share/texmf/tex/latex/base/ts1cmr.fd)
(/usr/share/texmf/tex/latex/psnfss/t1ptm.fd)
No file tmp.out.
No file tmp.out.
INFO: Using normal, i.e. nonfrench-spacing in document
(/usr/share/texmf/tex/latex/psnfss/t1phv.fd)
! Missing \endcsname inserted.
<to be read again> 
                   &
l.217 ...ost/script.cgi?arg1=val1&amp;arg2=val2)">
                                                  http://host/script.cgi?arg...

? 
! Emergency stop.
<to be read again> 
                   &
l.217 ...ost/script.cgi?arg1=val1&amp;arg2=val2)">
                                                  http://host/script.cgi?arg...

No pages of output.
Transcript written on tmp.log.
--8<--

      This might be a problem in FO generation or TeX generation.  Maybe
  the bug should be assigned to xmltex or passivetex; however, my
  knowledge of the xmlto toolchain is insuficient for me to decide.

  Thanks,
      Ivan

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.5trd
Locale: LANG=ca_ES.UTF-8, LC_CTYPE=ca_ES.UTF-8

Versions of packages xmlto depends on:
ii  debianutils                 2.8.2        Miscellaneous utilities specific t
ii  docbook-xml                 4.2-12       standard XML documentation system,
ii  docbook-xsl                 1.64.1.0-4.2 stylesheets for processing DocBook
ii  libc6                       2.3.2.ds1-13 GNU C Library: Shared libraries an
ii  libpaper-utils              1.1.14       Library for handling paper charact
ii  libxml2-utils               2.6.10-3     XML utilities
ii  sgml-base                   1.22         utilities to maintain SGML catalog
ii  xsltproc                    1.1.7-1      XSLT command line processor

-- no debconf information