[xml/sgml-pkgs] Bug#682944: xmllint refuses valid xref xrefstyle content when validating docbook file

Petter Reinholdtsen pere at hungry.com
Fri Jul 27 08:14:34 UTC 2012


Package: libxml2-utils
Version: 2.7.8.dfsg-2+squeeze4

I try to validate my docbook file before processing it, but after
adding xrefs the document is rejected, even if the dblatex processor
seem to handle the XML just fine, and the XML formatting is correct as
far as I can see.  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 xmllint, I get this
error:

  % xmllint --nonet --noout --postvalid --xinclude valid-xref-xrefstyle.xml 
  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 xmllint
unable to recognize correct docbook XML?

-- 
Happy hacking
Petter Reinholdtsen



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