[xml/sgml-pkgs] Bug#834555: jing: conflicting ID-types for attribute "id"

Vincent Lefevre vincent at vinc17.net
Wed Aug 17 01:01:00 UTC 2016


Package: jing
Version: 20131210+dfsg+1-5
Severity: normal

jing yields an error on a valid XML file (neither xmllint, nor
Emacs nXML complain).

Consider the following files:

==> tdb.xml <==
<?xml version="1.0" encoding="utf-8"?>
<root xmlns="http://localhost/" xml:id="foo">
<para xmlns="http://docbook.org/ns/docbook">.</para>
</root>

==> tdb.rnc <==
default namespace = "http://localhost/"

include "/usr/share/xml/docbook/schema/rng/5.0/docbook.rnc" { start |= notAllowed }

root =
   element root {
     attribute xml:id { xsd:ID },
     db.para
   }

start = root

==> tdb.rng <==
<?xml version="1.0" encoding="UTF-8"?>
<grammar ns="http://localhost/" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
  <include href="/usr/share/xml/docbook/schema/rng/5.0/docbook.rng">
    <start combine="choice">
      <notAllowed/>
    </start>
  </include>
  <define name="root">
    <element name="root">
      <attribute name="xml:id">
        <data type="ID"/>
      </attribute>
      <ref name="db.para"/>
    </element>
  </define>
  <start>
    <ref name="root"/>
  </start>
</grammar>

Note: I generated tdb.rng with "trang tdb.rnc tdb.rng" and updated
the path to docbook.rng to reuse the schemas from the docbook5-xml
package.

I get the following error:

zira:~> jing tdb.rng tdb.xml
[warning] /usr/bin/jing: No java runtime was found
/usr/share/xml/docbook/schema/rng/5.0/docbook.rng:83:16: error: conflicting ID-types for attribute "id" from namespace "http://www.w3.org/XML/1998/namespace" of element "root" from namespace "http://localhost/"

while with xmllint from libxml2-utils:

zira:~> xmllint --noout --relaxng tdb.rng tdb.xml
tdb.xml validates

and when I open tdb.xml in Emacs, it is said:

-UUU:----F1  tdb.xml        All L1     (nXML Valid) --------------
Using schema ~/tdb.rnc

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'stable-updates'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.6.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages jing depends on:
ii  default-jre    2:1.8-57
ii  java-wrappers  0.1.28
ii  libjing-java   20131210+dfsg+1-5

jing recommends no packages.

jing suggests no packages.

-- no debconf information



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