[xml/sgml-pkgs] Bug#682950: xmlto refuses valid xref xrefstyle content

Petter Reinholdtsen pere at hungry.com
Fri Jul 27 08:37:07 UTC 2012


Package: xmlto
Version: 0.0.23-2

I use xmlto to process a docbook file to HTML, and dblatex to process
it to PDF (because the dblatex look nicer and work better in my case).
But I have discovered a problem with xmlto.  It is unable to process
xref with xrefstyle values.  This is a simple XML example to
demonstrate the problem:

<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<book>
  <bookinfo>
    <title>Your title here</title>
  </bookinfo>
  
    <chapter id="ch1"><title>Chapter title</title>
      <section><title>Section title 1</title>
      <para>
      See chapter on page <xref xrefstyle="select: pagenumber" linkend="ch1"/>.
      </para>
      </section> 
    </chapter>
</book>

When processing it with dblatex, the paragraph is expanded to "See
chapter on page 1".  But when I process it with xmlto, I get this
error:

  % xmlto html valid-xref-xrefstyle.xml 
  xmlto: valid-xref-xrefstyle.xml does not validate (status 3)
  xmlto: Fix document syntax or use --skip-validation option
    valid-xref-xrefstyle.xml:11: element xref: validity error : No
    declaration for attribute xrefstyle of element xref
  Document valid-xref-xrefstyle.xml does not validate
  %

What is going on here?  Is the docbook XML invalid or is xmlto unable
to recognize correct docbook XML in this case?  xmllint also fail to
validate this XML (reported as BTS #682944), but as far as I can find
on the web and docbook documentation, this is valid use of xref.

-- 
Happy hacking
Petter Reinholdtsen



More information about the debian-xml-sgml-pkgs mailing list